Skip to content

Commit

Permalink
upt CentOS repo change from mirror to vault
Browse files Browse the repository at this point in the history
  • Loading branch information
sysnet4admin committed Jul 17, 2024
1 parent cc5b771 commit 4c2c5a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ch4/4.3.4/k8s-SingleMaster-18.9_9_w_auto-compl/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ swapoff -a
# sed to comment the swap partition in /etc/fstab
sed -i.bak -r 's/(.+ swap .+)/#\1/' /etc/fstab

# CentOS repo change from mirror to vault
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
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
Expand Down

0 comments on commit 4c2c5a0

Please sign in to comment.