centos系列教程之一 更改yum源為aliyun
2016-10-21 02:32:03
11527

【centos系列教程之一】更改yum源為aliyun
[1] 首先備份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[2] 進(jìn)入yum源配置文件所在文件夾
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
[3] 下載aliyun的yum源配置文件,放入/etc/yum.repos.d/(操作前請(qǐng)做好相應(yīng)備份)
[root@localhost yum.repos.d]# wget http://www.tjdsmy.cn/repo/Centos-6.repo
如果下載163的yum源配置文件
[root@localhost yum.repos.d]# wget http://www.tjdsmy.cn/.help/CentOS6-Base-163.repo
[4] 運(yùn)行yum makecache生成緩存
[root@localhost yum.repos.d]# yum makecache
[5] 更新系統(tǒng)
[root@localhost yum.repos.d]# yum -y update