Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts

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.

Find installed packages on Linux hosts

To find installed packages on a Redhat/CentOS Linux, use
rpm -qa | less

Once the package name is found, use this command to find more details
rpm -qil {package-name}

To find installed packages on a Debian (also Ubuntu) Linux, use
dpkg --list

Once the package name is found, use this command to find more details
dpkg -p {package-name}