Tuesday, April 24, 2012
How To Make A Local Yum Repository Using The RHEL6 DVD
1. Insert RHEL 6 DVD and mount it.
2. Copy the Packages directory from the DVD on a local directory on your hard drive.
mkdir /RHEL6DVD
cp -R /media/RHEL_6.1\ x86_64\ Disc\ 1/Packages /RHEL6DVD/
3. Install createrepo
cd /RHEL6DVD/Packages
rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm createrepo-0.9.8-4.el6.noarch.rpm
4. Create new yum repository
vi /etc/yum.repos.d/RHEL6DVD.repo
[dvd]
name=RHEL6DVD
baseurl=file:///RHEL6DVD/Packages
enabled=1
gpgcheck=0
5. Update yum repository
yum update
6. To install new packages
cd /RHEL6DVD/Packages
yum install binutils-2.20.51.0.2-5.20.el6.x86_64
Subscribe to:
Post Comments (Atom)
i get the following - i'm obviously doing something wrong (I followed the instructions above to the "t")...
ReplyDelete[root@genesis /]# yum update
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
file:///RHEL6DVD/Packages/repodata/repomd.xml: [Errno 14] Could not open/read file:///RHEL6DVD/Packages/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: dvd. Please verify its path and try again
nevermind, i just copied that dir (repodata) from the DVD into the Packages dir on my local drive and it worked. I'm new to Linux.
DeleteThanks for the info.