Wednesday, December 15, 2010

Installing and removing packages in RHEL

Tutorial on installing software packages in RHEL.

RPM stands for Red Hat Package Manager.With RPM, you can install, upgrade and uninstall software on Linux, as well as keep track of already installed RPM packages on your system. This can be done because RPM keeps a database of all software that was installed with it.

Installing a package:

rpm –ivh software-2.3.4.rpm

Upgrading a package:

rpm -Uvh software-2.3.4.rpm

Removing a package:
rpm -e software-2.3.4
Note that when installing software, you have to type the name of the RPM package. But when removing software, you don't have to type the whole name of the package that contained the software. You don't have to type the .rpm extension when removing software. Probably you don't have to type the version number, either, so this would do exactly the same as the above:
rpm -e software

Checking the packages installed:
The RPM database contains a list of all installed RPM packages on your system. You can query this database to get info of the packages on your Linux system. To query a single package, you use the -q option. For example, to query a package whose name is "software":
# rpm -q software
After issuing this command, rpm either tells you the version of the package, or that the package isn't installed.
If you want a list of all packages installed on your system, you'll have to query all with -qa:

rpm -qa

check the installed package from all list we use grep command

rpm -qa| grep -i software

Source:

No comments:

Post a Comment