一.更换镜像
1.备份本地源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2.安装阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3.清除本地缓存
yum clean all
4.加载最新缓存
yum makecache
5.阿里云镜像地址
https://developer.aliyun.com/mirror/centos
二.静态IP地址
1.进入配置文件
vim /etc/sysconfig/network-scripts/ifcfg-ens33
2.更改配置文件如下
连接的ip地址是多少将IPADDR替换掉即可,GATEWAY是网关IP,在虚拟机的网络设置中查看
3.重启网络服务
systemctl restart network