1.2 Zookeeper pseudo-cluster installation
Zookeeper stand-alone installation configuration to view 1.1 zookeeper stand-alone installation
1, copy three copies of Zookeeper, respectively, ZOOKEEPER-3.4.7-NODE1,ZOOKEEPER-3.4.7-NODE2,ZOOKEEPER-3.4.7-NODE3
2. Modify the configuration file under each Zookeeper folder
Most configurations are the same as a single machine, with the core server configuration
server.1=localhost:2887:3887
server.2=localhost:2888:3888
server.3=localhost:2889:3889
Server. A=B:C:D:
A is a number that indicates which is the first server, and B is the IP address of the server.
c The first port is used for the information exchange of the cluster members, which represents the port that the server exchanges information with the leader server in the cluster.
D is used exclusively for election leader when the leader is hung out.
3. Create server label, the contents of a in server configuration above
Create the myID file under the DataDir of each zookeeper service configuration, the number of the file content is a
Example: Creating a myID file in the first zookeeper service,vim /usr/java/zookeeper/zookeeper-3.4.7-node3/data/myID, content set to 1
4, start the same service and start the same, enter the corresponding zookeeper service path, start three services in turn
1.2 Zookeeper pseudo-cluster installation