Study Address: http://blog.csdn.net/u011317027/article/details/70738246
After recently using VMware to install cent OS7, you need to upload some files to the virtual machine using the FTP appliance, but the IP addr command to see the IP is 127.0.0.1, so the dynamic IP needs to be set to static.
1, edit the ifcfg-eth* file, * is an indeterminate number, some may be 0, and my is 33,ifcfg-eth33, specifically what the number is uncertain, this does not matter. Some netizens said no ifcfg-eth0 on the new one, I think it is wrong, no ifcfg-eth0 to see there is no ifcfg-eth1 or IFCFG-ETHN,
Vim/etc/sysconfig/network-scripts/ifcfg-eth33
2, set the content:
Modify the original:
BOOTPROTO=DHCP changed to Static
onboot=yes# #开机启动
Then add
ipaddr=192.168.1.29# Static IP
gateway=192.168.28.1# #默认网关
netmask=255.255.255.0# #子网掩码
dns1=192.168.28.1# Configuring DNS
3, restart Network, use SYSTEMCTL or service.
Service Network restart
4, then you can use the IP addr command to view the modified IP, using the FTP tool to upload files smoothly!
How to set up static IP in Linux