Linux-(15) YUM software Repository

Source: Internet
Author: User

Linux-(15) YUM software Repository

YUM (Yellowdog Update Modified) is an RPM front-end program designed to automatically resolve RPM dependency issues. Although it is convenient to manage software in rpm software packages, You need to manually resolve the dependency between software packages. In many cases, to install one or more (or even hundreds) other software first, manual solution is complicated.

YUM introduces the concept of repository (repo), which is used to store all rpm software packages. If there is a dependency when an rpm software is installed using yum, the dependent software is automatically located in the repository and installed. The repository can be local, or a centralized network repository can be used in the form of http, ftp, or nfs.

YUM uses the repository to save and manage the rpm software package. The repository configuration file is saved in the/etc/yum. repos. d/directory. The format is as follows:

[Virtual-box] name = This is virtualbox rpm soft repo baseurl = http ://...... enabled = 1 #(1 enabled, 0 disabled) gpgcheck = 1 # (whether to submit)
Configuration File rules:

 

The repository can be file, http, or nfs.

The yum configuration file must end with. reop

Configuration information of multiple repositories can be saved in one configuration file.

Multiple configuration files can be saved in the/etc/yum. repos. d/directory.

The baseurl can be dynamically obtained from the baselist.

Basic YUM usage commands:

Install the specified software: yum install software-name

Uninstall the specified software: yum remove software-name

Upgrade specified software: yum update software-name

YUM query:

Search: yum search keyword

List all/installed/latest/updated software: yum list all/installed/recent/updates

Display the specified software information: yum info packagename

Query which rpm software contains the target file: yum whatprovides fileName

We can also manually create a YUM repository for ease of use:

Copy all RPM files to a directory

Manually install createrepo using rpm commands

Run the createrepo-V/rpm-directory command.

If the group information is available, use the-g parameter to specify the group file: createrepo-g/tmp/* comps. xml/rpm-directory when running the command.

The group information of CentOS/RedHat is stored in the repodata/directory of the system disk. The file name is an xml file ending with comps. xml.

After being created, the local machine can be directly used in file mode. If you want to serve as an external YUM repository server, you can share it through http, ftp, or nfs.

YUM caches a lot of information to improve the speed, but sometimes the cache may cause some faults. You can run the following command to clear the cache: yum clean all

However, each installation or query operation reconstructs the cache.

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.