Configure yum source for RedHat software package management

Source: Internet
Author: User
Tags yum repolist
As a package management tool in Linux, Yum effectively solves many inconveniences (such as complex dependencies) when installing software packages ). The following describes how to configure the yum source for the Local Machine for free installation of software. The Yum source can be a local yum source specified by the local machine, or an external yum source such as FTP or HTTP. The configuration files for yum mainly include ①/etc/yum. conf, ②/etc/yum. repos. d/*. repo (this yum configuration file must be named *. r

As a package management tool in Linux, Yum effectively solves many inconveniences (such as complex dependencies) when installing software packages ). The following describes how to configure the yum source for the Local Machine for free installation of software.

The Yum source can be a local yum source specified by the local machine, or an external yum source such as FTP or HTTP. Configuration files for yum mainly include ①/etc/yum. conf, ②/etc/yum. repos. d /*. repo (this yum configuration file must be named *. repo ).

①: Where

Cachedir =/var/cache/yum

Gpgcheck = 1 specifies whether verification is performed when the software package is installed. 1 indicates verification, which is generally used when an external yum source is specified.

②: The format is as follows:

[Base], alias

Name = Instructor Server Repository, alias

Baseurl = ftp://instructor.example.com/pub/Server specifies the yum source location

Gpgcheck = 0 specifies whether verification is performed when the software package is installed.

You can specify multiple segments to separate different class packages.

1. to specify a local directory, change baseurl = file: // LOCALDIR

2 to specify the ftp source, baseurl = ftp: // IP | FQDN

For example, ftp: // 192.168.1.1/root/Server

3 to specify an http source, baseurl = http: // IP | FQDN

Such as: http://mirrors.163.com/CentOS/Server

At this point, the yum source has been created. It is best to use "yum repolist" to check whether the rpm package on the specified source can be displayed. Then, Run "yum clean all" to clear the Yum cache, then it can be used frequently.

The attachment content is/etc/yum. repos. d/*. repo instance.

 

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.