-
VM and CentOS7 installation reference: VM15 installation , CentOS7 installation
-
When we install CentOS7, we need to assign an ip to the system, enter root privileges, and
dhclient
dynamically assign an ip address to the linux system; but this is only a dynamic assignment, and the ip will be unavailable after the next startup. This ip needs to be statically set to this system;
To set the static ip, first enter to vi /etc/sysconfig/network-scripts/ifcfg-ens33
edit the file, and modify it as follows:
If the gateway address is configured incorrectly, the centos system will not be able to access the external network;
注意:
After modifying the above file, to restart the network, commandsystemctl restart network.service
Click virtual machine edit
At this time, you can Ping the external network address
[root@mina0 hadoop]# systemctl stop NetworkManager
[root@mina0 hadoop]# systemctl disable NetworkManager