search
HomeOperation and MaintenanceSafetyHow to analyze the rpm package management function

Full explanation of Rpm package management functions

Function of software package management:Package each component file of the compiled program into one or several packages File, in order to facilitate the installation, upgrade, uninstallation, query, verification, and database maintenance of the program package.

Let’s take a look at the analysis of RPM package management

Rpm package has great applications in redhat and S.U.S.E

We will next use the rpm package in centos system Do some detailed function analysis for management

Using yum (rhel series) to install can automatically resolve dependencies d

rpm package naming format:

name-VERSION-release.arch.rpm

VERSION:major.minor.release

Major: major version number (the version has major updates); minor: minor Version number (minor update)

release.arch: The release number of the rpm package

release.os: 2.el7 (platform).i386 (architecture).rpm architecture (architecture): i386 , x64(amd64), ppc, noarch manager;

Actual operation:

This machine has successfully downloaded zsh-4.3.10-9.el6.x86_64.rpm on the server. Use this To implement

Syntax: rpm [options] [packages_file]

Installation; -i, --install

rpm -ivh /path/to /rpm_package

                                                                                                                                                                                           /rpm_package --nodeps; Ignore dependencies (applicable to uninstallation)

                                                                           and             but but                                      but                                                 to                                                --nodeps; Will overwrite the original information

Rpm -i --replacepkgs /path/to/rpm_name

[root@bucktan ~]# rpm -ivh --replacepkgs zsh-4.3.10-9. el6.x86_64.rpm

Uninstall; -e, --erase

rmp -e package_nameHow to analyze the rpm package management function

--allmatches Uninstall all packages matching the specified name

                                                                                      

#            rpm -U /path/to/rpm_package

                            —oldpackage downgrade

Two packages were taken from the server: zabbix-2.4.0-1.el6.x86_64 .rpm

zabbix-2.4.5-1.el6.x86_64.rpm

Before upgrading to zabbix-2.4.5-1.el6.x86_64 .rpm

[ROOT@Bucktan] ~#RPM-Uvh-OLDPACKAGE ZABBIX-2.4.0-1.el686_64.rpm How to analyze the rpm package management function## Only upgraded; Will not be executed)

rpm -F /path/to/rpm_package

Usually used with vh;

rpm -Uvh|-Fvh /path/to/package

                                                                                                                   With       -- nosignature                                                                                                                                                             .

                                                                                                                       

[query-options]

Query whether the package has been installed;

rpm -q package_name

[select-options]:

rpm -qaQuery all Installed packages;

rpm -qf /path/to/file Query which package a file is generated by;

-q --whatprovides file_name Query which package the specified capability is generated by Provided by

--q-WhatRequires File_name, to query which program package dependence on the specified Capability package

[Query-options]:

How to analyze the rpm package management functionRPM -QL Package_name query the file generated after installation;

rpm -qd package_name queries the help document generated after the package is installed;

rpm -qc package_name queries the configuration file generated after the package is installed; How to analyze the rpm package management function

rpm -qR package_name Query the dependencies of the specified software package

                                                                                                using   using using use using   using   using using   using using     through   using using ‐ ‐ ‐   ‐ ‐ ‐ ‐ ‐ ‐ ‐​ ​                          

## PostInstall to install the rear script How to analyze the rpm package management function

# Preuninstall uninstall the front script

Postuninstall uninstall the rear script

##Q # rpm -qpl package_file Query the files that will be generated after installationHow to analyze the rpm package management function

rpm -qpi package_file Query the simple description information of the package;

It can be used with its options, such as -qp --scripts

Verification; check whether the installed files have been modified

rpm -V package_name

rpm -V zsh

S .5....T. c /etc/zshrc

                                                                                                                                                                                                                                          .

                   M Mode differs (includes permissions and file type)                                                                                                L readLink(2) path mismatch

                                                                                                                                    differ Ability changed

Verify source legitimacy and software integrity

Package integrity; single encryption mechanism (MD5|sha1..)

Source legitimacy; public key encryption mechanism (RSA)

rpm -K /path/to/packagefile directly checks the legitimacy of the source of the package

rpm --checksig /path/to/package_file

-Nosigeature: Do not check the source of the source -NODIGest: Do not check the package integrity during verification

Import GPG key file:

             rpm --import /path/to/gpg-key-file

                                                                                                                                                                                                                                                                    

# Location: /var/lib/rpm

Rebuilding:

rpm --initdb: Initialization

If a database does not exist in advance, create a new one

RPM -Rebuilddb Reconstruction

How to analyze the rpm package management function

The above is the detailed content of How to analyze the rpm package management function. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use