CentOS7 modify hostname

Modifying the hostname under CentOS requires three steps

1. Use the command: hostname to modify

shell>hostname www

    

2. Modify the /etc/sysconfig/network file:

NETWORKING=yes
HOSTNAME=wang.localdomain

 

3. Modify the /etc/hosts file:

127.0.0.1  wang.localdomain new-hostname

 

 

From: http://www.cnblogs.com/anjou/archive/2007/08/04/842705.html

Reference: http://www.cnblogs.com/kerrycode/p/3595724.html

 

 

 

 

 

Guess you like

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