vmware安装Oracle Linux 6.5,使用DHCP,每次重启时会自动修改/etc/resolv.conf文件中的nameserver项。
观察到设置nameserver项会导致该服务器上安装的oacle lsnrctl和tnsping等响应缓慢,同时ssh也变得很慢,必须将nameservers项注释掉。但每次重启服务器该文件都会被修改,nameserver被重新设置。
避免这种情况的方法之一:
Modify your interface configuration file such as /etc/sysconfig/network-scripts/ifcfg-eth0 file and append any one of the following option:
# do not overwrite /etc/resolv.conf ##
PEERDNS=no
OR
## use the following nameservers in /etc/resolv.conf ##
PEERDNS=no
DNS1=8.8.8.8
DNS2=1.2.3.4
Save and close the file. Where,
PEERDNS=yes|no - Modify /etc/resolv.conf if peer uses msdns extension (PPP only) or DNS{1,2} are set, or if using dhclient. default to "yes".
DNS{1,2}= - Provide DNS addresses that are dropped into the resolv.conf file if PEERDNS is not set to "no".
问题解决,进图形化界面看了一下,实际上就是把网卡设置改为了DHCP address only
观察到设置nameserver项会导致该服务器上安装的oacle lsnrctl和tnsping等响应缓慢,同时ssh也变得很慢,必须将nameservers项注释掉。但每次重启服务器该文件都会被修改,nameserver被重新设置。
避免这种情况的方法之一:
Modify your interface configuration file such as /etc/sysconfig/network-scripts/ifcfg-eth0 file and append any one of the following option:
# do not overwrite /etc/resolv.conf ##
PEERDNS=no
OR
## use the following nameservers in /etc/resolv.conf ##
PEERDNS=no
DNS1=8.8.8.8
DNS2=1.2.3.4
Save and close the file. Where,
PEERDNS=yes|no - Modify /etc/resolv.conf if peer uses msdns extension (PPP only) or DNS{1,2} are set, or if using dhclient. default to "yes".
DNS{1,2}= - Provide DNS addresses that are dropped into the resolv.conf file if PEERDNS is not set to "no".
问题解决,进图形化界面看了一下,实际上就是把网卡设置改为了DHCP address only
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8558093/viewspace-1166116/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8558093/viewspace-1166116/