Redhat7.2配置免费yum源(简单五步轻松搞定)

步骤一:清除redhat原有的yum源

Redhat7.2配置免费yum源(简单五步轻松搞定)

步骤二:下载163的yum包

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm   wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

步骤三:安装下载的yum包

Redhat7.2配置免费yum源(简单五步轻松搞定)

步骤四创建文件/etc/yum.repos.d/rhel-Base.repo并写入(复制我的即可)

[base] name=CentOS-$releasever - Basebaseurl=http://mirrors.163.com/centos/7.2.1511/os/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7#released updates

[updates] name=CentOS-$releasever - Updatesbaseurl=http://mirrors.163.com/centos/7.2.1511/updates/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7

[extras] name=CentOS-$releasever - Extrasbaseurl=http://mirrors.163.com/centos/7.2.1511/extras//$basearch/ gpgcheck=1

gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus] name=CentOS-$releasever - Plusbaseurl=http://mirrors.163.com/centos/7.2.1511/centosplus//$basearch/ gpgcheck=1

enabled=0

步骤五:清理yum缓存和测试yum

Redhat7.2配置免费yum源(简单五步轻松搞定)

如图,正在更新,表示配置成功。










本文转自 河北李晓东  51CTO博客,原文链接:http://blog.51cto.com/lixiaodong2016/1791628,如需转载请自行联系原作者
上一篇:云原生时代 Devops 实操笔记


下一篇:阿里云新品发布会周刊第73期 丨 云原生DevOps解决方案发布会