redhat7.2配置本地yum源

1.redhat 7.2 配置yum;

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

 rpm -aq|grep yum|xargs rpm -e --nodeps 

rpm -aq|grep python-iniparse|xargs rpm -e --nodeps

b。 从CentOS7.2 镜像里找到这4个包,rpm -ivh * 安装

yum-3.4.3-132.el7.centos.0.1.noarch.rpm

python-iniparse-0.4-9.el7.noarch.rpm

yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

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

[base]

name=CentOS-$releasever - Base

baseurl=file:///media/

enabled=1

gpgcheck=0

d。 mount CentOS7.2的源到 /media目录下

猜你喜欢

转载自www.cnblogs.com/zhanlibing/p/9212407.html