配置网络yum源

配置网络yum源

配置网络yum源方法: 

RHEL6.5

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

[root@localhost ~]# sed -i  's/$releasever/6/g' /etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# yum clean all

[root@localhost ~]# yum list

 

RHEL7.2

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

[root@localhost ~]# sed -i  's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# yum clean all

[root@localhost ~]# yum list

posted on 2017-09-19 10:24  法海降妖  阅读(93)  评论(0编辑  收藏  举报