RPM and YUM

1.Introduction to rpm

Redhat Packages Manager Red Hat Packages Manager

A bit like the Windows control panel, it will create a unified database file, record software information in detail, and automatically analyze dependencies.

Function: Simplify the complexity of package installation

       install software

              rpm -ivh filename.rpm

       upgrade software

              rpm -Uvh filename.rpm

       Uninstall software

              rpm -e filename.rpm

       Query software description information

              rpm -qpi filename.rpm

       List software file information

              rpm -rpl filename.rpm

       Query which RPM a file belongs to

              rpm -qf filename.rpm

2. Introduction to yum

Yellow dog Updater, Modified

effect:

       Resolve dependencies between software packages to further reduce the difficulty and complexity of software installation.

Topology:

       The Yum software repository can analyze the required software packages and their related dependencies according to the user's requirements, and then automatically download the software packages from the server and install them to the system.

      

Configuration:

       xx.repo in the /etc/yum.repos.d/ directory

       [rhel-media] # Unique identifier for Yum software repository, should avoid conflict with other repositories

       name=linuxprobe # Yum software repository name description, identifying the purpose of the repository

       baseurl=file:///media/cdrom # The provided methods include FTP (ftp://..), HTTP (http://..), local (file://..)

       enabled=1 # Set whether this source is available. 1-available; 0-disabled.

       gpgcheck=1 # Set whether this source checks files. 1-check; 0-do not check.

       gpgkey=file///media/cdrom/RPM-GPG-KEY-redhat-release # If verification is enabled, the public key file address must be specified

Order:

       List all repositories

              yum repolist all

       List all packages in repository

              yum list all

       View package information

              yum info softwareName

       Install the package

              yum install softwareName

       reinstall the package

              yum reinstall softwareName

       upgrade package

              yum update softwareName

       remove package

              yum remove softwareName

       Clear all repository caches

              yum clean all

       Check for updatable packages

              yum check-update

       View installed package groups on the system

              yum grouplist

       Install the specified package group

              yum groupinstall softwareGroupName

       Remove the specified package group

              yum groupremove softwareGroupName

       Query the specified package group information

              yum groupinfo softwareGroupName

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325386433&siteId=291194637