The RPM Package method has become increasingly popular for software release. The main reason is that this software release method is convenient for users to install, upgrade, and delete from the system. In addition, RPM also allows you to have more
The RPM Package method has become increasingly popular for software release. The main reason is that this software release method is convenient for users to install, upgrade, and delete from the system. In addition, RPM also allows you to have more management functions for the software installed in the system. for example, you can check which software packages have been installed in the system and what files have been installed in these software packages, where are these files stored.
Here I will provide a simple Getting started manual for beginners to view and quickly use RPM. these RPM commands are the most commonly used, and you can skip these complicated features for the moment, check man's manual when necessary. let's get started.
◆ The Command format used to install an RPM package is as follows:
# Rpm-ivh package. ix86.rpm
In the above command, package is a hypothetical name, ix86 is the meaning of this package for specific CPU optimization, for example, package may be a ldconfig-1.9.5-14, ix86 is like i386.
The "-I" parameter indicates that the package is to be installed, while the "-v" parameter increases the output information, "-h" indicates that hashes is displayed as a progress bar during the installation process.
The above is all about installing an RPM Package, which is very simple and easy to use. Of course, if you encounter some package dependency problems during the installation process, it will be a little troublesome. The package dependency problem is that the package you are installing requires the support of other packages to work normally. A common problem is that the installed package requires a specific version of a software or function library to work properly. In this case, you can install or upgrade the dependent software package, and then continue to install the software package you need to install.
Next we will look at some other very useful rpm commands.
◆ Query RPM package content:
If you want to see which files are installed after an RPM Package is installed, you can use this command:
# Rpm-ql packagename
This packagename is the name of the package you want to query, such as the ldconfig-1.9.5-14mdk; and the "-p" parameter indicates to query the package database to see if the package has been installed; the "-l" parameter lists the complete paths of all installed files in the queried package.
The following is an example:
[Wh @ infonet wh] $ rpm-ql ldconfig-1.9.5-14mdk/sbin/ldconfig/usr/doc/ldconfig-1.9.5/usr/doc/ldconfig-1.9.5/README
◆ Delete a specific RPM Package
In addition to querying the information of a software package, you can also conveniently delete a specific RPM software package. The command parameter used is "-e", in the following format:
# Rpm-e packagename
"-E" indicates that the specific packagename is deleted.
It is worth noting that the rpm Management mechanism does not allow you to delete a software package if it is also dependent on other software packages. Once you delete this software package, other software packages dependent on it will not work properly.
◆ Upgrade an existing rpm Package
I have learned how to install and delete an rpm Package. let's see how to upgrade an existing rpm package. The upgrade is similar to the installation. you can refer to the following command:
# Rpm-Uvh package. ix86.rpm
The "-U" parameter indicates an upgrade. the values of "v" and "h" are the same as those described above.
At this point, we have learned how to install, delete, and upgrade a software released using rpm.