Hello friends let us look at the basic installation of the Zookeeper
- First download the package from Zookeeper site(link here)
- Extract the package anywhere.
- tar zxvf zookeeper-3.4.6.tar.gz
- cd zookeeper-3.4.6/conf/
- We are assuming that the data folder is /etc/analytics/data and is present.
server.1=<ip:1>:<start_port>:<end_port>#have to specifly all the servers with id (server.<id>) format
- Now the id of the current machine is decided by the text file content specified at /etc/analytics/data. Name of that file is myid with content 1, that's it
- Now start the zookeeper process.
- To start the server use the following
- bin/zkServer.sh start
- To start the client in order to check the things gone perfectly or not use this:
- bin/zkCli.sh -server <ip>:2181
- To check the installation to be correct or not
- Connect to any of the zookeeper client
[zkshell: 9] create /zk_test my_data
- And check whether it is being created in other nodes or not :
[zkshell: 12] get /zk_testmy_datacZxid = 5ctime = Fri Jun 05 13:57:06 PDT 2009mZxid = 5mtime = Fri Jun 05 13:57:06 PDT 2009pZxid = 5cversion = 0dataVersion = 0aclVersion = 0ephemeralOwner = 0dataLength = 7numChildren = 0
- If this is the output then installation is perfect