Linux system rpm command parameters using the detailed

Source: Internet
Author: User
Tags command line ftp ftp site hash port number linux

In the Linux operating system, there is a system package that functions like "Add/Remove Programs" in Windows, but features are much better than "Add/Remove Programs", which is red Hat Package Manager (RPM). The toolkit was first launched by Red Hat and later borrowed by other Linux developers. Because it saves a lot of time for Linux users, it is widely used to install and remove software under Linux. Here is a description of its specific use of the method.

[Root@ford/root] # Rpm-qa | More

1. We have a new software, before the installation, we usually have to look at the contents of the software package, assuming that this file is: linux-1.4-6.i368.rpm, we can use this command to view:

Rpm-qpi linux-1.4-6.i368.rpm

Details of the package will be listed, including how many files, file names, file sizes, creation time, compile date, and so on.

2. All of the files listed above are not necessarily installed when installed, just as the installation of a program in Windows is typical, complete, and customized, Linux will also allow you to choose the installation method, at this time we can use the following command to see what the package will be installed in the system, to facilitate our choice:

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

3. After selecting the installation mode, start the installation. We can install this software with the RPM-IVH linux-1.4-6.i368.rpm command. During the installation process, if you are prompted to install the software or for other reasons, but if we do want to execute the installation command, we can add a parameter "-replacepkgs" after-IVH:

rpm-ivh-replacepkgs linux-1.4-6.i368.rpm

4. Sometimes we uninstall a software that has been installed, simply by executing the rpm-e "file name" command.

5. Upgrading the lower version of the software is a good way to improve its functionality, so that we uninstall and then install new software trouble, to upgrade a software, only to perform the following command: RPM-UVH file name, note: This time the file name must be upgraded software to upgrade the patch

6. Another way to install the software is a unique Linux, but also RMP a powerful function of a performance: through the FTP site directly online installation software. When you find the site that contains the software you need and connect to the site, execute the following command to install online, such as installing linux-1.4-6.i368.rpm online, and using the command:

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

7. In our use of the computer process, will inevitably be wrong operation, if we mistakenly deleted a few files and affect the performance of the system, how to find out what is the missing documents? The RPM package provides a feature to look for corrupted files, execute this command: Rpm-va, Linux will list all corrupted files for you. You can fix it with a Linux installation CD.

8.Linux system in a wide range of files, in the use of the process, will inevitably encounter the files we do not know, in Windows we can use the "Start/Find" menu to quickly determine which folder a file belongs to, in Linux, The following command line can help us quickly determine which package a file belongs to:

RPM-QF file name >

9. When each package is installed in the Linux system, the installation files will go to the RPM database "check-in", so we want to query the properties of an installed software, just go to this database to find it. Note: The query command at this time is different from the query described in 1 and 8, which applies only to installed packages! Command format:

First, installation

Command format:

Rpm-i (or--install) options file1.rpm ... filen.rpm

Parameters:

file1.rpm ... filen.rpm the name of the RPM package that will be installed

Detailed options:

-H (or--hash) output hash mark (' # ') at installation

The--test is only tested for installation and is not actually installed.

--percent the progress of the installation as a percentage.

--excludedocs does not install document files in the package

--includedocs Installation Documentation

--replacepkgs forced reinstallation of installed packages

--replacefiles replace files that belong to other packages

--force ignores package and file conflicts

--noscripts does not run preinstallation and post-Setup scripts

--prefix installs the package to the path specified by

--ignorearch does not verify the structure of the package

--ignoreos does not check the operating system on which the package runs

--nodeps does not check dependency relationships

--ftpproxy with as an FTP agent

--ftpport Specify the port number for FTP to

Common options

-V Display additional information

-VV Display Debugging Information

--root let rpm make the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile set RPMRC file as

--dbpath Set the path of the RPM data inventory to

Second, delete

Command format:

RPM-E (or--erase) options pkg1 ... pkgn

Parameters

Pkg1 ... pkgn: packages to be removed

Detailed options

--test only test for deletion

--noscripts does not run pre-installation and post-Setup scripts

--nodeps does not check dependencies

Common options

-VV Display Debugging Information

--root let rpm make the path specified by "root" so that both the preinstallation program and the post installer are installed in this directory

--rcfile set RPMRC file as

--dbpath Set the path of the RPM data inventory to

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.