CentOS 7.0 local yum source address and configure yum address priority

Source: Internet
Author: User

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

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.