At the beginning of learning Linux, do not know how to configure the IP address, Baidu and do their own experiments, finishing the following information:
First, display the current network card configuration information
[email protected] ~]# Ifconfig
(The system that is usually installed is not configured with an IP address, and the firewall is turned off)
Second, jump to the configuration folder, command with cd/etc/sysconfig/network-scripts/
[Email protected] ~]# cd/etc/sysconfig/network-scripts/
Third, check the NIC configuration file name, for example: Ifcfg-ens33
[[email protected] network-scripts]# ls
Ifcfg-ens33
Iv. editing the configuration file with VI
[Email protected] network-scripts]# VI ifcfg-ens33
Enter the following after entering the VI interface:
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 "NAME=" Ens33 "uuid=" 718afcbf-931e-4c0c-a23f-bfc3c13023c2 "device=" en33 "onboot=" yes "hwaddr=" 00:0C:29:08:78:B1 "IPADDR=" 192.168.0.199 "netmask=" 255.255.255.0 "gateway=" 192.168.0.2 "
When you are done editing, press: wq! Save exit.
Configure virtual network editor under VMware Workstation, Debug Vmnet1 as host mode, IP address segment is 192.168.0.0, choose to connect the host virtual adapter to this network, and the virtual machine CentOS7 enable the Vmnet1 NIC;
VI. Set the physical machine with VMware Workstation IP address of 192.168.0.111, subnet mask 255.255.255.0, and shut down Windows Firewall;
Seven, in the Windows system, open cmd, run ping 192.168.0.199, can ping through, OK, no check whether the firewall is turned on and off.
How to configure the IP address for the Vmware installed CentOS 7