Home Operation and Maintenance Safety How to analyze the rpm package management function

How to analyze the rpm package management function

May 24, 2023 am 09:01 AM
rpm

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 of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

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 ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Where is linux rpm stored? Where is linux rpm stored? Mar 28, 2023 am 11:22 AM

Linux rpm is generally stored in the "/usr/local" or "/usr/bin" directory by default; the "/usr/local" directory is the "/usr" directory provided to general users, where general application software is installed, and The "/usr/bin" directory also houses many applications.

An in-depth discussion of the functions and principles of Linux RPM tools An in-depth discussion of the functions and principles of Linux RPM tools Feb 23, 2024 pm 03:00 PM

The RPM (RedHatPackageManager) tool in Linux systems is a powerful tool for installing, upgrading, uninstalling and managing system software packages. It is a commonly used software package management tool in RedHatLinux systems and is also used by many other Linux distributions. The role of the RPM tool is very important. It allows system administrators and users to easily manage software packages on the system. Through RPM, users can easily install new software packages and upgrade existing software

How to find the storage path of RPM files in Linux system? How to find the storage path of RPM files in Linux system? Mar 14, 2024 pm 04:42 PM

In Linux systems, RPM (RedHatPackageManager) is a common software package management tool used to install, upgrade and delete software packages. Sometimes we need to find the storage path of an installed RPM file for search or other operations. The following will introduce how to find the storage path of the RPM file in the Linux system, and provide specific code examples. First, we can use the rpm command to find the installed RPM package and its storage path. Open

How to install mysql5.7 on centos7 using rpm How to install mysql5.7 on centos7 using rpm May 27, 2023 am 08:05 AM

1. Download 4 rpm packages mysql-community-client-5.7.26-1.el7.x86_64.rpmmysql-community-common-5.7.26-1.el7.x86_64.rpmmysql-community-libs-5.7.26-1 .el7.x86_64.rpmmysql-community-server-5.7.26-1.el7.x86_64.rpm If you want to use Thunder to download, you must first find the corresponding rpm download path. First, open the mysql official website in the browser: In the opened interface, press the keyboard f12 to open developer tools

How to analyze the rpm package management function How to analyze the rpm package management function May 24, 2023 am 09:01 AM

Rpm package management function fully understands the function of software package management: packaging the components of the compiled program into one or several package files, in order to facilitate the installation, upgrade, uninstallation, query, verification, and database of the program package maintain. Let's take a look at the analysis of RPM package management. Rpm packages have great applications in redhat and S.U.S.E. Next, we will do some detailed functional analysis on the management of rpm packages in the centos system. Using yum (rhel series), it can be automatically installed during installation. Resolve dependencies drpm package naming format: name-VERSION-release.arch.rpmVERSION: major.minor.releaseMajor

What is the standard path for storing RPM packages in Linux systems? What is the standard path for storing RPM packages in Linux systems? Mar 14, 2024 am 11:18 AM

"Standard paths and code examples for RPM package storage in Linux systems" In Linux systems, RPM (RedHatPackageManager) packages are a standard format for software package management. When we use tools such as yum to install software, we are actually installing or updating RPM packages in the system. The path where RPM packages are stored in the system has certain specifications. The following will introduce the standard paths where RPM packages are stored in common Linux distributions and provide some code examples.

How to use RPM package to install redis in CentOS How to use RPM package to install redis in CentOS May 26, 2023 am 11:47 AM

Redis is a high-performance key-value database. The emergence of redis has largely compensated for the shortcomings of keyvalue storage such as memcached, and can play a very good supplementary role to relational databases in some situations. Early preparation platform: centos6.5x86_64 Installation: redis-3.0.7-4.el6.art.x86_64.rpm Download the rpm package and open the address http://pkgs.org/download/redis to enter according to your own Linux platform and what you need to install Go to the redis version and download the corresponding rpm package. Here we take redis3.0.7 as an example to install: [roo

Linux RPM Tool Analysis: The Basics You Need to Know Linux RPM Tool Analysis: The Basics You Need to Know Feb 22, 2024 pm 06:36 PM

The RPM tool on Linux has always been one of the important tools for managing software packages. Whether you are a Linux system administrator or a developer, it is important to understand the basics of RPM tools. This article will provide an in-depth analysis of the LinuxRPM tool to help you better understand its principles, uses and operation methods. 1. What is the RPM tool? The full name of RPM is RedHatPackageManager. It is a tool used to manage software packages on Linux systems. its most

See all articles