Linux installation Zookeeper-3.4.11__linux

Source: Internet
Author: User
Tags zookeeper

Note : This article is quoted from http://www.linuxidc.com/Linux/2016-09/135052.htm

The original text in the start zookeeper have some pits, the following has been treatise ~

1. Create/usr/local/services/zookeeper folder:

  Mkdir-p/usr/local/services/zookeeper

2, into the/usr/local/services/zookeeper directory:

Cd/usr/local/services/zookeeper

3. Download zookeeper-3.4.11.tar.gz:

4, Decompression zookeeper-3.4.11.tar.gz:

  TAR-ZXVF zookeeper-3.4.11.tar.gz

5, into the/usr/local/services/zookeeper/zookeeper-3.4.11 directory and create folders data and logs:

[Root@xinyi zookeeper]# cd zookeeper-3.4.11
[Root@xinyi zookeeper-3.4.11]# mkdir data
[Root@xinyi zookeeper-3.4.11]# mkdir Logs

6, into the/usr/local/services/zookeeper/zookeeper-3.4.11/conf directory,
And the Zoo_sample.cfg file is copied and named Zoo.cfg:

[Root@xinyi zookeeper-3.4.11]# cd conf/
[Root@xinyi conf]# CP zoo_sample.cfg zoo.cfg

7, with vim open zoo.cfg file and modify its contents as follows:

# Data folder
datadir=/usr/local/services/zookeeper/zookeeper-3.4.11/data
# log folder
datalogdir=/usr/local/ Services/zookeeper/zookeeper-3.4.11/logs

8. Save and close Zoo.cfg file:

9, into the/usr/local/services/zookeeper/zookeeper-3.4.11/bin directory:

[Root@xinyi zookeeper-3.4.11]# CD bin/

10, with vim open the/etc/directory profiles profile:

[Root@xinyi bin]# Vim/etc/profile

and append the following to its tail:

Export zookeeper_home=/usr/local/services/zookeeper/zookeeper-3.4.11/
export path= $ZOOKEEPER _home/bin: $PATH
Export PATH

11, so that the/etc/directory under the profile can be effective:

[Root@xinyi bin]# Source/etc/profile

12, Start zookeeper service:

[Root@xinyi bin]#./zkserver.sh start

zookeeper JMX enabled by default
Using config:/services/zookeeper/ zookeeper-3.4.11/bin/.. /conf/zoo.cfg
Starting Zookeeper ... Started

13, Query Zookeeper status:

[Root@xinyi bin]#./zkserver.sh status

zookeeper JMX enabled by default
Using config:/services/zookeeper/ zookeeper-3.4.11/bin/.. /conf/zoo.cfg
Mode:standalone

14, close the Zookeeper service:

[Root@xinyi bin]#./zkserver.sh Stop

If printing the following information indicates successful shutdown:
zookeeper JMX enabled by default
Using config:/ services/zookeeper/zookeeper-3.4.11/bin/.. /conf/zoo.cfg
Stopping zookeeper ... STOPPED

15, restart the Zookeeper service:

[Root@xinyi bin]#./zkserver.sh Restart

zookeeper JMX enabled by default
Using config:/services/zookeeper/ zookeeper-3.4.11/bin/.. /conf/zoo.cfg
zookeeper JMX enabled by default
Using config:/services/zookeeper/zookeeper-3.4.11/bin/. /conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop could R-3.4.11/data/zookeeper_server.pid)
Zookeeper JMX enabled by default
Using config:/services/zookeeper/ zookeeper-3.4.11/bin/.. /conf/zoo.cfg
Starting Zookeeper ... Started

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.