cnetos6.5 permanently changes the hostname method

After reading many blogs on the Internet, it is not very reliable. At least the hostname changed after I restarted. Later, I found that it only takes two steps.

first step:

vim /etc/hosts

Step 2:

vim /etc/sysconfig/network

complete .reboot reboot

Note: In the hosts file, do not move the original file, just add the name that needs to be changed.

Guess you like

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