今天晚上帮同窗升级了一下他Centos服务器的php和mysql,google许久终于搞定,记录一下:php
运行命令:java
wget http://syslogserver.googlecode.com/files/epel-release-5-3.noarch.rpm wget http://centoscn.googlecode.com/files/remi-release-5-7.el5.remi.noarch.rpm sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
上面两处下载地址可能随时间会有变化,具体能够上http://code.google.com/p/syslogserver/downloads/list 和 http://code.google.com/p/centoscn/downloads/list 查看mysql
而后运行命令sql
sudo vi /etc/yum.repos.d/remi.repo
在这个文件的最后增长一行:shell
priority=1
保存退出centos
同理处理/etc/yum.repos.d/epel.repo和/etc/yum.repos.d/epel-testing.repo两个文件 服务器
再运行下面命令便可升级。post
sudo yum --enablerepo=remi update
今天又发现把PHP升级到5.3的,又跟论坛原来的CMS系统不兼容,只好退之再折腾成PHP5.2。google方法以下:google
首先先将如下地址导入。 url
再排除php5.3的包,咱们只须要php5.2的
sudo vi /etc/yum.conf
在文档的最后加入
exclude=*5.3.*(安装结束后可去掉,)
再打开CentOS-Base.repo
sudo vi /etc/yum.repos.d/CentOS-Base.repo
在文档的最后加入以下内容:
[utterramblings] name=Jason's Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
最后执行升级命令