配置网卡
https://blog.csdn.net/weixin_42541479/article/details/118407951
1、安装centos7的时候注意选择两个网卡
两个网卡分别为:
nat(虚拟机访问互联网,使用10.0.2.x段)
host-only(虚拟机和主机互相通信,使用192.168.56.x段)
在偏好设置里面设置网络。如下图配置:
2、配置网络
3、开机,进入 cd /etc/etc/sysconfig/network-scripts/ 目录
cd /etc/sysconfig/network-scripts/
ls

vi ifcfg-enp0s3

vi ifcfg-enp0s8

service network restart

4、验证