centos6.5 修改主机名

vim /etc/sysconfig/network 修改主机名


NETWORKING=yes

HOSTNAME=ongonginging.org

NETWORKING_IPV6=no

PEERNTP=no

GATEWAY=182.92.235.247


vim /etc/hosts 新增主机名


127.0.0.1  ongonginging.org  localhost

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 ongonginging.org

10.171.91.199 iZ25kyy8d7dZ


想要立即生效可以在命令行输入:

hostname ongonginging.org

你可能感兴趣的:(centos6.5 修改主机名)