Centos下Yum安装PHP5.5,5.6
Centos下Yum安装PHP5.5,5.6
默认的版本太低了,手动安装有一些麻烦,想采用Yum安装的可以使用下面的方案:
创新互联于2013年成立,先为北京等服务建站,北京等地企业,进行企业商务咨询服务。为北京企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
1.检查当前安装的PHP包
yum list installed | grep php
如果有安装的PHP包,先删除他们
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-MySQL.x86_64 php-pdo.x86_64
2.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 上面搜索到的包即可
3.运行yum install
yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 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-fpm.x86_64 php56w-xml.x86_64 php56w-devel.x86_64
注:如果想升级到5.6把上面的55w换成56w就可以了。
文章题目:Centos下Yum安装PHP5.5,5.6
浏览地址:http://pwwzsj.com/article/gjdhdi.html