Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to modify CentOS image to domestic Ali cloud source or 163source

Shulou Source: shulou.com Published: 2022-06-02 04:44:23 09月30日 Update

This article mainly introduces "CentOS how to modify the image for the domestic Ali cloud source or 163source", in the daily operation, I believe that many people have doubts about how to modify the image to the domestic Ali cloud source or 163source. The editor consulted all kinds of data and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for you to answer the doubt that "CentOS how to modify the image to the domestic Ali cloud source or 163source". Next, please follow the editor to study!

Aliyun Linux installation software image source

Thanks to the rapid development of Aliyun, Aliyun is a new mirror source recently.

Aliyun Linux installation image source address: http://mirrors.aliyun.com/

Step 1: back up your original image file so that it can be restored after an error.

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

Step 2: download the new CentOS-Base.repo to / etc/yum.repos.d/

CentOS 5

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Step 3: run the following command to generate the cache

Yum clean all

Yum makecache

NetEase installs software image source

NetEase open source mirror station: http://mirrors.163.com/

Step 1: back up your original image file so that it can be restored after an error.

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

Step 2: download the new CentOS-Base.repo to / etc/yum.repos.d/

CentOS 5

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo

CentOS 6

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

CentOS 7

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

Step 3: run the following command to generate the cache

Yum clean all

Yum makecache

At this point, the study on "how to modify the image of CentOS to domestic Ali cloud source or 163source" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Mirror Ali learning commands backup files more cache software NetEase help generate run practical next address article method theory knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi Docker MySQL Huawei