- 通过VMware Workstation创建虚拟机,系统安装完成后,需要配置相应网卡设置:
打开配置文件:vim /etc/sysconfig/network-scripts/ifcfg-ens33
为该网卡配置静态IP:
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=040cf83a-057e-44bf-b1a8-575878e45909
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.1.104
NETMASK=255.255.255.0
GATEWAY=192.168.1.2
NM_CONTROLLED=no
修改后,重启网卡服务:
systemctl restart network
- 配置域名解析DNS
打开配置文件:vim /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8