> CentOS > CentOS教程 >

Centos6.5升级PHP5.5

1、升级前检测当前PHP版本
# php -v
2、检查当前php的安装包
# yum list installed | grep php
3、检查当前PHP的安装包
由于默认的YUM源无法升级PHP,所以需要添加第三方的YUM源,此处用到webtatic。
因为是CentOS 6.5,所以用以下URL
# 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
4、查看YUM源上能用PHP安装包
# yum list php*
5、运行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 (责任编辑:IT)