Modify the host file hostname

# vi /etc/sysconfig/network 
NETWORKING=yes 
HOSTNAME=yourname //Modify hostname 
here NISDOMAIN=eng-cn.platform.com 

2. Modify the name in 
/etc/hosts # vi /etc/hosts 
127.0.0.1 localhost. localdomain localhost 
172.17.33.169 yourname //Modify the hostname here 

3. Finally execute under the terminal: 
#hostname ***** //***** is the modified hostname

The first and second are fundamental solutions, and the third is a temporary solution, which will no longer take effect after restarting

It is recommended that after modifying the network and hosts files, init 6

reboot the machine

Guess you like

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