更改centos的hostname
临时更改法:
[root@vagrant-centos65 ~]# hostname
vagrant-centos65.vagrantup.com
[root@vagrant-centos65 ~]# hostname node
[root@vagrant-centos65 ~]# hostname
node
永久更改法:
[root@vagrant-centos65 etc]# vi /etc/sysconfig/network
#HOSTNAME=vagrant-centos65.vagrantup.com
HOSTNAME=node1
NETWORKING=yes
重启之后即可
[root@vagrant-centos65 etc]# reboot
[root@vagrant-centos65 etc]#
[root@node1 ~]#