Today is just empty to upgrade the PHP environment to version 5.6, first of all, my environment is the source code package compiled LNMP environment
First to the PHP official website to download a php5.6 tar package, put on top of the machine, start the installation, before installing the nginx,mysql,php-fpm are turned off,
Then delete or rename the/usr/local/php directory.
>Tar-ZXF php-5.6.8.Tar. GZ>CD php-5.6.8>./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_config-- With-pdo-mysql=/usr/local/mysql--with-iconv-dir--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir=/USR--enable-xml--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl-- Enable-mbregex--enable-fpm--enable-mbstring--with-mcrypt--enable-FTP--WITH-GD--enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-xmlrpc--enable-Zip--enable-soap--without-pear--with-gettext# #编译完成后, start the installation> Makezend_extra_libs='-liconv'> Make Install
When the installation is complete, it's almost ready, then copy the configuration file.
>cp php.ini-production/usr/local/php/etc/php.ini>cp /usr/local/php/etc/ Php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
Will/usr/local/php/etc/php-fpm.conf edited into the following PID=/usr/local/php/var/run/php-Fpm.piderror_log=/usr/local/php/var/log/php-Fpm.loglog_level=Notice[www]listen=/tmp/php-Cgi.socklisten.backlog= -1listen.allowed_clients=127.0.0.1Listen.owner=Wwwlisten.group=Wwwlisten.mode=0666User=Wwwgroup=wwwpm=Dynamicpm.max_children= -pm.start_servers=2pm.min_spare_servers=1pm.max_spare_servers=6Request_terminate_timeout= -Request_slowlog_timeout=0Slowlog= var/log/Slow.log//The configuration in Nginx also corresponds to the matching line.Location ~ [^/]\.php (/|$) {
Try_files $uri =404; Fastcgi_pass Unix:/tmp/php-Cgi.sock;
Fastcgi_index index.php; Include fastcgi.conf; }
Restart each service, OK
Upgrade PHP to 5.6 under CentOS