CEntOS 7 Pin repository to specific version

  • Add releasevar

    echo 7.8.2003 > /etc/yum/vars/releasever

     

  • Update Repo URLs

    sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/centos/|baseurl=https://vault.centos.org/centos/|g' \ -i.bak \ /etc/yum.repos.d/CentOS-*.repo

     

  • Add EPEL Repos

    yum install -y epel-release

     

  • Update EPEL Repo URLs