|
Linux RPM Red Hat's Package Manager |
| Home | Peer to Peer | CompTIA N+ | CCNA | MCSE | MCITP | RHCE | Interview | Tips n Tricks |
Linux RPM Red Hat's Package ManagerIn this article from our series of RHCE exam guide we will learn how we can install or remove package in linux. RPM is a powerful software manager. It can install, remove, query, and verify the software on your system. Rpm is more than a Red Hat specific tool. Many other modern distributions, such as Caldera and SuSe, use rpm too. In this article we will by no means provide comprehensive coverage of rpm. Instead, we will highlight the subset of options we have found useful in the real RHCE Exam. Querying Your SystemThe first thing you should do is look and sees what software you have installed on your system. #rpm -qa | more
In case you are unfamiliar with the command line, let me break this command down. rpm (-) -q a following a in the -qa is a modifier for the query option which tells rpm you want to list all the packages. | more package infoRpm is smart enough to use the package name without the version info.For example see in image
The package info is split into three pieces.
Installing New SoftwareYou can install rpm from any location where you have it. In our example we will install it from RHEL dvd. Command to install package is #rpm -ivh <package name>
-i is the install switch. A variation on an install is an upgrade. An upgrade is used when you want to put a more recent package in place of something that is currently installed . The upgrade syntax is exactly the same as an install, but you replace the -i with a -U. (Notice it is a capital U) If a new version of telnet-server comes out, rpm will take care of removing all the old pieces when you upgrade.
Sometimes a package is not removed cleanly. Here is the situation, you try to install something and rpm says its already installed. You then try to remove it, and rpm says that is not installed. What can you do? #rpm -ivh --force package-1.0-5.i386.rpm The --force option is your solution.It will install rpm in any conditions. Dependencies are generally regarded as a good thing. Rpm has the capability to know if software has such prerequisites. In the real world, not everything on your system can always be from an rpm. So if you want to install rpm without checking dependencies you can use --nodeps options #rpm -ivh --nodeps package-1.0-5.i386.rpm
Removing Unwanted SoftwareA major advantage to a packaging system like rpm is its ease to erase software. #rpm -e telnet-server
|
|||||
|
|
|
|