CnetOS使用163 yum源
2018-06-25 本文已影响0人
糊涂蟲
1、查看系统版本
[root@hadoop003 ~]# cd /etc/yum.repos.d/
[root@hadoop003 yum.repos.d]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
2、备份/etc/yum.repos.d/CentOS-Base.repo
[root@hadoop003 yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3、下载对应版本repo文件, 放入/etc/yum.repos.d/
[root@hadoop003 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
4、运行以下命令生成缓存
yum clean all
yum makecache