1、修改主机名
Sudo vi /etc/sysconfig/network(需要重启)
Hostname master (不需要重启,设置当前主机名为master)
Hostname查看当前主机名
2、关闭防火墙
Sudo vi /etc/sysconfig/selinux
修改SELinux=disable(需要重启生效)
sudo service iptables stop
sudo chkconfig iptables off
sudo chkconfig iptables --list
3、linux重启命令行
Sudo reboot
4、网络设置
Sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
IPADDR=192.168.1.107
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
DNS1=8.8.8.8
DNS2=8.8.4.4
GATEWAY=192.168.1.1
service network restart (重启网卡)
5、设置host
Sudo vi /etc/hosts
127.0.0.1 localhost
192.168.1.107 master
192.168.1.108 slave1