<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></title> 
<link>http://www.bizeway.net/index.php</link> 
<description><![CDATA[网务通 - 网务公司发展之路]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></copyright>
<item>
<link>http://www.bizeway.net/read.php?637</link>
<title><![CDATA[413 Request Entity Too Large报错]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Tue, 04 Jun 2019 02:42:20 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?637</guid> 
<description>
<![CDATA[ 
	今天调试中，发现上传图片一会成功，一会不成功，最后服务器反馈的错误是413 Request Entity Too Large。我记得我已经把php.ini中上传文件的配置开到了80M了，为啥还有会报错呢，经查原来是nignx的限制了。<br/><br/>修改 Nginx 的配置文件<br/><br/>server { &nbsp;<br/> &nbsp; &nbsp;... &nbsp;<br/> &nbsp; &nbsp;client_max_body_size 20m; &nbsp;<br/> &nbsp; &nbsp;... &nbsp;<br/>}<br/>重启 Nginx 服务和 php-fpm 服务即可。
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?636</link>
<title><![CDATA[CentOS7下解决SSH自动断开办法]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Wed, 19 Sep 2018 04:00:40 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?636</guid> 
<description>
<![CDATA[ 
	vim /etc/ssh/sshd_config<br/>找到下面两行<br/><br/>ClientAliveInterval 0<br/>ClientAliveCountMax 3<br/>去掉注释，改成<br/><br/>ClientAliveInterval 30 <br/>ClientAliveCountMax 86400<br/><br/>这两行的意思分别是<br/><br/>1、客户端每隔多少秒向服务发送一个心跳数据<br/><br/>2、客户端多少秒没有相应，服务器自动断掉连接<br/><br/>重启sshd服务<br/><br/>service sshd restart<br/>Tags - <a href="tag.php?tag=centos" rel="tag">centos</a> , <a href="tag.php?tag=ssh" rel="tag">ssh</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?635</link>
<title><![CDATA[Centos 7 SSH连接超时自动断开的解决方案]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Thu, 13 Sep 2018 08:45:49 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?635</guid> 
<description>
<![CDATA[ 
	最近在Centos 7 上安装软件，一会不看就自动断开，很是讨厌，故调整下面的设置，让其长时间保持连线。<br/>1.编辑sshd配置文件<br/><br/> &nbsp; &nbsp;<div class="code"># vi /etc/ssh/sshd_config <br/>找到 #ClientAliveInterval 0 #ClientAliveCountMax 3 <br/>修改为 ClientAliveInterval 60 ClientAliveCountMax 3</div><br/><br/>2.重启sshd服务<br/><br/> &nbsp; &nbsp;<div class="code"># systemctl restart sshd</div><br/><br/>这样连接centos7长时间不操作也不会连接超时中断了。<br/>Tags - <a href="tag.php?tag=centos7" rel="tag">centos7</a> , <a href="tag.php?tag=ssh" rel="tag">ssh</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?634</link>
<title><![CDATA[centos查找大文件]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Thu, 30 Aug 2018 08:26:04 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?634</guid> 
<description>
<![CDATA[ 
	查找大于200M的文件<br/><div class="code">find / -type f -size +200M</div><br/><br/>查看当前目录占磁盘空间<br/><div class="code">du -h --max-depth=1</div><br/><br/>目录按照占用空间大小排序<br/><div class="code">du -h --max-depth=2 &#124; sort -n</div><br/>Tags - <a href="tag.php?tag=%E6%9F%A5%E6%89%BE%E5%A4%A7%E6%96%87%E4%BB%B6" rel="tag">查找大文件</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?633</link>
<title><![CDATA[centos6.5 用yum安装Nginx+PHP7.1+MySQL]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Mon, 03 Apr 2017 11:07:31 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?633</guid> 
<description>
<![CDATA[ 
	准备篇：<br/><br/>1、开启端口（以80端口为例）<br/> /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT &nbsp; 写入修改<br/> /etc/init.d/iptables save &nbsp; 保存修改<br/> service iptables restart &nbsp; &nbsp;重启防火墙，修改生效<br/><br/>2、关闭SELINUX<br/>vi /etc/selinux/config<br/>#SELINUX=enforcing &nbsp; &nbsp; &nbsp; #注释掉<br/>#SELINUXTYPE=targeted &nbsp; &nbsp;#注释掉<br/>SELINUX=disabled &nbsp; &nbsp; &nbsp; &nbsp; #增加<br/><br/>:wq &nbsp;保存，关闭<br/>shutdown -r now &nbsp; #重启系统<br/><br/>3、配置CentOS 6.2第三方yum源（CentOS默认的标准源里没有nginx软件包）<br/>yum install wget &nbsp; &nbsp;#安装下载工具wget<br/>wget http://www.atomicorp.com/installers/atomic &nbsp;#下载atomic yum源<br/>sh ./atomic &nbsp; #安装<br/>yum check-update &nbsp;#更新yum软件包<br/>##########################################################################<br/><br/>安装篇<br/><br/>1、安装开发包和库文件<br/># yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel<br/><br/>一、安装nginx<br/>yum install nginx &nbsp; &nbsp; &nbsp;#安装nginx，根据提示，输入Y安装即可成功安装<br/>service nginx start &nbsp; &nbsp;#启动<br/>chkconfig nginx on &nbsp; &nbsp;#设为开机启动<br/>/etc/init.d/nginx &nbsp;restart &nbsp;#重启<br/>rm -rf /usr/share/nginx/html/* &nbsp;#删除ngin默认测试页<br/><br/>二、安装MySQL<br/>1、安装mysql<br/><br/> yum install mysql mysql-server &nbsp; #询问是否要安装，输入Y即可自动安装,直到安装完成<br/>/etc/init.d/mysqld start &nbsp; #启动MySQL<br/>chkconfig mysqld on &nbsp; #设为开机启动<br/>cp /usr/share/mysql/my-medium.cnf &nbsp; /etc/my.cnf &nbsp;#拷贝配置文件（注意：如果/etc目录下面默认有一个my.cnf，直接覆盖即可）<br/>shutdown -r now &nbsp;#重启系统<br/><br/>2、为root账户设置密码<br/>mysql_secure_installation<br/><br/>回车，根据提示输入Y<br/><br/>输入2次密码，回车<br/><br/>根据提示一路输入Y<br/><br/>最后出现：Thanks for using MySQL!<br/><br/>MySql密码设置完成，重新启动 MySQL：<br/>/etc/init.d/mysqld stop &nbsp; #停止<br/>/etc/init.d/mysqld start &nbsp;#启动<br/>service mysqld restart &nbsp; &nbsp;#重启<br/><br/>2、安装PHP<br/>#yum install php71w lighttpd-fastcgi php71w-cli php71w-MySQL php71w-gd php71w-imap php71w-ldap php71w-odbc php71w-pear php71w-xml php71w-xmlrpc php71w-mbstring php71w-mcrypt php71w-mssql php71w-snmp php71w-soap php71w-openssl openssl<br/><br/>3、安装php和所需组件使PHP支持MySQL、FastCGI模式<br/># yum install php71w-tidy php71w-common php71w-devel php71w-fpm php71w-mysql<br/># service php-fpm start<br/># chkconfig --levels 235 php-fpm on<br/><br/>/etc/init.d/mysqld restart &nbsp;#重启MySql<br/>/etc/init.d/nginx &nbsp;restart &nbsp;#重启nginx<br/>/etc/rc.d/init.d/php-fpm start &nbsp;#启动php-fpm<br/>chkconfig php-fpm on &nbsp;#设置开机启动<br/><br/>配置篇<br/><br/>一、配置nginx支持php<br/>cp /etc/nginx/nginx.conf &nbsp;/etc/nginx/nginx.confbak &nbsp; &nbsp;#备份原有配置文件<br/>vi /etc/nginx/nginx.conf &nbsp;#编辑<br/>user &nbsp;nginx &nbsp;nginx; &nbsp;#修改nginx运行账号为：nginx组的nginx用户<br/><br/>:wq! &nbsp; &nbsp;#保存退出<br/><br/>cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.confbak &nbsp; #备份原有配置文件<br/>vi /etc/nginx/conf.d/default.conf &nbsp; #编辑<br/><br/>index index.php index.html index.htm; &nbsp; #增加index.php<br/><br/> # pass the PHPscripts to FastCGI server listening on 127.0.0.1:9000<br/> #<br/> location ~ &#92;.php$ {<br/> &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;html;<br/> &nbsp; fastcgi_pass &nbsp; 127.0.0.1:9000;<br/> &nbsp; fastcgi_index &nbsp;index.php;<br/> &nbsp; fastcgi_param &nbsp;SCRIPT_FILENAME &nbsp;$document_root$fastcgi_script_name;<br/> &nbsp; include &nbsp; &nbsp; &nbsp; fastcgi_params;<br/> }<br/>#取消FastCGI server部分location的注释,并要注意fastcgi_param行的参数,改为$document_root$fastcgi_script_name,或者使用绝对路径<br/><br/>二、配置php<br/><br/>vi /etc/php.ini &nbsp; #编辑<br/><br/>date.timezone= PRC &nbsp; &nbsp; #在946行 把前面的分号去掉，改为date.timezone = PRC<br/><br/>disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec<br/><br/>,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink<br/><br/>,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen<br/><br/>,disk_free_space,checkdnsrr,getservbyname,getservbyport,disk_total_space<br/><br/>,posix_ctermid,posix_get_last_error,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid<br/><br/>,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp<br/><br/>,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid<br/><br/>,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid<br/><br/>,posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<br/>#在386行 列出PHP可以禁用的函数，如果某些程序需要用到这个函数，可以删除，取消禁用。<br/>expose_php = Off &nbsp; &nbsp; &nbsp; &nbsp;#在432行 禁止显示php版本的信息<br/>magic_quotes_gpc = On &nbsp; #在745行 打开magic_quotes_gpc来防止SQL注入<br/>open_basedir = .:/tmp/ &nbsp;#在380行，设置表示允许访问当前目录(即PHP脚本文件所在之目录)和/tmp/目录,可以防止php木马跨站，如果改了之后安装程序有问题，可注销此行，或者直接写上程序目录路径/var/www/html/www.osyunwei.com/:/tmp/<br/><br/>:wq! #保存退出<br/><br/>(转载者语:magic_quotes_gpc我的配置中是不存在的,open_basedir没有看懂也就跳过了,这两条并没有影响我配置成功,隐患...暂时还没找到或者还没理解)<br/><br/>三、配置php-fpm<br/>cp /etc/php-fpm.d/www.conf &nbsp; /etc/php-fpm.d/www.confbak &nbsp; #备份原有配置文件<br/>vi /etc/php-fpm.d/www.conf &nbsp; #编辑<br/>user = nginx &nbsp; #修改用户为nginx<br/>group = nginx &nbsp; #修改组为nginx<br/><br/>/etc/init.d/mysqld restart &nbsp;#重启MySql<br/>/etc/init.d/nginx &nbsp;restart &nbsp;#重启nginx<br/>/etc/rc.d/init.d/php-fpm &nbsp;restart &nbsp;#重启php-fpm<br/>#############################################################################<br/>测试篇<br/>cd /usr/share/nginx/html/ &nbsp; #进入nginx默认网站根目录<br/>vi &nbsp;index.php &nbsp; #新建index.php文件<br/><br/><?php<br/> &nbsp; &nbsp; phpinfo();<br/><br/>?><br/><br/>:wq! #保存<br/><br/>chown nginx.nginx /usr/share/nginx/html/ -R &nbsp;#设置目录所有者<br/><br/>chmod 700 &nbsp;/usr/share/nginx/html/ -R &nbsp; #设置目录权限<br/><br/>在客户端浏览器输入服务器IP地址，可以看到相关的配置信息！<br/>##########################################################################<br/><br/>备注<br/><br/>nginx默认站点目录是：/usr/share/nginx/html/<br/>Mysql配置文件my.cnf路径：/etc/my.cnf <br/>Nginx配置文件nginx.conf路径：/etc/nginx/nginx.conf <br/>PHP配置文件php.ini路径： /etc/php.ini <br/>php-fpm配置文件php-fpm.conf路径：/etc/php-fpm.conf<br/>Tags - <a href="tag.php?tag=centos" rel="tag">centos</a> , <a href="tag.php?tag=php7.1" rel="tag">php7.1</a> , <a href="tag.php?tag=nginx" rel="tag">nginx</a> , <a href="tag.php?tag=mysql" rel="tag">mysql</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?445</link>
<title><![CDATA[centos换IP地址需要修改的文件]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[centos]]></category>
<pubDate>Tue, 16 Jun 2009 15:31:34 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?445</guid> 
<description>
<![CDATA[ 
	/etc/sysconfig/network<br/>/etc/sysconfig/network-scripts/ifcfg-eth0<br/>/etc/resolv.conf<br/>/etc/hosts<br/><br/>以下是我的设置<br/>/etc/sysconfig/network<br/>这里主要是指定了网关<br/>NETWORKING=yes <br/>NETWORKING_IPV6=no <br/>GATEWAY=192.168.1.1 <br/>HOSTNAME=localhost.localdomain<br/><br/>/etc/sysconfig/network-scripts/ifcfg-eth0<br/>这里主要指定IP获得方式（static），ip地址，子网掩码，网络类型<br/># Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express <br/>DEVICE=eth0 <br/>#BOOTPROTO=dhcp <br/>BOOTPROTO=static <br/>IPADDR=192.168.1.21 <br/>NETMASK=255.255.255.0 <br/>TYPE=Ethernet <br/>HWADDR=XX:XX:XX:XX:XX:XX <br/>ONBOOT=yes<br/>/etc/resolv.conf<br/><br/>指定DNS<br/>search localdomain <br/>nameserver 192.168.1.1<br/><br/>Tags - <a href="tag.php?tag=centos" rel="tag">centos</a> , <a href="tag.php?tag=ip" rel="tag">ip</a>
]]>
</description>
</item>
</channel>
</rss>