参考文章:linux系统更换国内阿里云yum源_linux更换阿里源-CSDN博客
备份原yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载阿里云centos7yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
更换后操作
清除 YUM 缓存
以确保 YUM 在下次操作时重新生成缓存
yum clean all
生成新的缓存
以便 YUM 可以使用新的软件源
yum makecache
检查是否指向新源
yum info 服务名称
yum info tigervnc-server