Detailed explanation of RPM under Linux

xiaoxiao2021-03-06  78

In the Linux operating system, there is a system software package, its function is similar to the "Add / Remove Programs" inside Windows, but the function is much better than "add / delete the program", it is Red Hat Package Manager (refer to RPM) . This kit is first introduced by Red Hat, later by other Linux developers. Since it saves Linux users a lot of time, it is widely used in Linux installed and deleted software. Let's introduce you to its specific use.

1. We get a new software, before installation, you must first check what this package is there, suppose this file is: Linux-1.4-6.i368.rpm, we can use this command to view:

RPM -QPI Linux-1.4-6.i368.rpm

The system will list the details of this package, including how many files, file names, file size, create time, compilation date, etc.

2. All files listed above is not necessarily installed at the time of installation, just like the installation method of Windows is divided into typical, complete, custom, Linux will make you choose to install, at this time we can use this below The item will check which parts will be installed in the system to facilitate our choice:

RPM -QPL Linux-1.4-6.i368.rpm

3. After selecting the installation method, start installing. We can install this software with rpm-ivh linux-1.4-6.i368.rpm command. During the installation process, if the system prompts this software that has been installed or cannot be installed due to other reasons, if we do want to perform the installation command, you can add a parameter "-replacepkgs" after -IVH:

RPM-IVH -REPLACEPKGS Linux-1.4-6.i368.rpm

4. Sometimes we uninstall a installed software, just execute the RPM-E command.

5. Upgrading the low version software is a good way to improve its function, so that we can save the trouble of installing new software after uninstalling, to upgrade a software, you only need to execute the following command: rpm -UVH , Note: The file name at this time must be an upgrade patch to upgrade the software.

6. Another method of installing software can be embodied in Linux, and a performance of RMP powerful features: Install the software directly through the FTP site. When you find the site that you need, you can implement the following command, you can implement online installation, such as online installation Linux-1.4-6.i368.rpm, you can use the command:

rpm -i

ftp://ftp.pht.com/pub/linux/redhat/...-1.4-6.i368.rpm

7. In the process of using the computer, it will inevitably operate. If we accidentally delete several files and affect the performance of the system, how do you find a few files? RPM software package provides a lookup corrupted file Function, execute this command: rpm -va, Linux will list all corrupted files. You can fix it via Linux installation CD.

8. Lonux system, in the process of use, it is inevitable that we don't know, in Windows, we can quickly determine which folder belongs to a file in Linux in Linux, below This command line can help us quickly determine which package belongs to a file:

RPM-QF

9. When each package is installed in the Linux system, the installation file will be "reported" in the RPM database, so we need to query the properties of a software installed, just find it in this database. Note: The query command at this time is different from the query introduced by 1 and 8, which is only available for installed packages! Command format: rpm - parameter

转载请注明原文地址:https://www.9cbs.com/read-105075.html

New Post(0)