Detailed Package Management rpm

Source: Internet
Author: User

First, the definition
RPM is an abbreviation for RPM Package Manager, which has a Redhat logo, but its original design concept is open and now includes OpenLinux, S.U.S.E and Turbo Linux distributions, such as Linux, are accepted as industry standards.


Second, the use of RPM package management

1, can install, delete, upgrade and management software, of course, also support online installation and upgrade software;
2, through the RPM package management can know what the package contains files, you can also know the system of a file belonging to which package;
3, can be in the query system of the package is installed and its version;
4, as a developer can package their own program for the RPM package release;
5, Package signing GPG and MD5 import, verification and signature release
6. Check the dependencies to see if there are any packages that disrupt the system due to incompatibility;

Three, the composition of the package and the naming format

1, the composition of the package:
Binary program:/bin,/sbin,/usr/bin,/usr/sbin
Library files:/lib,/lib64,/usr/lib,/usr/lib64
Configuration file:/etc
Help file (document):/usr/share/doc,/usr/share/man
2. RPM Naming format:
appname-version-release.arch.rpm
AppName: Program Name
VERSION:
Major: Major Version number
Minor: Minor version number
Release: Release number
Release: The revision number of the package itself and the applicable OS information
ARCH: the applicable platform
x86,i386,i486,i586,i686
Example: zsh-4.3.10-9.el6.x86_64.rpm

Iv. mounting of CD-ROM

1, #mkdir/media/cdrom
#mount-R-T Iso9660/dev/cdrom/media/cdrom

2. Test CD Package

650) this.width=650, "title=" 2015-04-10 09.png "src=" http://s3.51cto.com/wyfs02/M01/5D/F0/ Wkiol1un6p6a-vbgaadascy3ack511.jpg "alt=" Wkiol1un6p6a-vbgaadascy3ack511.jpg "/>

Note: If you do not make a verification CD package, the following error occurs because the software key in the disc cannot be found:

650) this.width=650, "style=" float:left; "title=" 2015-04-10 32.png "src=" http://s3.51cto.com/wyfs02/M02/5D/F0/ Wkiol1un6vqx0myvaaextbzkrxc993.jpg "alt=" Wkiol1un6vqx0myvaaextbzkrxc993.jpg "/>

V. Package management RPM COMMON commands

   1, Installation:
  RPM [option]  package_file
    -i: Install package
     -H: Use # to indicate installation progress
    --test: Test installation
    -V,--verboss : Show Details
    --nodeps: Ignore dependencies
    --force: Force installation
     --oldpackage: Downgrade

650) this.width=650, "title=" 2015-04-10 52.png "src=" http://s3.51cto.com/wyfs02/M00/5D/F0/ Wkiol1un6nhhglzwaadgoqqos_8417.jpg "alt=" Wkiol1un6nhhglzwaadgoqqos_8417.jpg "/> 2, Upgrade:
Rpm-u Package_file
-U: Upgrade or install Upgrde
Rpm-f Package_file
-F: Upgrade freshen
--test: Test Upgrade
--nodeps: Ignoring dependencies
--force: Forced installation
--oldpackage: Downgrade
#rpm-F--test zip-3.0-1.el6.x86_64.rpm

3. Uninstall:
RPM-E package_name
-e:erase Uninstall
--test: Test Uninstall
--nodeps: Ignoring dependencies
--allmatches: Uninstalling multiple versions at the same time

#rpm-E--test zsh

4. Enquiry:
Rpm-q package_name
[Select-options]
-a:all, querying all packages that have been installed
-f:file, the query file is generated by which package installation
-P package_file: Query the list of files after installation of the installed package
[Query-options]
-Q: Query whether the system has a package installed

-qi: A brief description of the query package
-QL: Query Package installation file list
-c:configfiles, querying all configuration files installed by the package
-QD: Querying Package Document Information
-Q--changelog: Query Changelog information for version changes during package creation
-Q--provides: Query package provides capabilities
-Q--requires: Querying package dependencies
-Q--scripts: Execute script when querying package installation or uninstallation
Script Categories:
Preinstall: Execute script before installation
Postinstall: After installation
Preuninstall: Before uninstalling
Postuninstall: After uninstalling

(1), the query system installed software

650) this.width=650; "title=" 2015-04-10 21.png "src=" http://s3.51cto.com/wyfs02/M02/5D/F4/ Wkiom1un69qynuwjaaa-azr8zoy066.jpg "alt=" Wkiom1un69qynuwjaaa-azr8zoy066.jpg "/>

(2), the query file by which package installation generated

650) this.width=650, "title=" 2015-04-10 23.png "src=" http://s3.51cto.com/wyfs02/M00/5D/F0/ Wkiol1un7k6r6ajtaabl9hjzoya648.jpg "alt=" Wkiol1un7k6r6ajtaabl9hjzoya648.jpg "/>

(3), query package installation file list
650) this.width=650, "title=" 2015-04-10 31.png "src=" http://s3.51cto.com/wyfs02/M01/5D/F0/wKioL1Un72fQB_ R0aab1u02jsm8242.jpg "alt=" Wkiol1un72fqb_r0aab1u02jsm8242.jpg "/>

5. Check:
Whether the files generated after the query package installation have changed
Rpm-v Pankage_name
S file Size differs
M Mode differs (includes permissions and file type)
5 Digest (formerly MD5 sum) differs
D Device Major/minor number mismatch
L Readlink (2) path mismatch
U User ownership differs
G Group ownership differs
T MTime differs
P capabilities differ
Verification of the validity of the package:
Source law: Trusted producer, dependent on the producer's digital signature, signature using the private key cryptographic package's feature code
Content Legal: Integrity check success, not two changes, depending on the creator's program signature, positive way, installers with
Extract the feature code compared to the producer.

This article is from the "Linux class notes" blog, so be sure to keep this source http://wangxinjian.blog.51cto.com/6334977/1631088

Detailed Package Management rpm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.