Centos 6.6
环境:
php 5.6.29
nginx:1.10.2
1、配置安装包源
# CentOs 6.x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
# CentOs 7.X
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
2、安装
其中包括安装主包,fpm、opcache等包
yum -y install php56w.x86_64 php56w-devel php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64 php56w-fpm
3、设置开机启动
chkconfig php56-php-fpm on
service php56-php-fpm start
4、查看phpinfo
<?
phpinfo();
?>
参考 http://www.zuimoban.com/jiaocheng/linux/7128.html
# CentOs 6.x rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm # CentOs 7.X rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm