步骤 1: 创建新的镜像源文件 cat <<EOF > /etc/yum.repos.d/CentOS-Base.repo [centos] name=CentOS-7 - Base baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/ gpgcheck=0 enabled=1 EOF 步骤 2: 清理缓存并重新生成缓存 yum clean all yum makecache 步骤 3: 查看可用的仓库 yum repolist