Centos6.8安装php5.6
Posted 叫我星宇
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos6.8安装php5.6相关的知识,希望对你有一定的参考价值。
- 检查当前安装的php包
yum list installed | grep php
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64
- 配置安装包源:
# Centos 5.X rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm # 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
rpm -qa | grep webstatic rpm -e [上面搜索到的包即可]
- 执行安装
yum -y install php56w.x86_64 yum -y --enablerepo=webtatic install php56w-devel yum -y install php56w-pdo 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
- 安装PHP FPM
yum -y install php56w-fpm #设置php-fpm开机启动 chkconfig php-fpm on #启动php-fpm /etc/init.d/php-fpm start
以上是关于Centos6.8安装php5.6的主要内容,如果未能解决你的问题,请参考以下文章