标签:hostname 输入 修改 配置 network sla localhost main master
1.修改文件vi /etc/sysconfig/network下的hostname,如:
NETWORKING=yes
HOSTNAME=master
2.修改文件:vi /etc/hosts
127.0.0.1 master localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
~
3.重启reboot
4.验证,输入命令 hostname
输出:master
5.配置ip和主机名映射关系表
vi /etc/hosts下添加
192.168.28.130 master
192.168.28.136 slave1
192.168.28.137 slave2
标签:hostname 输入 修改 配置 network sla localhost main master
原文地址:http://www.cnblogs.com/code4app/p/7225590.html