Virtual machine installation and set a fixed IP CentOS 7 and host exchange, the external network can configure

> 1. Create a new virtual machine

 > 2. Select the image

 

> 3. The next step after continuous custom hardware, the sound card and moving the printer

 

 

 

 > 4. After the automatic operation

 > 5. Installation selection server installation, no need to install the desktop

 

 > 6. The user setting information, to begin the installation

 Set a fixed iP

 > Virtual Machine 1. Click: Edit - Virtual Network Editor - Change settings

> 2 is set to NAT mode, and then remove the tick DHCP option, set the virtual machine subnets, click NAT settings

 

 > 3. Set gateway NAT settings, you need to follow the same network segment subnet

 

 > 4. After the setting is completed, enter centos7 command line interface, switching the root user, the following modifications:

#cd /etc/sysconfig/network-scripts/
#vi ifcfg-eno16777736
#将IPV6…..协议都注释;
BOOTPROTO=static        #开机协议,有dhcp及static;
ONBOOT=yes              #设置为开机启动;
DNS1=114.114.114.114    #这个是国内的DNS地址,是固定的;
IPADDR=192.168.10.4     #你想要设置的固定IP,理论上192.168.2.2-255之间都可以,请自行验证; NETMASK=255.255.255.0   #子网掩码,不需要修改; GATEWAY=192.168.10.1   #网关 上一步骤输入的网关IP。

 Restart the network:

service network restart

> 5.在VMware Network Adapter VMnet8的IPV4属性中设置该网段的任一个ip,不能跟之前的重复,子网掩码填255.255.255.0,默认网关不填

 

 

 
 

 

Guess you like

Origin www.cnblogs.com/Baronboy/p/12149820.html