Linux under Zookeeper stand-alone installation configuration __linux

Source: Internet
Author: User
Tags gz file zookeeper
Zookeeper installation
The installation of zookeeper is divided into three modes: stand-alone mode, cluster mode and pseudo cluster mode.

1. Download
Enter the directory for the version you want to download, select the. tar.gz File Download
Download Link: http://archive.apache.org/dist/zookeeper/
Environment: CENTOS7, JDK1.8

2. Installation
Use tar to extract the directory you want to install, take the 3.5 version as an example
[Root@localhost conf]# tar-zxf zookeeper-3.5.0-alpha.tar.gz

3. Configure
Create data and logs in the home directory for two directories for storing the information and logs:
[Root@localhost zookeeper]# mkdir data
[Root@localhost zookeeper]# mkdir logs

Create a new Zoo.cfg file in the Conf directory,
[Root@localhost conf]# MV Zoo_sample.cfg zoo.cfg
[Root@localhost conf]# VI zoo.cfg
ticktime=2000
initlimit=10
synclimit=5
datadir=/home/svr/application/zookeeper/data
DataLogDir =/home/svr/application/zookeeper/logs
clientport=2181

4. Start and stop
Go to the Bin directory, start, stop, restart, and view the current node state (including what role is in the cluster) do not:
[Root@localhost bin]#./zkserver.sh start
[Root@localhost bin]#./zkserver.sh stop
[Root@localhost bin]#./zkserver.sh restart
[Root@localhost bin]#./zkserver.sh status

5. Client Connection:

[Root@localhost bin]#./zkcli.sh-server 192.168.24.250:2181











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.