Friday, July 17, 2009

Add repository for YUM

While using yum in RHEL, it used to say :

Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package sendmail-cf available.
Nothing to do

I then thought, why not just change the repository for my YUM.. it's as easy as 123..

step 1. Go to /etc/yum.repos.d directory
step2. Create a file e.g myrepos
step3. Add the section header e.g [myrepos]
step4. Add the URL for the rpm repos; your final repos might look like this
#vi /etc/yum.repos.d/myrepos
[myrepos]
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel5/i386/
gpgcheck=0
step5. If you've done that, the rest is simple. Upgrade your system by doing:
yum update
You can add new software by typing:
yum install
Or update installed software:
yum update
Or search for software in the local repository meta-data:
yum search
Or simply list all available software:
yum list available
From time to time you may want to save some diskspace:
yum clean

for more: http://dag.wieers.com/rpm/FAQ.php#B