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/* 在执行相应配置
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 socket 初步
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Centos6 编译安装Python
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户