Install the virtual machine in accordance with VirtualBox Standard mode
To ensure that the virtual machine is connected properly and that the virtual machine is locally accessible outside the virtual machine, you need to configure two network cards
The first one is set to NAT, the second is set to Host-only
And then:
Under the/etc/sysconfig/network-scripts/directory, modify the Ifcfg-eth0 NIC configuration:
Change onboot= "No" to Yes, add bootproto= "DHCP", save, exit, restart
Ping www.baidu.com available;
Ping 192.168.56.* available;
Look at IP addr, found that the virtual machine IP is dynamically configured, so that the wrong, the local cannot easily access the virtual machine, also indicates that the connection Xshell is troublesome, so to change the local IP to static, so modify the IFCFG-ETH1 network adapter configuration:
Bootproto=static #获取IP的方式是dhcp或bootp自动获取, Static is fixed Ip,none is manual
ipaddr=192.168.56.2
netmask=255.255.255.0
Reboot, Perfect ~
Install CENTOS7 network configuration under VirtualBox