rhel6.2 本地yum源搭建

1、创建文件local.repo

   

# cat /etc/yum.repos.d/local.repo
[rhel-source]
name=Red Hat Enterprise Linux LOCAL YUM
baseurl=file:///media/Server
enabled=1
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgkey=file:///media/RPM-GPG-KEY-redhat-release

2、把光盘挂载到/media目录下

   # mount /dev/cdrom /media/

   mount: block device /dev/sr0 is write-protected, mounting read-only

3、清除yum缓存文件

   # yum clean all

   Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

   Updating certificate-based repositories.

   Repository rhel-source is listed more than once in the configuration

   Cleaning repos: rhel-source

   Cleaning up Everything

4、然后就可以用yum进行安装了

本文出自 “桃花雪” 博客,谢绝转载!

你可能感兴趣的:(RHEL6.2,本地yum源搭建)