CentOS 7.0 local yum source address and configure yum address priority
First, attach the basic local CentOS 7.0 yun source address and epel Source Address:
Vi/etc/yum. repos. d/CentOS-local.repo
Add the following content:
[Base-local]
Name = CentOS-local
Baseurl = http: // 192.168.1.200/yum/centos/7.0/OS/x86_64
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Priority = 1
[Updates-local]
Name = CentOS-local
Baseurl = http: // 192.168.1.200/yum/centos/7.0/updates/x86_64
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Priority = 1
Vi/etc/yum. repos. d/CentOS-local-epel.repo
Add the following content:
[Base-local-epel]
Name = CentOS-local
Baseurl = http: // 192.168.1.200/yum/epel/centos/7.0/OS/x86_64/
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Priority = 1
1. Install the yum-plugin-priorities package
# Yum install yum-plugin-priorities
2. Modify the priority of the CentOS-Base.repo and CentOS-local.repo in the/etc/yum. repos. d directory
// Simply add priority = N.
Attachment CentOS-Base.repo file configuration:
Configure the CentOS-local.repo File
It can be seen that the local yum source has a higher priority than the base source on the official website. Therefore, during the yum installation package, the local source will be searched first.
4. Verification:
Yum clean all
Yum install vim
It shows that the rpm package of vim is searched in the local base-local source.
Note:
1. To make the priority parameter valid, you must install the yum-plugin-priorities plug-in.
2. N is an integer. The default priority is 99. The smaller the value, the higher the priority;
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning
Build yum local source on CentOS 6.4