I. Download and decompression PHP5.6.9
wget http://cn2.php.net/distributions/php-5.6.9.tar.gz
tar-zxvf php-5.6.9.tar.gz
cd php-5.6.9
two. Compile PHP5.6.9
Compile the deployment (throw the above compilation script directly into the current SSH to perform the compilation.) )
./configure--prefix=/usr/local/php--enable-fpm--with-fpm-user=www--with-fpm-group=www--with-config-file-path=/ etc--with-config-file-scan-dir=/etc/php.d--with-openssl--with-zlib --with-curl--enable-ftp--WITH-GD-- With-jpeg-dir--with-png-dir--with-freetype-dir--enable-gd-native-ttf--enable-mbstring--enable-zip /usr/local/libiconv--with-mysql=/usr/local/mysql--without-pear--disable-fileinfo--enable-opcache
Perform compilation (The process is longer and requires patience)
Make make
Install
three. Modify PHP configuration file modification/usr/local/php/etc/php-fpm.conf
Add Script Authorization
Listen.owner = www
listen.group = www
listen.mode = 0660
Modify/usr/local/php/etc/php-fpm-template.conf
Add Script Authorization
Listen.owner = www
listen.group = www
listen.mode = 0660
If an existing site
If you have a site in the AMH panel environment, you will need to add the 3-line script in the/USR/LOCAL/PHP/ETC/FPM directory, with the. conf file with the site's domain name marked. If there is no site does not need, because the template we added, the added new site will be automatically added.
Listen.owner = www
listen.group = www
listen.mode = 0660
four. Restart AMH and solve problems
There is a flaw in the successful upgrade, if we restart the VPS, Nginx is not effective, we need to restart a amh or restart Nginx before it can take effect.
/etc/init.d/amh-start
amh nginx Restart
Reference links