hortonworks 要求hostname(例如:hw-01) 和 hostname -f? (hw-01.hdp.com)必須顯示正確
1. 修改/etc/hostname
/etc/hostname 修改完成后
2.修改/etc/hosts啡莉, 添加一條數(shù)據(jù) <本機ip> <Fully Qualified Domain Name> <hostname>, 例如:
192.168.1.245 hw-01.dhp.com hw-01
添加Fully Qualified Domain Name/ hostname 到/etc/hosts
echo "192.168.1.93 hw-03.hdp.com hw-03" >>/etc/hosts
echo "192.168.1.25? hw-02.hdp.com hw-02" >>/etc/hosts
echo "192.168.1.245 hw-01.hdp.com hw-01" >>/etc/hosts
3. 重啟server
4.確保重啟server 后瞭亮。 效果如下
驗證hostname 和 hostname -f 命令