Self-Summary by cainiao rpm

Source: Internet
Author: User

In the early days, RPM was developed by RedHat to manage software installation mechanisms. It records users' installation needs in the form of databases.

Software. Because software installation usually has dependency attributes, for example, if we need to install software a, we may need to install software B or C

To allow installation of A, or installation of B requires a, so we need to install software with dependencies at the same time. While RPM solves

In this case, he packaged the software we needed into *. rpm, and it also had the online upgrade feature.

The RPM package installation environment must be the same as the packaging environment, and must satisfy the software dependency. Another important point is that a software

The RPM package may be different from the package, and will ignore the features we may need in the software, so we need to manually

Compile srpm (software source code ). The suffix of the compiled srpm file is. SRC. rpm, which is different from the RPM package.

You can modify the parameters and compile them on your own.

1. RPM package naming format:

Eg zsh-4.3.10-7.el6.x86_64.rpm

Zsh indicates the software name 4.3.7 indicates the version information of the software. 10 indicates the corrected version number.

X86_64 indicates the applicable hardware platform. RPM file extension

2. Default RPM installation path:/etc file storage directory

/Usr/bin Executable File

/Usr/lib dynamic function library for the program

/Usr/share/DOC basic user manual and help documentation

/Usr/share/man page file

3. Install the RPM package rpm-IVH package_name... (multiple RPM packages can be installed simultaneously)

**-I indicates installation, which can be used independently; V indicates detailed installation information; h indicates the installation progress of the software **

650) This. width = 650; "src =" "Title ="-I -ivh.jpg "alt =" wKioL1PLXsHC6I3_AAGuNlBN-WI679.jpg "/>

You can also install the rpm-IVH with a network connection

The execution parameters required during installation include:

-- Nodeps -- replacefiles -- replacepkgs -- Test -- force -- prefix -- noscripts

-- Nodeps: If this parameter cannot be installed due to dependency, it can be installed forcibly, but it may be caused by dependency.

The software cannot be used normally.

-- Replacefiles: can directly overwrite files that exist on the system or ignore version conflicts, but are overwritten.

Will not be restored

-- Replacepkgs: reinstall the installed software.

-- Force: -- replacefiles + -- replacepkgs

-- Test: test whether the software can be installed I

-- Profix: install the software in the specified directory (eg: -- profix/home/user1)

-- Noscripts: prohibit software from automatically executing certain system commands during installation.

4. upgrade and update rpm-uvh | fvl software name

-If the uvh software is not installed on the system, install it directly. If it is installed but not the latest version, update it.

-If the software is not installed on the system, the system does not install the software. If the software is installed but not the latest version, the software is updated.

650) This. width = 650; "src =" "Title =" fvl uvh.jpg "alt =" wkiol1plymdd4znbaahqtb5d_a8986.jpg "/>

5. rpm query

Refer to a software book, whether to install rpm-Q gcc

650) This. width = 650; "src =" "Title =" zo(xha1jw.ulrl5hu?w=% I %2.jpg "alt =" wkiol1plzshddo1gaac8%clro0134.jpg "/>

List all software installed on the local machine (rpm-Qa software name)

See the rpm-qc gcc file of a software device.

List all software files and directories rpm-QL zlib

See which program generates the rpm-qf/path/complete file name.

650) This. width = 650; "src =" "Title =" eno7du253'jewowc%ra6cnv.jpg "alt =" wkiol1plzarx5f6eaaec5uragjy9%jpg "/>

Listing software details rpm-Qi zlib

650) This. width = 650; "src =" "Title =" 8q0krcwb%8enrig%'89l8l.jpg "alt =" wkiom1plzinqaasoaamattu2q40810.jpg "/>

Other viewing parameters:-QR-Qd

**-QP [icblr]: The parameters in brackets are the same as those above, but they are only used to find information in the RPM file **

Rpm Verification:

Rpm-V zlib: Check whether zlib files have been modified.

Rpm-va software name: list all files on the system that have been changed

Rpm-VF/path: Check whether the file has been changed (information will be displayed after modification)

Rpm-VP file name of an RPM file: list the files that can be understood by the software.

** The file displayed is modified * 650) This. width = 650; "src =" "Title =" 06q1_t3ol3bkbm5a9c21_1_awh.jpg "alt =" wKiom1PLatjz-prwAAFwF_i4Fh0815.jpg "/>

6. RPM validity test: import the maker's public key to the System

Import Public Key: rpm -- import/path/to/key_file

Display All public keys in the imported GPG format: # rpm-Qa GPG-pubkey *

Show key details: # rpm-Qi GPG-pubkey-name

650) This. width = 650; "src =" "Title =" C ~ Xeercu2z@tl4((9yfsded.jpg "alt =" wkiom1plbaqr3yxuaaiocok2dt8854.jpg "/>

Check package: automatically executed during installation

650) This. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/> manual check:


Rpm -- checksig/path/to/package_file

Do not check package integrity rpm-k -- nodigest

Source validity not checked: rpm-k -- nosignature

7. Rebuild the database and uninstall the RPM

Uninstall rpm-E Software name

** We can also add the -- nodeps mentioned above to force deletion.

Path of the database:/etc. lib/RPM

Rebuilding the database:

If not, create a file. Otherwise, run the RPM -- initdb command.

Directly overwrite the original database. If not, create: rpm -- rebuilddb.

Self-Summary by cainiao rpm

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: 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.