sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.aliyun.com/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-Linux-AppStream.repo \ /etc/yum.repos.d/CentOS-Linux-BaseOS.repo \ /etc/yum.repos.d/CentOS-Linux-Extras.repo \ /etc/yum.repos.d/CentOS-Linux-PowerTools.repo \ /etc/yum.repos.d/CentOS-Linux-Plus.repo yum makecache yum install -y epel-release yum update -y sed -e 's|^metalink=|#metalink=|g' \ -e 's|^#baseurl=https\?://download.fedoraproject.org/pub/epel/|baseurl=https://mirrors.aliyun.com/epel/|g' \ -e 's|^#baseurl=https\?://download.example/pub/epel/|baseurl=https://mirrors.aliyun.com/epel/|g' \ -i.bak \ /etc/yum.repos.d/epel.repo