0%

Redhat使用CentOS的源

将Redhat的源更改为CentOS的源。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 下载CentOS的yum安装包
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

# 安装yum包
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

# 添加163的yum源
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -i ‘s/\$releasever/6/g’ CentOS6-Base-163.repo

# 清理yum缓存
yum clean all

# 将服务器上的软件包信息缓存到本地,以提高速度
yum makecache
处无为之事,行不言之教;作而弗始,生而弗有,为而弗恃,功成不居!

欢迎关注我的其它发布渠道