Zookeeper standalone mode (standalone) under Linux

Source: Internet
Author: User
Tags zookeeper

1. Download ZK http://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/

I'm using a http://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.3.6/.

2, download to local and sz from the local upload to the server

Sz

Ls

Tar xvf zookeeper-3.3. 6.tar.gz

3. Start configuring Zookeeper after decompression, enter the directory of the configuration file

CD zookeeper-3.3. 6/conf/

Modify the zoo_sample.cfg below the directory to ZOO.CFG,MV Zoo_sample.cfg zoo.cfg, and the configuration will not change

1#The number of milliseconds of each tick2Ticktime= -  3#The number of ticks that initial4#synchronization phase can take5initlimit=Ten  6#The number of ticks that can pass between7# Sending a request andgetting an acknowledgement8synclimit=5  9#The directory where the snapshot is stored. Tendatadir=/tmp/Zookeeper One#The port at which the clients would connect Aclientport=2181  

This information is not to be changed!

4. Start the Zookeeper server process

CD zookeeper-3.3.6/CD Bin/ls$./zkcli.sh-server127.0.0.1:2181execution is complete: connecting to127.0.0.1:2181 .- the- +  at: -: $,871-INFO [Main:[email protected] the]-Client environment:zookeeper.version=3.3.6-1366786, built on -/ in/ -  .: AGMT .- the- +  at: -: $,873-INFO [Main:[email protected] the]-Client Environment:host.name=Izwz9ejuib213391pbtkhiz .- the- +  at: -: $,873-INFO [Main:[email protected] the]-Client environment:java.version=1.8. 0_141 .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.vendor=Oracle Corporation .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1. b16.el7_3.x86_64/JRE .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.class.path=/home/sg/ruanjian/zookeeper-3.3.6/bin/. /build/classes:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /build/lib/*.jar:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /zookeeper-3.3.6. jar:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /lib/log4j-1.2. the. jar:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /lib/jline-0.9.94. jar:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /src/java/lib/*.jar:/home/sg/ruanjian/zookeeper-3.3.6/bin/. /conf:.:/ usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1. b16.el7_3.x86_64/lib/dt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1. b16.el7_3.x86_64/lib/Tools.jar .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/Lib .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.io.tmpdir=/tmp .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client environment:java.compiler=<na> .- the- +  at: -: $,874-INFO [Main:[email protected] the]-Client Environment:os.name=Linux .- the- +  at: -: $,875-INFO [Main:[email protected] the]-Client environment:os.arch=AMD64 .- the- +  at: -: $,875-INFO [Main:[email protected] the]-Client environment:os.version=3.10.0-514.26.2. el7.x86_64 .- the- +  at: -: $,875-INFO [Main:[email protected] the]-Client Environment:user.name=SG .- the- +  at: -: $,875-INFO [Main:[email protected] the]-Client environment:user.home=/home/SG .- the- +  at: -: $,875-INFO [Main:[email protected] the]-Client environment:user.dir=/home/sg/ruanjian/zookeeper-3.3.6/bin .- the- +  at: -: $,876-INFO [Main:[email protected]379]-Initiating client connection, connectstring=127.0.0.1:2181sessiontimeout=30000Watcher=[email protected] .- the- +  at: -: $,895-INFO [Main-sendthread (): [Email protected]1058]-Opening socket connection to server/127.0.0.1:2181Welcome to zookeeper! JLine support is enabled .- the- +  at: -: $,010-INFO [Main-sendthread (localhost:2181): [Email protected]947]-Socket connection established to localhost/127.0.0.1:2181, initiating session .- the- +  at: -: $,021-INFO [Main-sendthread (localhost:2181): [Email protected]736]-Session establishment complete on server localhost/127.0.0.1:2181, SessionID = 0x15ea5017c590001, negotiated timeout =30000watcher::watchedevent state:syncconnectedtype: None PATH:NULL[ZK:127.0.0.1:2181(CONNECTED)0]

The Zookeeper standalone mode is configured to complete

Cluster mode I'll study next time and record it!

Stand-alone mode (standalone) zookeeper under Linux

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.