Skip to content

Commit cc5b771

Browse files
committed
upt CentOS repo change from mirror to vault
1 parent 30c13c8 commit cc5b771

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ch3/3.1.3/config.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ swapoff -a
99
sed -i.bak -r 's/(.+ swap .+)/#\1/' /etc/fstab
1010

1111
# CentOS repo change from mirror to vault
12-
sed -i 's,mirrorlist.centos.org,vault.centos.org,g' /etc/yum.repos.d/CentOS-Base.repo
12+
sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-*
13+
sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.conf
14+
sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\$basearch\//baseurl=https:\/\/vault.centos.org\/7.9.2009\/\1\/\$basearch\//g' /etc/yum.repos.d/CentOS-*
15+
sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\$basearch\//baseurl=https:\/\/vault.centos.org\/7.9.2009\/\1\/\$basearch\//g' /etc/yum.conf
1316

1417
# kubernetes repo
1518
gg_pkg="http://mirrors.aliyun.com/kubernetes/yum" # Due to shorten addr for key

0 commit comments

Comments
 (0)