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.