您的位置:首页 > 其它

rhel6添加本地yum

2011-08-25 13:47 232 查看
#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

本文出自 “no brothers,no linux” 博客,请务必保留此出处http://tonychiu.blog.51cto.com/656605/648545
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: