1. Configure static IP, modify the configuration file vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:11:E0:1D
TYPE=Ethernet
UUID=3c7ce4de-e0ef-4d05-a862-7ff37c2bf53b
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.5.106
GATEWAY=192.168.5.1
2. Configure the DNS server to modify the configuration file /etc/resolv.conf
nameserver 119.29.29.29
3. Modify the hostname Modify the configuration file vi /etc/sysconfig/network
HOSTNAME=centos (set the hostname of the machine, the hostname set here should correspond to the hostname set in /etc/hosts)
Start the zookeeper command zkServer.sh start, check the startup log file zookeeper.out after startup, if no error is reported, the startup is normal, if the following error is reported, it may be that the CentOS firewall is not closed
4. View zookeeper status
./zkServer.sh status
5.centOS 6.8 turn off the firewall steps
Check firewall status: service iptables status
Stop the firewall: service iptables stop
Start the firewall: service iptables start
Restart the firewall: service iptables restart
Permanently shut down the firewall: chkconfig iptables off
run two commands at the same time, check the firewall shutdown status
service iptables status after the operation is complete