首页 > 其他 > 详细

redhat7.3配置163 yum源

时间:2017-06-27 10:39:18      阅读:272      评论:0      收藏:0      [点我收藏+]

  redhat 的更新包只对注册的用户生效,所以我们需要自己手动更改成CentOS 的更新包,CentOS几乎和redhat是一样的,所以无需担心软件包是否可安装,安装之后是否有问题。

1、首先删除redhat原有的yum ,因为redhat 原本的yum 没有注册为redhat用户是用不了的。

rpm -aq|grep yum|xargs rpm -e --nodeps
rpm -aq|grep python-iniparse|xargs rpm -e --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/python-iniparse-0.4-9.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
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
3、安装下载的rpm包
rpm -ivh *.rpm

4、创建文件/etc/yum.repos.d/rhel-debuginfo.repo并写入

[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

6、 yum clean all
7、 yum update 测试。

8、 安装 epel 源

yum install epel-release

redhat7.3配置163 yum源

原文:http://www.cnblogs.com/JohnLiang/p/7083698.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!