一、安装wget
1、访问阿里云镜像站
阿里云镜像站地址,根据服务器架构选择所需版本,以wget-1.14-18.el7_6.1.x86_64.rpm为例,点击下载到本地
2、在服务器/usr/local/下新建wget文件夹,将下载的wget安装包上传至该文件;
3、执行命令
cd /usr/local/wget
#安装
rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm
#查看是否安装成功
rpm -qa|grep "wget"
二、更换yum源
#阿里云镜像
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#添加EPEL
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#去除不存在的bazel镜像
yum-config-manager --disable bazel
# 清理已下载安装包
yum clean all
# 生成更新索引
yum makecache
# 更新Centos系统软件包
yum update