| |

VerySource

 Forgot password?
 Register
Search
View: 768|Reply: 0

Modify CentOS default yum source address to improve download speed

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-24 18:30:37
| Show all posts |Read mode
There are two ways:

[color= rgb(77, 77, 77)]1. Install yum-fastestmirror to automatically select the fastest mirror to download
2. Change the download mirror address and select the domestic mirror address to download

Remarks: If yum-fastestmirror is installed, since the mirror address is selected dynamically, the modified mirror address may be invalid.


1. Download yum-fastestmirror: yum install yum-plugin-fastestmirror

[size= 18px] 2. The main open source open source mirror sites in China should be NetEase and Alibaba Cloud. The following are the methods to replace Alibaba Cloud and NetEase:

[ font=-apple-system,&quot] 1. Modify the CentOS default yum source to mirrors.aliyun.com[/ color]
1. First back up the yum source configuration file that comes with the system /etc/yum.repos.d/CentOS-Base.repo

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

[color=rgb(77, 77, 77) ]2, enter the folder where the yum source configuration file is located

cd /etc/ yum.repos.d/

3. Download aliyun Yum source configuration file to /etc/yum.repos.d/

CentOS 7:

wget -O /etc/yum.repos.d /CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo[/ b]

CentOS 6:[ /color]

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors. aliyun.com/repo/Centos-6.repo[/bac kcolor]

CentOS 5:[ /size]

wget -O /etc/yum.repos.d/CentOS-Base.repo [backcolor= transparent]http://mirrors.aliyun.com/repo/Centos-5.repo

4. Run yum makecache to generate cache

yum makecache[ p=26, null, left]5, update the system[/color ]

yum -y update

[size= 18px] 2. Modify CentOS default yum source to mirrors.163.com
1. First back up the yum source configuration file that comes with the system /etc/yum.repos.d/CentOS-Base.repo

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

[color=rgb(77, 77, 77) ]2, enter the folder where the yum source configuration file is located

cd /etc/ yum.repos.d/

3, download 163 Yum source configuration file to /etc/yum.repos.d/

CentOS 7:

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

[color =rgb(77, 77, 77)]CentOS 6:

wget [color =rgb(103, 149, 181)]http://mirrors.163.com/.help/CentOS6-Base-163.repo[p= 26, null, left][font =-apple-system,&quot]CentOS 5:

wget [backcolor =transparent]http://mirrors.163.com/.help/CentOS5-Base-163.repo

4. Run yum makecache to generate cache

yum makecache[ /b]

5, update the system[/font ]

yum -y update

Note:
mirrors.aliyun.com
mirrors.163.com
mirror.lzjtu.edu.cn
Archlinux source
Server = http://mirrors.163.com/archlinux/$repo/os//i686
Server = http://mirror.lzjtu.edu.cn/archlinux/$repo/os/i686

Tianjin University ubuntu

http://202.113.13.45:9527/ubuntu-dist

Nankai University debian

ftp://202.113.29.4/Debian/debian/
http://202.113.29.3/debian/debian/
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list