编译安装PHP
[root@db software]# tar xfPHP-5.6.11.tar.gz
[root@db software]# cd PHP-5.6.11
[root@db PHP-5.6.11]# ./configure--prefix=/usr/local/PHP --with-MysqL=/usr/local/MysqL--with-MysqLi=/usr/local/MysqL/bin/MysqL_config --with-iconv-dir=/usr/local --with-openssl--enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir--with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath--enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex--enable-mbstring --with-gd --enable-gd-native-ttf --with-mhash --enable-pcntl--enable-sockets --with-mcrypt --with-ldap --with-xmlrpc --enable-zip--enable-soap --with-bz2 --with-config-file-path=/etc --enable-fpm--with-config-file-scan-dir=/etc/PHP.d --enable-maintainer-zts
[root@db PHP-5.6.11]#makeZEND_EXTRA_LIBS='-liconv'&&makeinstall
3)PHP的配置
[root@db PHP-5.6.11]# cpPHP.ini-production /etc/PHP.ini
[root@db PHP-5.6.11]# cp/usr/local/PHP/etc/PHP-fpm.conf.default /usr/local/PHP/etc/PHP-fpm.conf
[root@db PHP-5.6.11]# cpsapi/fpm/init.d.PHP-fpm /etc/rc.d/init.d/PHP-fpm
[root@db PHP-5.6.11]# chmod +x/etc/rc.d/init.d/PHP-fpm
[root@db PHP-5.6.11]# chkconfig --addPHP-fpm
[root@db PHP-5.6.11]# chkconfigPHP-fpm on
[root@db PHP-5.6.11]# service PHP-fpmstart
Starting PHP-fpm done
[root@db PHP-5.6.11]# ss -tnl
LISTEN 0 128 127.0.0.1:9000 *:*
LISTEN 0 50 *:3306 *:*
LISTEN 0 128 *:80
原文链接:https://www.f2er.com/centos/381123.html