Check if a package is installed:
$ rpm -qa | grep core openoffice.org-core-2.3.0-6.10.el5 coreutils-5.97-19.el5 policycoreutils-1.33.12-14.2.el5
List files in a certain package:
$ rpm -ql coreutils
List files in an RPM:
$ rpm -qlp apcupsd-3.14.7-1.x86_64.rpm
Manually install an rpm (as in, not using a repository with a package manager like yum):
$ sudo rpm -i VirtualBox-3.0.6_52128_rhel5-1.x86_64.rpm
Manually remove an rpm:
$ sudo rpm -e VirtualBox
upgrade a package
rpm -Uvh <package>
To unistall a package:
rpm -e <package name>
rpm -qa | grep -i <packagename>
An RPM is a pre-compiled package containing binaries and config files, etc which can be installed using rpm
or yum
command line tools. An SRPM or "source RPM" contains everything you need to rebuild a package. Sometimes a binary RPM is not available, you can build a custom RPM using the SRPM file.
Install rpmbuild
(from the rpm-build package):
$ sudo yum install rpm-build
Setup your home directory's environment:
$ cp -a /usr/src/redhat/ ~/rpmbuild $ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
Download an SRPM and build:
$ wget http://mirrors.geekymedia.com/centos/python26-2.6-geekymedia1.src.rpm $rpmbuild --rebuild EMBOSS-5.0.0-1.src.rpm
Install with:
$ sudo rpm -i ~/rpmbuild/RPMS/x86_64/python26-2.6-geekymedia1.x86_64.rpm
If upgrading, use
$ sudo rpm -U ~/rpmbuild/RPMS/x86_64/python26-2.6-geekymedia1.x86_64.rpm
If you have problems with GPG errors, add a line like this to your ~/.rpmmacros
:
%_gpg_name Alan
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://dag.linux.iastate.edu/dag/redhat/el5/en/$basearch/dag gpgcheck=1 enabled=1
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
Check more on this here http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
cd /etc/yum.repos.d wget http://rpm.pidgin.im/centos/pidgin.repo yum install pidgin