Tuesday, August 16, 2011

Add one more yum repository

Read yum.conf first.  Usually the path is /etc/yum.conf.
Understand where the cache and repository configuration file directory

The following examples use default locations

## add epel to the repo list
## see what is there before change
ls /var/cache/yum/*/*
cd yum.repos.d/
## copy contents from another configured host
sudo vi epel.repo
sudo yum clean all
## make sure it is empty
ls /var/cache/yum/*/*
sudo yum makecache
## see if the new repo epel is added
ls /var/cache/yum/*/*
## add GPG key for the new repo, also do copy-paste
sudo vi /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

If you are not sure about the name of RPM-GPG key, run rpm to install the package.  Towards the end, rpm will complain about missing the GPG key and prompt the file name for you.

No comments:

Post a Comment