How to Install RPM in Linux
Well, this is not one of the easy problems or queries in Linux. How to install RPM in Linux, though not a tough job to do, needs a little understanding of the subject. Read on to know more.

What is RPM Package Manager?
RPM basically stands for two things. It stands for a software packaged in this format, as well as for a software package file format. RPM was originally abbreviated for Red Hat Package Manager. However, it now stands for RPM Package Manager, as it is now used by many other Linux distributions and also by operating systems like Novell NetWare and IBM's AIX. A single command allows the user to install the entire package and delete the same. There are various other features that RPM offers. Let us now take a look into all these options, for not only installing RPM files in Linux, but also for trying out the other options.
All About RPM
So, let us start off with answering the question, how to install RPM packages in Linux. To install an RPM package, all that you need to do is type rpm, followed by the package name. However, typing the command followed by the package name will not simply install a package. It is very useful command and can be used for not only installing an RPM package, but also for upgrading and removing installed packages and a lot of other applications. So, let us take a look at the RPM command along with the different arguments that can be used along with it.
- rpm -ivh rpm_file, (where rpm_file is the name of the rpm file) is used for installing an RPM package.
- rpm -Uvh rpm_file (where rpm_file is the name of the rpm file) is used for upgrading an existing package.
- rpm -qa is used for displaying the list of installed packages.
- If you want to view the complete information about an installed package, simply type rpm -qi packagename (where packagename stands for the name of the package whose information you want to view).
- If you want to display the list of configuration files for a package then simply type rpm -qc packagename and for viewing which package a command belongs to, type rpm -qcf (path to the file).
- rpm -qa --last will display the list of recently installed RPMs.
- Now, let's come to the dependencies part. Many packages may have certain dependencies, which are required for their smooth functioning. rpm -qpR rpm_file or rpm -qR package_name can be used for checking out the dependencies of a particular package.
- To remove an installed package, type rpm -ev package_name. This command will also check for dependencies.
- If you do not want to check for the dependencies, simply type rpm -ev --nodeps package_name.
Let us now take a look at some of the other RPM options.
- --excludedocs: Used for not installing any documents during the installation.
- --includedocs: Install documents during installation.
- --replacepkgs: This command is used to replace a package with a fresh copy of the same.
- --force: If there are any package and file conflicts, this command can be used to ignore the same.
- --percent: Used to display the percentage of installation.
Well, it's alright with the RPM command. But then you might find difficulty to install RPM dependencies, which need to be installed before the original software. There is an option to use Yum, a package manager. The process for using Yum is as follows.
- First of all, you need to download the yum source code and store it at a specific directory.
- Now move to the directory where you have downloaded the package with the cd path to package command.
- Now type tar -xvf yum(versionno), where versionno is the version number of the yum package you will be installing. Tar command is used to unzip the package. Once the packages are unzipped you can move over to the unzipped directory using the cd yum(versionno) command.
- Now type the command ./configure. This command will configure the makefile for this particular software.
- Now, you can type the make command to create binaries.
- After all this is done, simply type make install to install the software.
So this was all about, how to use the RPM command. There are a lot more arguments that you can simply check out with the --help option. Here in this article, not only the most common questions during software installation in Linux, how to install RPM in Linux have been answered, but I have also tried to provide you with all the other options that you can try out with the same command.
Like This Article?
Follow:

Post Comment


