RPM command
1, RPM:
Database/var/lib/rpm
2, Rpmbuild
Install, query, uninstall, upgrade, verify, rebuild the database.
RPM naming
Package: Components
Main package: bind-9.7.1-1.i586.el5.rpm
Sub-Package: bind-libs-9.7.1-1.i586.el5.rpm
Package name format
name-major.minor.release-release.arch.rpm
RPM Package: 1 binary format
2. Source format
1. Installation:
Rpm-i Package Name
-H Displays the installation progress with the # sign
-V Show detailed procedures
-VV more detailed procedures
--nodeps Ignore dependencies
--replacepkgs Reinstall, replace the original installation
--oldpackage downgrade Installation
--force = =--replacepkgs +--oldpackage
-test simulated installation, check for potential conflicts
2. Enquiry
Rpm-q package_name
-A query system has all the packages installed
-qi package_name querying information for a specified package
-QL package_name Query Specifies the list of files generated after the package is installed
-QC package_name Query the configuration file for the specified package installation
-QD package_name Query The Help file for the specified package installation
-Q--scripts package_name query Specifies the script that the package contains
4 Types of scripts: pre-and post-installation, before and after uninstallation
-qf/path/to/somefile query Specifies which package the file is generated from
How a RPM package has not been installed, query its above information:
RPM-QP[I|L|C|D]/path/to/package_file
3. Upgrade
Rpm-u/path/to/new_package_file If there is an older version, then upgrade, otherwise, install
Rpm-f If there is an older version, then upgrade, otherwise, exit
4. Uninstall
RPM-E package_name
5. Check
Rpm-v package_name
6. Rebuilding the database
RPM--rebuild
--INITDB Initialize database, no, then build, there's no need
7. Source legality, software integrity
Private key {MD5 (RPM)}add rpm
RPM--import/etc/pki/rpm-gpg/*-release Import Public key
Rpm-k package_file Verification
Linux Package Management