YUM software management

Source: Internet
Author: User

As described in the previous blog, Zookeeper is very convenient, but RPM also has its inconveniences. The idea of open-source development without repeating the development wheel makes it possible to install an open-source software, it is always necessary to manually solve the dependency between software. Many software must install one or several other software before installation. It is very troublesome to manually solve this problem. You can use YUM to solve this problem.

YUM

Is an RPM front-end program. Its main purpose is to automatically resolve the automatic dependency relationship of RPM. Unlike RPM, YUM is not a new form of software encapsulation. It is dedicated to managing RPM. Its features are as follows:

-Automatic dependency resolution

-You can group the RPM and install the RPM based on the group.

-Introduced the concept of warehouse and supported multiple warehouses (as will be mentioned later)

-Simple configuration

YUM is used to solve the dependency between software. When installing a software, YUM will automatically find the software if it depends on another software. But how can it be found? So we introduced the concept of warehouse (repo ).

YUM Repository

The repository is used to store all existing rpm packages. When YUM installs an rpm package, if dependency exists, it searches for and installs the software in the repository, if no rpm software package is available in the repository, yum will solve the problem.

Never the dependency of the software.

The repository can be a local network or a centralized and unified network repository through HTTP, FTP, or NFS (many YUM repository servers are provided online ).

Yum uses the repository to save and manage the rpm software package, and stores the configuration file in the format of/etc/yum. repos. d/as follows:

[Reponame] // reponame is the repository name

Name = this is repo of huntinggo! // Although the name is written, the warehouse is introduced later.

Baseurl = http://hehe.com/yum/rpms // This can also be a local directory

Enabled = 1 // whether to enable this configuration option

Gpgcheck = 1 // whether to enable verification to prevent others from modifying the rpm package

The name of the configuration file is random, but must end with the. repo suffix.

You can have multiple configuration files in the/etc/yum. repos. d/directory.

A configuration file can store multiple Warehouse Information (that is, the preceding five rows ),

YUM basic commands

Yum install softwarename install specified Software

Yum remove softwarename uninstall specified Software

Yum update softwarename upgrade specified Software

YUM query command

The yum search hehe query keyword changes the description of all rpm Packages containing hehe.

Yum list (all/installed/recent/updates) lists all, installed, recent,

The information of the yum info softwarename query software is the same as that of rpm-qi.

Yum whatprovides filename: query the rpm software that contains the target file

All of the above is that the baseurl is http or other, and the rpm package is downloaded from the internet, so how to create a local yum repository?

YUM local repository

You can manually create a yum repository using the following methods:

1. Copy all rpm files to one file and add them

2. yum cannot scan the entire folder every installation. It is too slow. You must create an index file and install createrepo through rpm-ivh.

3. Create an index file in the directory of the createrepo-v yum repository. A folder named repodata appears in the current directory.

4. As mentioned above, create a file in the/etc/yum. repos. d/directory. Assume that the file name is hunting. repo and the content in the file can be as follows:

[Hunting]

Name = hunting's repo

Baseurl = file: // directory of the yum Repository

Enabled = 1

Gpgcheck = 1

Yum clear all can be used to clear the cache when software is installed.

Zookeeper

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.