43 lines
1.0 KiB
Bash
Executable File
43 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Fix CentOS 7 repository URLs to use vault.centos.org
|
|
|
|
echo "Fixing CentOS 7 repository URLs..."
|
|
|
|
# Backup original repo files
|
|
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2>/dev/null || true
|
|
|
|
# Create new CentOS-Base.repo pointing to vault.centos.org
|
|
cat > /etc/yum.repos.d/CentOS-Base.repo << 'REPO_EOF'
|
|
[base]
|
|
name=CentOS-7 - Base
|
|
baseurl=http://vault.centos.org/7.9.2009/os/x86_64/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
|
enabled=1
|
|
|
|
[updates]
|
|
name=CentOS-7 - Updates
|
|
baseurl=http://vault.centos.org/7.9.2009/updates/x86_64/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
|
enabled=1
|
|
|
|
[extras]
|
|
name=CentOS-7 - Extras
|
|
baseurl=http://vault.centos.org/7.9.2009/extras/x86_64/
|
|
gpgcheck=1
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
|
enabled=1
|
|
|
|
[centosplus]
|
|
name=CentOS-7 - Plus
|
|
baseurl=http://vault.centos.org/7.9.2009/centosplus/x86_64/
|
|
gpgcheck=1
|
|
enabled=0
|
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
|
REPO_EOF
|
|
|
|
# Clean yum cache
|
|
yum clean all
|
|
yum makecache
|