1.首先須要肯定系統架構
確認是x86_64以後,在網易的mirrors下載須要的rpm包:(若是是i386的話則須要到http://mirrors.163.com/centos/5/os/i386/CentOS/ 找到對應的軟件包)python
- 這裏主要針對那些沒有註冊redhat官方RHN的下面yum,因爲版本更新神馬的,可能會下載不到,能夠自行到網易上看看現行版本是多少,在下載
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/m2crypto-0.16-8.el5.x86_64.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
- wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
2.而後 安裝(升級)軟件包,並導入證書#rpm -Uvh *sql
- #rpm -import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
3.讓yum使用網易的源:centos
- #cd /etc/yum.repos.d/
- wget http://mirrors.163.com/.help/CentOS-Base-163.repo
4.使用緩存
- #vi CentOS-Base-163.repo
5.清理並從新生成yum緩存架構
- #yum clean metadata
- #yum makecache
- #yum -y upgrade