阿俊de坑

一个漂泊的小孩儿

导航

CentOS服务器单独升级 php5.1 到 5.2版本

Posted on 2014-08-27 20:09  阿俊de坑  阅读(191)  评论(0编辑  收藏  举报

引言:使用CentOS 5.5系统的朋友们都知道,yum默认安装的php版本为php5.1,我们要想使用最新的稳定版本(php5.2.x系列),就必须编译安装。
下面教大家如何使用yum来选择安装自己需要的php版本!
以下操作均在终端命令行下进行!
rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo
yum --enablerepo=webtatic list php #发现有php5.2 和 php5.3可以升级
yum --enablerepo=webtatic --exclude=php*5.3* list php #查看php5.2软件包
yum --enablerepo=webtatic --exclude=php*5.3* update -y php #安装php5.2版本
注:选项--exclude=php*5.3* #禁止升级为php5.3版本