Linux Program management: Yum Tools

Source: Internet
Author: User

In some distributions of Linux systems, the use of RPM tools for software management, but in the process of RPM, the processing of dependencies between programs is cumbersome. As a result, some publishers have improved the RPM tool by using the Yum tool to handle dependencies between programs in the Redhat series release. Yum is an online upgrade mechanism that allows you to download updates online after we have set up some settings and, in the case of a network, a variety of dependencies between programs and what programs are missing. The installation and upgrade of the software has also become very simple.


CentOS now places the released software in the Yum server and then analyzes the dependencies between the software and records the information in the software. This information is then analyzed and recorded as a list of software dependencies. These list data and the location where the software resides can be called Containers (repository). When the client has the software installation requirements, the client host will actively download the list of the list to the container URL of the Yum server above the network, and then compare the data of the inventory list with the software data already existing in the native RPM database, so that you can download all the required dependent files in one breath.


Through Yum can be implemented for the software query, installation, uninstall, upgrade and other functions, very convenient

Basic operation:

* Install Package1 [Package2] [...] : Package Installation

* Reinstall Package1 [Package2] [...] : Reinstall

* Update [PACKAGE1] [Package2] [...] : Program Updates

* Check-update: Check for available upgrades

* Remove | Erase Package1 [Package2] [...] Remove Programs, uninstall programs

The installation of the software automatically resolves the dependencies and prompts you to download the appropriate packages.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7D/BD/wKiom1burbWj8_3IAABLBhpycoI765.png "title=" installation. PNG "style=" Float:none; "alt=" Wkiom1burbwj8_3iaablbhpycoi765.png "/>

The uninstallation process also automatically handles dependencies, much better than RPM.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7D/BD/wKiom1burdXRkdEwAAA67iSmccs371.png "style=" float: none; "title=" Uninstall. PNG "alt=" Wkiom1burdxrkdewaaa67ismccs371.png "/>

Query for information about:

* List [...] : Lists related programs to see if they are installed and can be matched using wildcards

* Info [...] : List details of related programs

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7D/BA/wKioL1bur5CgICkaAAAwle-MeYI211.png "style=" float: none; "title=" query. PNG "alt=" Wkiol1bur5cgickaaaawle-meyi211.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7D/BA/wKioL1bur5mSn3LjAAA4YYWE7cY646.png "style=" float: none; "title=" Query 2. PNG "alt=" Wkiol1bur5msn3ljaaa4yywe7cy646.png "/>

* provides | Whatprovides Feature1 [Feature2] [...] : View which package is provided by the specified attribute (which can be a file):

* History [Info|list|packages-list|packages-info|summary] View yum transaction histories

* Search string1 [string2] [...] Search for the package name and summary information with the specified keywords;

* Deplist Package1 [Package2] [...] : View the capabilities on which the specified package depends


* Repolist [all|enabled|disabled]: Listing warehouse Information

* Repoinfo [all|enabled|disabled]: View detailed warehouse Information

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7D/BA/wKioL1bur8vAqwWkAAA59ZrFjN4946.png "title=" Repolist. PNG "alt=" Wkiol1bur8vaqwwkaaa59zrfjn4946.png "/>

Program Cache Management:

* Clean [Packages | metadata | expire-cache | rpmdb | plugins | all]: Clear local cache

* Makecache [FAST]: Build the local cache, for the Yum Image Library, update the cache file, to facilitate comparison, faster to find the required software.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7D/BD/wKiom1bur0qBjzsmAAApBCdErMg489.png "title=" build the cache. PNG "alt=" Wkiom1bur0qbjzsmaaapbcdermg489.png "/>

Related commands for package group management:

* Groupinstall group1 [group2] [...]

* Groupupdate group1 [group2] [...]

* grouplist [hidden] [Groupwildcard] [...]

* Groupremove group1 [group2] [...]

* GroupInfo group1 [...]

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7D/BA/wKioL1busEXw0oGoAAA6RYo0Qh0999.png "title=" group management. PNG "alt=" Wkiol1busexw0ogoaaa6ryo0qh0999.png "/>

Yum command-Line options:

--nogpgcheck: No GPG check is allowed;

-y: Auto Answer "yes";

-Q: Silent mode;

--disablerepo=repoidglob: Temporarily disables the repo specified here;

--enablerepo=repoidglob: Temporarily enable the repo specified here;

--noplugins: Disable all plugins;

System publishers have deployed a lot of yum servers around the world, including some of the more famous mirror sites in the country:

Http://mirrors.aliyun.com

Http://mirrors.163.com

Http://mirrors.sina.com

These mirror sites will be synchronized with the publisher's Yum Library on a daily basis, and there are some helpful information, so we can also use these sites to configure our own Yum source.


Configure your own Yum Source: Yum profiles are typically placed in the following folder


/ETC/YUM.CONF: Providing public configuration for all containers

/etc/yum.repos.d/*.repo: Provides configuration for the point of the warehouse


Profile:/etc/yum.repos.d/*.repo, you can see the contents of each profile when you open it with the cat command

Definition of Warehouse point:

[Repositoryid]: Name of container (or software repository)

Name=some name for this repository: just to say the meaning of this container is not very important

baseurl=url://path/to/repository/, set the base container location, either a local address or an FTP server address, or a URL on a network server to set multiple

enabled={1|0},1 for opening this container, 0 for closing

Gpgcheck={1|0}, whether you need to consult the digital certificate in the rpm file

Gpgkey=url: The location of the public key file of the digital certificate, which can be set by reference to other warehouses


The variables available in the Yum repo configuration file:

$releasever: The major version number of the current OS release version;

$arch: platform;

$basearch: basic platform;

Example: The following is a mount of the disc image, set up the Yum repository.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7D/BA/wKioL1busIqi60yXAAAeS8kSDKE173.png "title=" disc mount. PNG "alt=" Wkiol1busiqi60yxaaaes8ksdke173.png "/>

Through the above settings we can use the resources on the Internet for software download, update and other operations.



This article is from the "over the Road" blog, please be sure to keep this source http://zpf461435.blog.51cto.com/11283159/1753277

Linux Program management: Yum Tools

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.