1. Download zookeeper-3.4.6.tar.gz
2. Decompression Compression Package TAR-ZXVF zookeeper-3.4.6.tar.gz
3. Rename folder zookeeper-3.4.6 to Zookeeper1
4. The same steps performed 2 times
5.CD zookeeper1/conf/
6.VI zoo.cfg
7. Modify the directory where the zookeeper saves data--------Datadir=/opt/zookeeper/zookeeper1/data.
8. The client connects to the zookeeper server's port, zookeeper listens to the port, accepts the client's access request------clientport=2185.
9. Add Server. X=A:B:C where x is a number, which means this is the first date server. A is the IP address of the server. b Configure the ports used by the leader Exchange messages in this server and in the cluster. C Configure the port to use when electing leader. Because the configuration is pseudo cluster mode, the B, c parameters of each server must be different.
server.1=127.0.0.1:2887:3887
server.2=127.0.0.1:2888:3888
server.3=127.0.0.1:2889:3889
10. Enter the data directory, touch myID file, vi myID, write 1.
11. Repeat operation two times, pay attention to modify Datadir=/opt/zookeeper/zookeeper2/data, Datadir=/opt/zookeeper/zookeeper3/data; clientPort=2186, Clientport=2187;myid Write to 2,myid write 3.
12 Enter the bin directory under Zookeeper1 respectively.
13 start Zookeeper1./zkserver.sh Start (note: The bin directory under the log file Zookeeper.out, can not afford to see the cause of the error here).
14 Start Zookeeper2,zookeeper3 separately.
15 See if the startup is successful (all zookeeper in the cluster are started to view)./zkserver.sh status.