准备Centos 7 镜像文件
开启虚拟机
进来查询IP,可能会无法获得IP。因为安装过程没配置网络。
如果安装过程中没有配置IP的话配置一下静态IP,改为动态IP,自动获取IP
在上面路径下配置
把最后一行ONBOOT的no改为yes,激活网卡
然后保存退出
重启服务器service network start
ip a 查看 ,获得了IP
Centos7更换软件源
一定要先检查有没有安装wget。强烈建议先检查,如果没安装wget,可以先安装wget
yum install wget 下载wget
yum repolist enabled 查看软件源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 下载阿里云yum源文件
yum makecache 清理缓存