Linux rpm Command

Source: Internet
Author: User

First, Introduction

RPM is the abbreviation for Redhatpackagemanager, a software package installation and management program developed by Redhat, similar to the uninstaller on the Windows platform. With RPM, users can install and manage applications and system tools on Linux themselves. RPM allows the user to install the package directly in binary mode, and can query the user whether the library file is already installed, and when the program is removed with RPM, it intelligently asks the user if they want to delete the program. If you use RPM to upgrade the software, RPM retains the original configuration file so that the user does not have to reconfigure the new software. RPM maintains a database that contains all the information about the package, which allows the user to query the package. RPM is designed for Linux, but it has been shifted to SunOS, Solaris, AIX, IRIX and other Unix systems. RPM complies with the GPL, and users are free to use and disseminate rpm under the GPL.

Second, the configuration

RPM Package Management configuration file is RPMRC, you can use the following command to find

Locate RPMRC

Can be viewed with the following command

RPM--SHOWRC

Third, the function

1, initialize the RPM database function;

The RPM command is used to query whether an RPM package is installed and is to be done through the RPM database, so we often use the following two commands to initialize the RPM database;

[Email protected] beinan]# RPM----REBUILDDB Note: This will take a long time;
Note: The above two parameters are extremely useful, sometimes the RPM system is out of the question, can not be installed and query, mostly here out of the problem;
[[email protected] beinan]# Updatedb[[email protected] beinan]# locate software name or filename hint: Through updatedb, we can use locate to find out where some software is installed. The system will perform updatedb at the initial installation, once at a time, to keep the installed repositories up-to-date, UpdateDB is the Slocate package, and if you do not have this command, you will have to install slocate;


2. RPM Package management function

1) Query function:

RPM {-q|--query} [select-options] [query-options]

Working with instances

1) query which package the file you have installed belongs to

RPM-QF file name

2) query where the installed packages are installed

RPM--QL software name

3) Check the configuration file for installed software

RPM-QC Software Name

4) View a document installation location where the software is installed

RPM-QD Software Name

5) Check the packages and files on which the installed software depends

RPM-QR Software Name

6) View the files contained in a package

RPM-QPL file name

2) installation, upgrade and deletion of software packages

1) General Package installation

-IVH: Installation shows installation progress--install--verbose--hash-UVH: Upgrade Package--update;-Va: Verify all RPM packages to find missing files [View Lost];-e: Delete Package

2) Source Package installation

RPM--recompile vim-4.6-4. src.rpm   # This command will unpack and compile the source code and install it if the user uses the command: RPM --rebuild vim- 4.6-4. src.rpm # After the installation is complete, the compiled executable is also repackaged as a i386.rpm RPM package.

For detailed usage, please refer to: http://ftp.tsingpost.com/index.php/archives/379/

3) Network Package installation

# RPM-QPI http://mirrors.kernel.org/fedora/core/4/i386/os/fedora/rpms/gaim-1.3.0-1.fc4.i386.rpm # RPM-IVH http://mirrors.kernel.org/fedora/core/4/i386/os/fedora/rpms/ gaim-1.3.0-1.fc4.i386.rpm

4) Specify the installation directory: to add-relocate parameters

RPM-IVH--relocate/=/opt/gaim gaim-1.3. 0-1. fc4.i386.rpm  #gaim -1.3.0-1.fc4.i386.rpm specified installation in directory:/opt/gaim

3. Import Signature function

RPM--import Signature File

4. RPM Package Extract File function

file. RPM |cpio-div

Tip: The extracted files are in usr and etc in the current directory

Linux rpm Command

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.