set dns

vim /etc/resolv.conf (This file cannot be edited directly, otherwise it will be flushed, go to the network card to configure)
If there is no nameserver in it, it will prompt
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com


vim /etc /sysconfig/network-scripts/ifcfg-eth3 (my server ifcfg-eth1 seems to be unavailable)
add
DNS1=10.23.134.7 DNS1
=10.23.134.9

/etc/init.d/network restart


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326367542&siteId=291194637
Recommended