From cc5b7716e09ce6a7e426053bb4044d34a5b00ced Mon Sep 17 00:00:00 2001 From: Hoon Jo Date: Wed, 17 Jul 2024 10:49:14 +0900 Subject: [PATCH] upt CentOS repo change from mirror to vault --- ch3/3.1.3/config.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ch3/3.1.3/config.sh b/ch3/3.1.3/config.sh index 2b2a324..553e98b 100644 --- a/ch3/3.1.3/config.sh +++ b/ch3/3.1.3/config.sh @@ -9,7 +9,10 @@ swapoff -a sed -i.bak -r 's/(.+ swap .+)/#\1/' /etc/fstab # CentOS repo change from mirror to vault -sed -i 's,mirrorlist.centos.org,vault.centos.org,g' /etc/yum.repos.d/CentOS-Base.repo +sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-* +sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.conf +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-* +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 # kubernetes repo gg_pkg="http://mirrors.aliyun.com/kubernetes/yum" # Due to shorten addr for key