完整FQDN設定

啟動 httpd 服務時,若出現以下訊息,表示主機的 FQDN(Fully Qualified Domain Name)沒有完整設定。
# service httpd start
 Starting httpd: httpd: apr_sockaddr_info_get() failed for mailserver131.example.com
 httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

檢查主機名稱 # hostname
 mailserver131.example.com
# hostname -a
 hostname: Unknown host
# hostname -i
 hostname: Unknown host
# hostname -d
 hostname: Unknown host
# hostname -s
 mailserver131
# hostname -f
 hostname: Unknown host

修改 『/etc/hosts』『/etc/sysconfig/network』 等兩個設定檔 # vim /etc/hosts
 10.10.10.128 mailserver131.example.com mailserver131
# vim /etc/sysconfig/network
 HOSTNAME=mailserver131.example.com
# service httpd restart

沒有留言:

張貼留言