CentOS If you change Yum Update source detailed _linux

Source: Internet
Author: User
Tags gpg

Objective

We all know that CentOS has a very convenient software installation tool yum, but the default installation CentOS, the system is using foreign CentOS update source, which caused us to use the default update source to install or update the software when the problem is very slow.

In order to use the Yum tool to quickly install the update software, we need to configure the default Yum update source as a domestic update source. The Yum update source configuration file is located under the CentOS directory/etc/yum.repos.d/.

First of all, provide several rapid domestic update sources:

Education network resources:

1 Shanghai Jiaotong University: http://ftp.sjtu.edu.cn/centos/

Server is located in Beijing, China Education Network Center, download speed up to 10 m.

North Users and Education network users recommend, fast.

You need to manually create the Centos-base.repo file.

2 China University of Science and Technology: http://centos.ustc.edu.cn

The server is located in Hefei. Recommended by southern users. Similarly, the Cenos version is very rich and suitable for long-term use.

Non-education network resources:

1 Sohu Open source mirror server: http://mirrors.sohu.com/

Server located in Shandong province Unicom

2 Open Source server image of NetEase: Http://mirrors.163.com/centos

Speed is also good, the national user recommended

In a word, we can ping a new source before use, and see which one is used quickly.

Centos-base.repo file example, this file is in this directory/etc/yum.repos.d/

[Base]

name=centos-$releasever-base

baseurl=http://mirrors.163.com/centos/6.4/os/$basearch/

gpgcheck=1

[Updates]

name=centos-$releasever-updates

baseurl=http://mirrors.163.com/centos/6.4/updates/$basearch/

Gpgcheck =1

gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
[Addons]

name=centos-$releasever-addons

baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/

Gpgcheck=1

gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
[Extras]

name=centos-$releasever-extras

baseurl=http://mirrors.163.com/centos/6.4/extras/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
[Centosplus]

name=centos-$releasever-plus

baseurl=http://mirrors.163.com/centos/6.4/centosplus/$basearch/

gpgcheck= 1

enabled=0

gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

As you can see from the above configuration file, you need to have a choice of configuration [base] [updates] [addons] [extras] [Centosplus] according to each home source situation.

Each item can be modified baseurl and gpgkey as the corresponding source address.

After the above configuration is complete, to empty the Yum cache and rebuild the Yum cache, execute the following command:

Yum Clean all && yum-metadata && yum clean dbcache && yum makecache && Yum Update

Summarize

The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.

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.