In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
The content of this article mainly focuses on how to analyze the function of rpm package management. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
Complete solution of Rpm package management function
The function of software package management: package each component file of the compiled program into one or more package files, in order to facilitate the installation, upgrade, uninstallation, query, verification and database maintenance of the package.
Let's take a look at the parsing of RPM package management.
Rpm package is widely used in redhat and S.U.S.E.
Next, we will do some detailed functional analysis based on the management of rpm packages in the centos system.
Dependencies can be resolved automatically when installing with yum (rhel series) d
Rpm package naming format:
Name-VERSION-release.arch.rpm
VERSION:major.minor.release
Major: major version number (major update); minor: minor version number (minor update)
Release number of the release.arch:rpm package
Release.os: 2.el7 (platform) .i386 (architecture). Rpm archetecture (architecture): i386, x64 (amd64), ppc, noarch processor
Actual operation:
The native machine has successfully downloaded zsh-4.3.10-9.el6.x86_64.rpm on the server to implement
Syntax: rpm [options] [packages_file]
Install;-iMagin Musi install
Rpm-ivh / path/to/rpm_package
-v; displays installation information
-vv; displays more detailed installation information
-h; use the pound sign to show the installation progress
-- nodeps; ignores dependencies (for uninstalling)
-- force; forced installation (for uninstallation)
Reinstall;-- replacepkgs 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;-eJing Musicerase
Rmp-e package_name
-- allmatches uninstalls packages that match all specified names
-- nodeps ignores dependencies
-- test test uninstall
Upgrade;-U-F
Upgrade or install
Rpm-U / path/to/rpm_package
-- oldpackage downgrade
Two packages are fetched on the server: zabbix-2.4.0-1.el6.x86_64.rpm
Zabbix-2.4.5-1.el6.x86_64.rpm
Previously upgraded to zabbix-2.4.5-1.el6.x86_64.rpm
[root@bucktan] ~ # rpm-Uvh-- oldpackage zabbix-2.4.0-1.el6.x86_64.rpm
Upgrade only; (if no older version exists, it will not be executed)
Rpm-F / path/to/rpm_package
Usually used with vh
Rpm-Uvh |-Fvh / path/to/package
-- nosignature does not check the validity of packet signature information
Be careful; do not upgrade the kernel
Different kernel versions can coexist, so installation can be performed, but upgrades are not recommended
Query; rpm {- Q |-- query} [select-options] [query-options]
Query whether the package is installed
Rpm-Q package_name
[select-options]:
Rpm-qa queries all installed packages
Rpm-qf / path/to/file queries that a file is generated by that package
-Q-- whatprovides file_name queries which package provides the specified capability
-Q-- whatrequires file_name query which package depends on the specified capability
[query-options]:
Rpm-ql package_name query package generated files after installation
Brief description of rpm-qi package_name query package
Help documentation generated after installation of the rpm-qd package_name query package
Rpm-qc package_name query the configuration files generated after the package is installed
Rpm-qR package_name queries the dependencies of the specified software package
Rpm-Q-- scripts query package related scripts
There are four types of scripts
Preinstall pre-installation script
Postinstall post-installation script
Preuninstall pre-uninstall script
Postuninstall post-uninstall script
Query information about uninstalled packages;-qp
Rpm-qpl package_file queries the files that will be generated after installation
Simple description information of rpm-qpi package_file query package
Can be used with its options, such as-qp-- scripts
Check whether the installed file has been modified
Rpm-V package_name
[root@bucktan] # rpm-V zsh
S.5....T. C/ etc/zshrc
Returned comment information
S file Size differs Siz
M Mode differs (includes permissions and file type) header file
5 digest (formerly MD5 sum) differs MD5
D Device major/minor number mismatch
L readLink (2) path mismatch
U User ownership differs owner
G Group ownership differs genus group
T mTime differs modification time
P caPabilities differ capabilities have changed.
Verify source legitimacy and software integrity
Packet integrity; single encryption mechanism (MD5 | sha1..)
Source legitimacy; public key encryption mechanism (RSA)
Rpm-K / path/to/packagefile directly verifies the validity of the package source
Rpm-checksig / path/to/package_file
-- nosigeature: do not check the validity of the source
-- nodigest: package integrity is not checked during verification
Import the GPG key file:
Rpm-import / path/to/gpg-key-file
Verify after import
Database
Location: / var/lib/rpm
Rebuild:
Rpm-- initdb: initialize
If a database does not exist in advance, create a new one
Rpm-rebuilddb reconstruction
Create a new database directly, and the existing database will be overwritten.
Thank you for your reading. I believe you have a certain understanding of "how to analyze the functions of rpm package management". Go to practice quickly. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.