Linux installation Zookeeper (standalone mode)

Source: Internet
Author: User
Tags zookeeper

1.cd /opt/zookeeper-3.4.5

2. Enter the Conf subdirectory under the Zookeeper directory to create the zoo.cfg and add the content:

Zoo.cfg to copy the zoo_sample.cfg under the Conf, otherwise there will be a coding problem.

ticktime=2000

initlimit=10

Synclimit=5

Datadir=/home/files/zookeeper/zkdata

Datalogdir=/home/files/zookeeper/zkdatalog

clientport=2181

server.1=10.45.54.145:2888:3888 (Use your IP here)

parameter Description :

The base time unit, millisecond value, used in Ticktime:zookeeper.

DataDir: Data directory. can be any directory.

The Datalogdir:log directory can also be any directory. If this parameter is not set, the same settings are used and DataDir.

ClientPort: Listens for the port number of the client connection.

3. Set myID

Under the directory specified by the DataDir that we configured , create a myID file with a number that identifies the current host, the conf/zoo.cfg in the server.x configured in the file, and the number in the myID file.

Touch myID

VI myID

4.

Program Run Action

L Start

# CD /opt/zookeeper-3.4.5/bin

#./zkserver.sh start

L Stop

# CD /opt/zookeeper-3.4.5/bin

#./zkserver.sh stop

L Restart

# CD /opt/zookeeper-3.4.5/bin

#./zkserver.sh restart

2) Test Boot success

# CD /opt/zookeeper-3.4.5/bin

#./zkcli.sh-server 172.31.95.51:2181

3) View Zookeeper Status:

# CD /opt/zookeeper-3.4.5/bin

#./ZKSERVER.SH Status

See him on behalf of stand-alone mode success

Linux installation Zookeeper (standalone mode)

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.