Modify to static IP:
this path:
cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.159.136 NETMASK=255.255.255.0 GATEWAY=192.168.159.2
Ifconfig sees eth0 network card
Restart province takes effect
/etc/init.d/network restart
---------------------------------------------------------------------------------------------------------------------------------------------
Before configuring DNS, turn off the following services and turn off NetworkManager:
service NetworkManager stop #stop service
chkconfig NetworkManager off #Disable the service, it will not start automatically next time
Configuration of specific DNS resolution: After vi /etc/resolv.conf, add the following line of configuration to the last line
nameserver 8.8.8.8