centos 5.4 yum升级php到5.3
公司新买的一台服务器,搭建环境是lamp,要求php是5.3的版本,因为我是yum安装的环境,所以只能找yum来对php升级,如果你们只想把php升级到5.2,可以看centos yum升级php和mysql这篇文章.
系统:centos 5.4
1.先查看当前php版本
2.升级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
webtatic.repo里的内容:
[webtatic]
name=Webtatic Repository $releasever - $basearch
#baseurl=http://repo.webtatic.com/yum/centos/5/$basearch/
mirrorlist=http://repo.webtatic.com/yum/centos/5/$basearch/mirrorlist
enabled=0
gpgcheck=1
gpgkey=http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
[webtatic-debuginfo]
name=Webtatic Repository $releasever - $basearch - Debug
#baseurl=http://repo.webtatic.com/yum/centos/5/$basearch/debug/
mirrorlist=http://repo.webtatic.com/yum/centos/5/$basearch/debug/mirrorlist
enabled=0
gpgcheck=1
gpgkey=http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
[webtatic-source]
name=Webtatic Repository $releasever - $basearch - Source
#baseurl=http://repo.webtatic.com/yum/centos/5/SRPMS/
mirrorlist=http://repo.webtatic.com/yum/centos/5/SRPMS/mirrorlist
enabled=0
gpgcheck=1
gpgkey=http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
yum --enablerepo=webtatic update php mysql
这里说句升级php最好是连mysql一起升级,好了可以看到php已经升级成5.3.10,好了就到这里.
输入:wget -P .........
--2014-09-27 09:31:28-- xxxxx:......yum/webtatic.repo
Resolving ....... 162.243.228.22
Connecting to .......|162.243.228.22|:80... connected.
..... request sent, awaiting response... 404 Not Found
2014-09-27 09:31:28 ERROR 404: Not Found.
remi可谓专业人士了