CentOS modify yum update source

Source: Internet
Author: User
Tags gpg

CentOS modify yum update source

When CentOS software is installed or updated, the yum method is the easiest and most convenient. By default, the yum update source address is unstable. Therefore, you need to modify the update source address, generally, 163 is faster in China.

Yum update source profile:/etc/yum. repos. d/CentOS-Base.repo

1. Back up the file before modification

Cp/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.bak

2. Modify the update source configuration file (CentOS6 address, similar to other versions)

Vim open the configuration file:

Vim/etc/yum. repos. d/CentOS-Base.repo

Copy and paste the following content to the configuration file:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and
# Update status of each mirror to pick mirrors that are updated to and
# Geographically close to the client. You shoshould use this for CentOS updates
# Unless you are manually picking other mirrors.
#
# If the specified list = does not work for you, as a fall back you can try
# Remarked out baseurl = line instead.
#
#
[Base]
Name = CentOS-$ releasever-Base
Baseurl = http://mirrors.oschina.com/centos/?releasever/ OS /?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[Updates]
Name = CentOS-$ releasever-Updates
Baseurl = http://mirrors.oschina.com/centos/?releasever/updates/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[Addons]
Name = CentOS-$ releasever-Addons
Baseurl = http://mirrors.oschina.com/centos/?releasever/addons/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[Extras]
Name = CentOS-$ releasever-Extras
Baseurl = http://mirrors.oschina.com/centos/?releasever/extras/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[Centosplus]
Name = CentOS-$ releasever-Plus
Baseurl = http://mirrors.oschina.com/centos/?releasever/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

Finally, save the configuration file.

3. Update yum source configuration

Yum update

(If you do not want to update the software, select N)

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

This article permanently updates the link address:

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.