PHP脚本 yum -y install libxml2-devel lzip2-devel libcurl-devel libmcrypt-devel openssl-devel bzip2-devel tar xf /usr/local/src/libmcrypt-2.5.7.tar.gz tar xf /usr/local/src/php-5.6.27.tar.gz cd /usr/local/src/libmcrypt-2.5.7/ ./configure --prefix=/usr/local/libmcrypt && make && make install cd /usr/local/src/php-5.6.27/ ./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-fpm --enable-sockets --enable-sysvshm --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-mhash --with-mcrypt=/usr/local/libmcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts make && make install cp /usr/local/src/php-5.6.27/php.ini-production /etc/php.ini cp /usr/local/src/php-5.6.27/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod +x /etc/init.d/php-fpm chkconfig --add php-fpm && chkconfig php-fpm on cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf sed -i '25c pid = run/php-fpm.pid' /usr/local/php/etc/php-fpm.conf sed -i '164c listen = 192.168.1.129:9000' /usr/local/php/etc/php-fpm.conf sed -i '235c pm.max_children = 50' /usr/local/php/etc/php-fpm.conf sed -i '240c pm.start_servers = 5' /usr/local/php/etc/php-fpm.conf sed -i '245c pm.min_spare_servers = 5' usr/local/php/etc/php-fpm.conf sed -i '250c pm.max_spare_servers = 35' usr/local/php/etc/php-fpm.conf systemctl dameon-reload systemctl start php-fpm firewall-cmd --permanent --add-port=9000/tcp firewall-cmd --reload netstat -anpt | grep php-fpm