How to Manually Add A Repository To Yum.
Some 3rd part repositories have their own rpm that you can use.
Here is how to do it manually in Cent OS.
For example if you have a repository that exists at subdomain.domain.com.
Note: Replace subdomain, domain, and com with your link.
# cd /etc/yum.repos.d
Add a file that points to the repository name and location.
# nano subdomain
Now type the following in the new file (or copy/paste the following changing the names and locations to the correct repository):
[subdomain]
name=Subdomain for RHEL/ CentOS $releasever – $basearch
baseurl=http://subdomain.domain.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://subdomain.domain.com/RPM-GPG-KEY.txt
Save the changes and then exit out of nano.
Now import the PGP keys for the repository.
# rpm –import http://subdomain.domain.com/RPM-GPG-KEY.txt
Now run your update and upgrade processes.
# yum update
# yum upgrade
And you are now ready to install packages from the new repository.

April 16th, 2009 at 11:17 am
rpm –import http://subdomain.domain.com/RPM-GPG-KEY.txt
use ‘–’ instead of ‘-’
June 16th, 2009 at 11:11 am
Hi! I like your srticle and I would like very much to read some more information on this issue. Will you post some more?
July 6th, 2009 at 8:24 pm
I’m glad that after surfing the web for uch a long time I have found out this information. I’m really lucky.
July 21st, 2009 at 9:45 pm
Great post! I’ll subscribe right now wth my feedreader software!
April 16th, 2010 at 11:03 am
It is a pity, that I can not participate in discussion now. I do not own the necessary information. But this theme me very much interests.