Using RPM

Q. How do you view files in a given package?
A. $ rpm -q –filesbypkg

Ever wonder which package a file is part of? Try this:

/bin/rpm -qf
$ /bin/rpm -qf /usr/bin/whois

How do you extract files in an RPM without installing the RPM? The below will extract in your ‘pwd’ the files of the RPM.

rpm2cpio rpmname.rpm | cpio -dimv

How do you install Extra Packages for Enterprise Linux (or EPEL) on CentOS 6.x?

sudo wget
sudo wget
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
sudo vim /etc/yum.repos.d/remi.repo 
Enable the remi repo by changing the 0 to 1 for enabled in remi.

For further reference visit