Linux entry notes: 19. Linux package management tool RPM and linuxrpm

Source: Internet
Author: User

Linux entry notes: 19. Linux package management tool RPM and linuxrpm
I. Source Code Management

The vast majority of open-source software are directly released in the form of source code, and are generally packaged as archive compressed files of tar.gz. The program source code must be compiled into a binary executable file before it can be used. The source code compilation process is as follows:

Software in the form of source code is troublesome to use, but it has good compatibility and controllability. In addition, open-source software generally uses a lot of other open-source software functions, soOpen-source software has a lot of Dependencies(To use a software, install other software first ).

 

2. RPM (RPM Package Manager, RPM Package Manager)

The advantage of installing software in the form of source code is that it is suitable for all systems and can be customized. The disadvantage is that the operation is complicated, the compilation time is long, and errors are very easy. For ease of use, Erik Troan and Marc Ewing developed RPM (RPM Package Manager, RPM Package Manager), which was first applied in RedHat (Red Hat.

 

1. design objectives

RPM simplifies installation and management of open-source software by compiling source code based on a specific platform system into executable files and saving dependencies. The RPM design goals are as follows:

  • Easy to use
  • Use a single package format file to publish (. rpm file)
  • Upgradable
  • Tracing software Dependencies
  • Basic Information Query
  • Software Verification
  • Support for multiple platforms

 

2. Naming rules

Packagename-1.2.0-30.el6.x86_64.rpm

(Package name-version number-Operating System-hardware platform)

Where,

Operating System: el6 indicates RedHat 6.x or CentOS 6.x.

Hardware Platform: x86_64 indicates a 64-bit platform, i386 indicates a 32-bit platform, and noarch indicates that a specific hardware platform (cross-platform) is not required ).

 

3. Basic commands

Installation package:

Installation Package: rpm-I packagename. rpm

Uninstall package:

rpm -e packagename

Upgrade package:

rpm -U packagename-new.rpm

Installation through http and ftp:

rpm - ivh http://www.domainname.com/packagename.rpm

Common parameters:

-V display details-h display progress bar-I installation package-e uninstall package-U Update (upgrade) package-q query-a query all installed packages-I display package information-h hash) -f: query which package the file belongs.-p: information about the uninstalled package.-l list the files in the package.

 

Iii. RPM query
Rpm-qa lists all installed rpm packages rpm-qa | grep '. * gnome. * 'list all packages whose names contain gnome rpm-qf filename. query which package of the target file belongs to rpm-qi package to obtain information about an installed package rpm-qip package. rpm obtains information about an uninstalled package. rpm-ql package obtains the rpm-qlp package list of files in an installed package. rpm is used to list files in an uninstalled package.

  

Iv. RPM Verification

The software package may be maliciously modified during transmission. Therefore, for the sake of security, the software package verification function is added to the modern system.

Asymmetric encryption algorithms are generally used for verification. Therefore, a public key is required. The method to import the Public Key is:

rpm --import /path/to/key_file

Verify uninstalled software packages:

rpm -K package.rpm

Verify the installed software package:

rpm -V package

  

 

Reference link:

Naming rules for RPM packages in Linux

YUM Public Key Authentication and import

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.