您的位置:首页 > 理论基础 > 计算机网络

RHEL系统部署网络yum源

2016-04-27 15:45 357 查看
配置网络yum源
RHEL系统本身光盘做成的yum源所提供的软件包有限,在实际使用过程中经常会出现缺包的现象,本文中以CentOS源作为替代,CentOS的软件包和RHEL系统是互相兼容的,而且CentOS公司已被RHEL收购,所以不会出现兼容性的问题,可以放心使用

RHEL6.5

[root@xuegod163~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
[root@xuegod163~]# sed -i 's/$releasever/6.7/g' /etc/yum.repos.d/CentOS-Base.repo

[root@xuegod163~]# yum clean all

[root@xuegod163~]# 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

注:配置网络yum时,为了避免之前的yum文件相互冲突,建议删除之间的配置文件

可直接执行rm -rf/etc/yum.repos.d/* 在执行相应配置
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux rhel yum