1.下载PHP 源码并解压
wget http://cn2.php.net/distributions/php-5.6.13.tar.bz2
tar jxvf php-5.6.13.tar.bz2
sudo yum install libxml2-devel openssl-devel gd-devel libcurl-devel
3.配置
./configure --enable-fpm --enable-mbstring --with-pdo-mysql --with-openssl --with-gd --with-mcrypt --with-curl --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php.d
4.编译
make
5.安装
sudo make install
默认情况下,php的相关文件会安装到/usr/local目录的bin、lib、include、php/man、etc目录。