虚位以待(AD)
虚位以待(AD)
首页 > 操作系统 > RedHat/Centos > rhel6添加本地yum

rhel6添加本地yum
类别:RedHat/Centos   作者:码皇   来源:互联网   点击:

setenforce 0 mkdir yum mount -o loop dev cdrom mnt cp -ar mnt * yum vi etc yum repos d local repo [local] name=Red Hat Enterprise Linux update6 baseurl=file: yum gpgche


#setenforce 0
 
#mkdir /yum
 
#mount -o loop /dev/cdrom  /mnt
 
#cp -ar /mnt/*  /yum

 
#vi /etc/yum.repos.d/local.repo
 
  [local]
  name=Red Hat Enterprise Linux update6
  baseurl=file:///yum/
  gpgcheck=0
  enabled=1
#mv /etc/yum.repos.d/packagekit-media.repo  /etc/yum.repos.d/packagekit-media.repo.bk 或者直接删除,否则yumlist会报错如下:
rhel6 Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again
#yum clean all
测试
[root@rhel6 ~]# yum repolist
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
repo id                 repo name                                         status
local                   Red Hat Enterprise Linux update6                  3,391
repolist: 3,391
 
 
本文出自 “学习linux” 博客

相关热词搜索: rhel6