分类: LINUX
2012-05-02 11:28:16
很多东西会用到FQDN,比如sendmail
Linux缺省先从/etc/hosts寻找FQDN
grep -i "^host" /etc/nsswitch.conf
hosts: files dns
先设置hostname
grep HOST /etc/sysconfig/network
HOSTNAME=db1
vi /etc/hosts
192.168.2.12 db1.domain.dev db1
记住先设置FQDN,再设置hostname
测试
hostname
hostname -f
dnsdomainname