Use of zookeeper: installation, common commands

Source: Internet
Author: User

Company projects need to use Dubbo, therefore, to do a small demo on their own is very necessary, but also to help their understanding and use, the preparatory work of course is essential, because Dubbo is released to zookeeper service, so first put the zookeeper environment first up.

Before installing, you need to know what is zookeeper:

Zookeeper is a full-fledged sub-project of Hadoop, a reliable coordination system for large distributed systems, with features such as configuration maintenance, name services, distributed synchronization, group services, and more. The goal of zookeeper is to encapsulate complex and error-prone services that provide users with easy-to-use interfaces and performance-efficient, robust systems.

The above content is from Baidu Encyclopedia!

Here's how the standalone version of Zookeeper is installed:

1. Download Zookeeper Package

Address: http://www.apache.org/dyn/closer.cgi/zookeeper/

2. Extract the installation package to the directory where the program is stored, such as tools/zookeeper-3.4.6

Decompression command: Tar zxf zookeeper-3.4.6.tar.gz

Into the zookeeper-3.4.6/conf, there's a file named Zoo_sample.cfg.

This file needs to change the name to Zoo.cfg.

Because the use of the Mac, so directly in the directory to get rid of, if you are using Linux, you need to use the command to find the directory to change this file name

3. Enter the zookeeper-3.4.6 directory

Use the command./bin/zkserver.sh start to launch and, if the following screen appears, indicates a successful start

Zookeeper start and Stop commands are the following

    • 1. Start ZK service: SH bin/zkserver.sh start
    • 2. View ZK Service Status: SH bin/zkserver.sh status
    • 3. Stop ZK service: SH bin/zkserver.sh stop
    • 4. Restart ZK Service: SH bin/zkserver.sh restart

After the boot is complete, we perform a simple test with the client that zookeeper comes with:

Use the command:./bin/zkcli.sh-server localhost:2181

If the error occurs during startup, the connection is successful, and then we can use simple commands to interact with the server.

LS/
[Zookeeper]
[Zk:localhost:2181 (CONNECTED) 1]

Using LS/To view the structure of the ZK root directory, you can see that only one zookeeper directory exists by default. Launch and server links can use the Quit command.

Use of zookeeper: installation, common commands

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.