今天晚上幫同窗升級了一下他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
最後執行升級命令