码迷,mamicode.com
首页 > 其他好文 > 详细

RHEL7.3-yum源配置

时间:2017-03-07 14:28:14      阅读:738      评论:0      收藏:0      [点我收藏+]

标签:rhel7.3-yum源配置   yum   rhel7.3   

1.首先删除redhat原有的yum ,因为redhat 原本的yum 没有注册为redhat用户是用不了的,输入如下命令行:

rpm -e yum --nodeps


2.下载163的yum 安装

wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm

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

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

wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm


3.安装下载的rpm包

rpm -ivh *.rpm


4.编辑文件并写入

[base]

name=CentOS-$releasever - Base

baseurl=http://mirrors.163.com/centos/7.3.1611/os/$basearch/

gpgcheck=1

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

#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=http://mirrors.163.com/centos/7.3.1611/updates/$basearch/

gpgcheck=1

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

[extras]

name=CentOS-$releasever - Extras

baseurl=http://mirrors.163.com/centos/7.3.1611/extras//$basearch/

gpgcheck=1

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

[centosplus]

name=CentOS-$releasever - Plus

baseurl=http://mirrors.163.com/centos/7.3.1611/centosplus//$basearch/

gpgcheck=1

enabled=0


5.清除yum缓存,执行

yum clean all

现在可以安装软件进行测试了


本文出自 “我是一只小小鱼” 博客,请务必保留此出处http://kevinfish.blog.51cto.com/1183772/1903790

RHEL7.3-yum源配置

标签:rhel7.3-yum源配置   yum   rhel7.3   

原文地址:http://kevinfish.blog.51cto.com/1183772/1903790

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!