in this example, the master node has the host name of Master, and the hostname of the slave node is slave1,slave2,slave3, the user name is Hadoop, and the zookeeper version used is zookeeper3.4.5. Run the following script under ROOT to achieve a quick build of the zookeeper cluster.
Before the installation to ensure that the host can communicate with each other, modify the host name, this trial run a shall script to complete the installation of 3 host zookeeper.
The shall script code is as follows
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/F5/wKioL1R0r8KxeCoqAAPNe-SnXwU286.jpg "title=" Shall.png "alt=" Wkiol1r0r8kxecoqaapne-snxwu286.jpg "/>
The deployment results are as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/F7/wKiom1R0sLLTH0gtAABb6q0ph5g290.jpg "title=" Leader.png "alt=" Wkiom1r0sllth0gtaabb6q0ph5g290.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/F7/wKiom1R0sM_ztEOiAAA9XdQbM2U440.jpg "title=" Result.png "alt=" Wkiom1r0sm_zteoiaaa9xdqbm2u440.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/F5/wKioL1R0sW7xdR_eAABd_oNkxko335.jpg "title=" Fllower.png "alt=" Wkiol1r0sw7xdr_eaabd_onkxko335.jpg "/>
This article is from the "Think" blog, please be sure to keep this source http://8879567.blog.51cto.com/8869567/1582599
Using the shell to automate the zookeeper cluster