1, get the source code
Wget-o php.tar.gz Http://am1.php.net/get/php-5.6.27.tar.gz/from/this/mirror
Tar zxvf php.tar.gz
CD php-5.6.27
2, create users and groups
Groupadd PHP
Useradd php-g PHP
3, installation dependent
Yum install libxml2-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel
4, compiling and installing
./configure--prefix=/usr/local/php--enable-opcache--enable-fpm--enable-sockets--enable-mysqlnd-- Enable-gd-native-ttf--with-fpm-user=php--with-fpm-group=php--with-pdo-mysql--with-gd--with-jpeg-dir=/usr/lib/- With-freetype-dir=/usr/lib--with-curl
Make && make install
5, self-priming script
CP SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM
chmod 755/etc/init.d/php-fpm
Chkconfig--add PHP-FPM
Chkconfig PHP-FPM on
6, configuration
Phpconf.zip
Copy to/usr/local/php/lib/php.ini
Copy to/usr/local/php/etc/php-fpm.conf
Http://files.cnblogs.com/files/mysic/phpconf.zip
PHP Compilation Installation