Thursday, June 17, 2010

Resurrected Posts: Playing with RPM

RPM (Redhat Package Manager) is the basic packaging for most all packages found for RHEL and its clones. .

list of basic command

to install package:
rpm -Uvh <package name> # note: package can be an ftp url
to erase package:
rpm -e <package name> # note: if there are 2 packages with the same name try placing either a ".i386" or a ".x86_64". This is usually the case and it occurs when both the 64bit and 32bit versions are both installed
to query the rpm database:
rpm -q <package name> # note this will only match exact package names
the better way:
rpm -qa | grep -i <package name> 
rebuild the rpm database:
rpmdb --rebuilddb
build from srpm (src rpm): # note: this is the quick and dirty method
rpm -ivh <package name>.src.rpm
cd /usr/src/.../SPECS
rpmbuild -bb <package name>.spec
cd /usr/src/.../RPMS
rpm -Uvh <package name>.ARCH.rpm
# note: this is the quicker and dirtier method
rpmbuild --rebuild <package name>.src.rpm

No comments: