Linux under RPM Package Management command detailed
Basic concepts of software under 1.linux
Important files that the program needs to use: configuration files, instructions, library files, help information
/etc,/bin,/sbin,/lib,/usr/share/man
1.1. The program path required to start the system must be on the partition of the root file system
/etc,/bin,/sbin,/lib,/usr/share/man
1.2. The operation required after system startup as the core function of the system or the necessary function program path
/etc,/usr/bin,/usr/sbin/,/usr/lib,/usr/share/man
1.3. User-installed third-party programs required additional function program path, not related to operating system startup, etc.
/usr/local/etc,/usr/local/bin,/usr/local/sbin,/usr/local/lib,/usr/local/man
2.RPM called Package Manager
The RPM package consists of the main package and the child package, named in the following format
name-version-release2.arch.rpm
Version:major.minor.release1
namely name-major.minor.release1-release2.arch.rpm
such as:kernel-2.6.18-308.el5.i686.rpm
Name: Package name--kernel
Major rep: Major version number, significant improvements--->2
Minor representative: Minor version number, a major change in a sub-function--->6
Release1 on behalf of the release number, fixed some bugs, adjusted a little function--- >
RELEASE2 represents two releases--->308
Arch: Platform--->i686
RPM Package: Is the author download the source program, compiled configuration completed, made into RPM package, belongs to the binary format
3. Installation, the need to handle the dependencies between RPM packages
Format: rpm-i RPM package Full path name
-H: Show progress by #, each # represents 2%;
-V: Show detailed procedures
-VV: A more detailed process
RPM-IVH RPM Package Full path name
--nodeps: Ignoring dependencies;
--replacepkgs: Re-install, replace the original installation;
--oldpackage: Downgrade
--force: Forced installation, can be re-installed or degraded;
4. Enquiry
Format: rpm-q only RPM Package name: Query whether the specified package is already installed
Example: Rpm-q httpd
RPM-QA: Querying all packages that have been installed
Rpm-qi only RPM Package name: Query the description information of the specified package;
RPM-QL only RPM Package name: Query the list of files generated after the installation of the specified package;
RPM-QC only RPM Package name: Query the configuration file for the specified package installation;
RPM-QD only RPM Package name: Query the Help file for the specified package installation;
Rpm-q--scripts only RPM package name: Query the script contained in the specified package
RPM-QF specific file path name: The query specifies which RPM package the file is generated from;
Example: RPM-QF/ETC/PASSWD
If a RPM package has not been installed, we need to query its description information, installation will be generated after the file;
Format: Rpm-qpi RPM Package Full pathname Query No description information for packages installed;
RPM-QPL RPM Package Full path name query the list of files that are not installed for the package to be generated
5. Upgrade
Format: RPM-UVH RPM Package Full path name: If the old version is installed, then upgrade;
RPM-FVH RPM Package Full path name: If the old version is installed, upgrade; otherwise, exit;
--oldpackage: Downgrade
6. Uninstall
Format: rpm-e RPM package Name only
--nodeps
Example: Rpm-e httpd
7. Check: Whether the package after installation has been modified by someone
format:rpm-v RPM Package name only
For example: Rpm-v httpd If there is no return information to prove that the installation package is normal without being modified.
8. Verify the legality of the source and the completeness of the package;
Redhat Public Key storage path:/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release: Import Key file
Rpm-k RPM Package Full path name
DSA, GPG: Verifying the legitimacy of the source, that is, the verification of the signature; you can use--nosignature to skip this
SHA1, MD5: Verifying package integrity; You can use--nodigest to skip this
Example: Rpm-k httpd-2.2.3-63.el5.i386.rpm
Rpm-k--nodigest httpd-2.2.3-63.el5.i386.rpm
9. Rebuilding the database
RPM--REBUILDDB: Rebuilding the database will be re-established;
--INITDB: Initialize the database, there is no build, no is established
This article is from the "Xavier Willow" blog, please be sure to keep this source http://willow.blog.51cto.com/6574604/1767127
Linux under RPM Package Management command detailed