Centos7 configure a static IP connection and use the remote xshell

1. network adapter settings

Configure virtual machine network adapter NAT mode, and acquires the NAT mode as follows

 2. NIC configuration file editing

Execute the command: vi / etc / sysconfig / network-scripts / ifcfg-ens33 editing card configuration file, edit the file before and after the change are as follows:

 Need to confirm and change the configuration as follows:

BOOTPROTO = "static" (static)
ONBOOT = "yes" (the boot from Kai)

= The IPADDR "192.168.177.120" (the IP)
NTSMASK = "255.255.255.0" (subnet mask)
the GATEWAY = "192.168.177.2" (gateway)
the DNS1 = "119.29.29.29" (this is the generic DNS)

3. Network Service Restart

Execute the command: systemctl restart network.service

4. Check whether the change is completed

4. Test Network Connectivity

5. Use connected xshell

 

Guess you like

Origin www.cnblogs.com/zjfjava/p/12004156.html