CentOS 7X使用阿里云CentOS的yum源
1.备份原有repo文件
#cd /etc/yum.repos.d
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载repo文件
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
提示:-bash: wget: command not found
明显没有安装wget软件包,好吧,接着搞。
下载wget的软件包
https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/wget-1.14-18.el7.x86_64.rpm
安装:
rpm -ivh wget-1.14-18.el7.x86_64.rpm
接着回到步骤 2
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
vim升级失败,待解决