/etc/resolv.conf was emptied because there was no DNS server information in the/etc/sysconfig/network-scripts/ifcfg-eth0, so the system automatically uses/etc/sysconfig/after reboot Network-scripts/ifcfg-eth0 the settings in the/etc/resolv.conf,
Cause the modification/etc/resolv.conf to be invalid. Just add nameserver information to the/etc/sysconfig/network-scripts/ifcfg-eth0,
/etc/resolv.conf do not have to do any modification, system restart or network restart will automatically set the resolv.conf according to the Ifcfg-eth0.
You can configure the following information when you configure static IP
Device=eth0
Hwaddr=00:0c:29:63:6f:a4
Type=ethernet
Uuid=5446112a-ef22-493e-afa7-37821d9c3ccd
Onboot=yes
Nm_controlled=yes
Bootproto=static
ipaddr=192.168.15.22
netmask=255.255.255.0
gateway=192.168.15.2
broadcast=192.168.15.255
Ipv6init=no
dns1=192.168.15.2------------------------This configuration DNS1, resolve.conf file will automatically generate nameserver information, do not need to manually configure, you can have more than one DNS, but need to add numbers