朋友给过来的服务器 是 阿里云的rh 5.4 可恶没有yum 可用 ,于是 哈哈
1.删除 RHEL 自带的 yum
rpm -aq|grep yum|xargs rpm -e --nodeps
2.换上centos yum
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
rpm -ivh yum-* ;rpm -ivh python-iniparse-0.2.3-6.el5.noarch.rpm
cd /etc/yum.repos.d/
wget -c http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
#因为现在最新的5系列是 5.9 其实的已经没源了呢
vi /etc/yum.repos.d/CentOS-Base-sohu.repo
一定要将其中所有mirrorlist注释掉(加#),
#baseurl替换成5中的格式
%s/$releasever/5.9/g
import key
rpm --import http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
另外有一种就不改变原来的 ,而是添加免费的yum 源 ,DAG就是比较常用的一个
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
详情请看http://dag.wieers.com/rpm/FAQ.php#B
http://www.douban.com/note/164175234/
http://blog.csdn.net/neomc/article/details/6334456
http://gehailong.blog.51cto.com/765312/610127
在阿里云的云服务器上:Linux服务器安装-Apache/nginx+mysql+PHP
http://blog.csdn.net/song_shi_chao/article/details/8605119
http://help.aliyun.com/manual?spm=0.0.0.116.1yaIw8&helpId=129
阿里云LINUX主机安装从初始环境到完成配置全过程
http://sefcertyu.iteye.com/blog/1709853