The failure of Centos DNS restart solves the problem of installing the desktop through yum during the configuration of KT's poisonous women. Gnome is installed by default, and everything is normal before the restart, after the restart, when the configuration is continued, the network access is unavailable. ping and test the host unkown. The DNS problem is basically confirmed. Check/etc/resolv. conf file, found that # Generated by NetworkManager, this should be caused by the installation of gnome network management during the installation of the desktop, it takes over the network settings, but obviously this is not what I need, directly modify/etc/resolv. conf. After the server is restarted, the dns becomes invalid again. Solution 1: Modify/etc/resolv. conf: Add nameserver 8.8.8.8nameserver 8.8.4.4 and disable NetworkManager and service NetworkManager stop. Check whether the system is enabled. In this way, you can continue to use the dns defined by us. Solution 2 (recommended): Add dns information to the interface. edit/etc/sysconfig/network-scripts/ifcfg-ethX. The specific X is determined based on your Nic, add DNS1 = 8.8.8.8DNS2 = 8.8.4.4 save and restart the Network/etc/init. d/networking restart to solve the problem. Solution 3 (not tested, provided by netizens): Modify/etc/resolv. conf and Set permissions to permanently write data to the custom DNS. After adding a nameserver according to solution 1, run chattr + I/etc/resolv. conf. This command modifies the file attribute so that only the root user can modify the file. (You can change the parameter to "-I "). Then run service NetworkManager restart.