永久更改hostname主机名

vim /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=keepalived-nginx1
GATEWAY=192.168.33.2

vim /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.33.142  keepalived-nginx1

hostname keepalived-nginx1

reboot

posted @ 2017-10-20 13:42  Peter_Owen  阅读(556)  评论(0编辑  收藏  举报