cd /etc/yum.repos.d/ wget http://mirrors.aliyun.com/repo/Centos-7.repo 把名字改成原来系统自带的源的名字 把里面的两个环境变量替换成 7 和 x86_64