This Tip Show Exactly and Step-by-Step How-to Enabling YUM Package Manager on RHEL 5-6 without a RedHat Subscription by the Installation DVD:
- If you Do Not Have a RHEL Subscription But you Have the Installation DVD of the Release then you will need to Make a Local Repository for Yum…
(If your Yum is Just Working on RHEL SKIP this Point)
This Process has been Performed on a RHEL Beta 2 Release.First you Need to Connect the DVD or DVD.iso to the Virtual Machine.
Then you Make the Local Repo Directories and you Copy the Packages Contained into the DVD Into a Location Reachable by Apache and for Default:- Make the Repo Directory
su mkdir -p /var/www/html/yum/base-pkg
- Copy the Packages Contained on the DVD Into Target:
cp /media/RHEL*/Packages/* /var/www/html/yum/base-pkg
Download and Install the createrepo Package with Dependencies
From: Packages Mirror
Grab: createrepo-version.el6.rpm, deltarpm-version.el6.rpm and python-deltarpm-version.el6.rpm
Install first Dependencies and After Createrepo:rpm -ivh deltarpm-version.el6.rpm python-deltarpm-version.el6.rpm rpm -ivh createrepo-version.el6.rpm
Create the Local Repository with:
createrepo /var/www/html/yum/base-pkg
After Successful Setup the base-pkg Dir Content Should Show:
ls -l /var/www/html/yum/base-pkg/repodata/ -rw-r--r-- 1 root root 2227275 2010-02-18 11:51 filelists.xml.gz -rw-r--r-- 1 root root 6487453 2010-02-18 11:51 other.xml.gz -rw-r--r-- 1 root root 747714 2010-02-18 11:51 primary.xml.gz -rw-r--r-- 1 root root 951 2010-02-18 11:51 repomd.xml
Create the Yum Configuration your Repository File
nano /etc/yum.repos.d/mylocal.repo
Insert Something like:
[base-local] name=RHEL $releasever - $basearch failovermethod=priority baseurl=http://127.0.0.1/yum/base-pkg/ enabled=1 gpgcheck=0
You Need to Start Apache Before you Repository is Usable.
Here I show you the Simplest Method on a RHEL Desktop.
Open the Services Utility:
Enable and Connect the Httpd Service:
Instead if You Manage a Server and Not a Desktop I Presume You Should be Already Able To Start Apache…
After you can Check if Yum is Working with the New Setup by:yum list | less
The Output Should Show your New Local Repository 🙂
- Make the Repo Directory