Skip to content

Commit

Permalink
Try the nuclear option
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Jul 23, 2024
1 parent 4561180 commit f5bb23e
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion scripts/install_redhat_centos_7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,49 @@
mpi_lib=mpich-devel

# CentOS 7 is EOL as of 2024-06-30, so we need to use the vault
sed -i 's,^mirrorlist=,#,; s,^#baseurl=http://mirror\.centos\.org/centos/$releasever,baseurl=https://vault.centos.org/7.9.2009,' /etc/yum.repos.d/CentOS-Base.repo
contents=$(cat << EOF
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[centos-sclo-rh]
name=CentOS-$releasever - SCLo rh
baseurl=http://vault.centos.org/7.9.2009/sclo/$basearch/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[centos-sclo-sclo]
name=CentOS-$releasever - SCLo sclo
baseurl=http://vault.centos.org/7.9.2009/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
)
echo "${contents}" > /etc/yum.repos.d/CentOS-Base.repo

yum clean all
yum makecache

Expand Down

0 comments on commit f5bb23e

Please sign in to comment.