Linux Commands 9

Source: Internet
Author: User

RHEL7 Management of software packages

There are two main types of package management, RPM and Yum

Two kinds of package management are useful, the main difference is: Yum is simple to use but requires networking, Yum will go to the online Yum package to get the required packages. And the need of the RPM operation precision is relatively thin, we need to do more things.

RPM Package Management

Abbreviation: Redhat Package Manager

Mounting discs

[Email protected] ~]# umount/mnt/#卸载

[[email protected] ~]# mount/dev/sr0/mnt/mount
Mount:/dev/sr0 write protection, will be mounted as read-only

RPM Package Name Structure

zsh-5.0.2-14.el7.x86_64.rpm

zsh-5.0.2-14.    El7. x86 _64.rpm

Software name major version number minor version number revision good RHEL7 CPU Architecture platform support system bit number

Installing the RPM software

-I--install installation package

--nodeps does not validate package dependencies

-V--verbose provides more detailed information output

-H--hash package is installed with hash marks listed

Cases:

[Email protected] ~]# rpm-ivh/mnt/packages/zsh-5.0.2-14.el7.x86_64.rpm
Warning:/mnt/packages/zsh-5.0.2-14.el7.x86_64.rpm: Head V3 rsa/sha256 Signature, key ID Fd431d51:nokey
In preparation ... ################################# [100%]
Upgrading/installing ...
1:zsh-5.0.2-14.el7 ################################# [100%]

Dependent relationships

For example:

[Email protected] ~]# rpm-ivh/mnt/packages/mariadb-server-5.5.44-2.el7.x86_64.rpm
Warning:/mnt/packages/mariadb-server-5.5.44-2.el7.x86_64.rpm: Head V3 rsa/sha256 Signature, key ID Fd431d51:nokey
Error: Dependency detection failed:
MARIADB (x86-64) = 1:5.5.44-2.el7 is mariadb-server-1:5.5.44-2.el7.x86_64 required
Perl (DBI) is mariadb-server-1:5.5.44-2.el7.x86_64 required
Perl-dbd-mysql is mariadb-server-1:5.5.44-2.el7.x86_64 need
PERL-DBI is mariadb-server-1:5.5.44-2.el7.x86_64 need

Convenient solution:

Download the package using Yum or a website related to RPM packages

Http://rpmfind.net/http://rpm.pbone.net/http://www.rpmseek.com/index.heml

RPM Query function

Rpm-qa ...

-A queries all installed packages

-F Query file belongs to package

-P query Package (typically used to view packages that are not yet installed)

-I display package information

-L display the list of files in the package

[Email protected] ~]# Rpm-qa zsh
Zsh-5.0.2-14.el7.x86_64
[email protected] ~]# which zsh
/usr/bin/zsh
[Email protected] ~]# rpm-qf ' which zsh '
Zsh-5.0.2-14.el7.x86_64

Can usually be combined with piping | More to use, making the results easier to read

RPM Package Uninstall

RPM-E Package Name

Linux Commands 9

Related Article

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.