Zookeeper stand-alone mode installation configuration

Source: Internet
Author: User

1, the implementation of the command to download zookeeper3.5.0 specific directory under which to set their own

wget http://mirror.bit.edu.cn/apache//zookeeper/zookeeper-3.5.0-alpha/zookeeper-3.5.0-alpha.tar.gz

2. Unzip the file

Tar zxvf zookeeper-3.5.0-alpha.tar.gz

3. Renaming (this can be optional)

MV Zookeeper-3.5.0-alpha ZK

4, configuration file Zoo.cfg (the default is this zoo_sample.cfg, you can copy one, save to another place, and then renamed to ZOO.CFG)

Datadir=/opt/zk/zk/data
Datalogdir=/opt/zk/zk/logs

5. Configure Environment variables

Vim/etc/profile

Export Zookeeper_home=/opt/zk/zk (change this to your own directory)

Path= $ZOOKEEPER _home/bin: $PATH

Export PATH

6. Start ZK

./zkserver.sh start

7. Client Connection Test

./zkcli.sh-server localhost:2181

[Email protected] bin]$ pwd
/opt/zk/zk/bin
[Email protected] bin]$/zkcli.sh-server localhost:2181
Connecting to localhost:2181
。。。
[root:localhost:2181 (CONNECTED) 0] LS/
[Zookeeper]
[Root:localhost:2181 (CONNECTED) 1] create/test HELLOZK
Created/test
[Root:localhost:2181 (CONNECTED) 2] Get/test
Hellozk
[Root:localhost:2181 (CONNECTED) 3] set/test Hellozookeeper
[Root:localhost:2181 (CONNECTED) 4] Get/test
Hellozookeeper
[Root:localhost:2181 (CONNECTED) 5] Delete/test
[Root:localhost:2181 (CONNECTED) 6] Get/test
Node does not exist:/test
[Root:localhost:2181 (CONNECTED) 7] Quit
2014-11-19 03:53:50,180 [myID:]-INFO [main:[email protected]]-session:0x149c475d7db0000 closed
2014-11-19 03:53:50,182 [myID:]-INFO [main-eventthread:[email protected]]-Eventthread shut down

The single-machine installation configuration is complete.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Zookeeper stand-alone mode installation configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.