[Switch] centos: Change Yum source to domestic

Source: Internet
Author: User

Http://blog.csdn.net/pkueecser/article/details/8836973

Important: storage path

  

cd /etc/yum.repos.d

Back up CentOS-Base.repo first

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

Method 1: directly download the source file

Centos USTC mirror is a good image. You can update and use this image.

# Yum-y install wget

# Cd/etc/yum. Repos. d

# Mv CentOS-Base.repo CentOS-Base.repo.save

# Wget http://centos.ustc.edu.cn/CentOS-Base.repo

NOTE: If it is the first time to install a new system, you need to first install the wget download software, otherwise there is no way to download the CentOS-Base.repo file.

Method 2: manually create source files

Change the yum image site to the Chinese site address. We recommend that you use http://centos.ustc.edu.cn/centos /. (China University of Science and Technology)

# Cd/etc/yum. Repos. d/

# Mv CentOS-Base.repo CentOS-Base.repo.bak

# Vi CentOS-Base.repo

Save and run

Yum makecache

Generate Cache

 

[Switch] centos: Change Yum source to domestic

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.