Linux zookeeper installation tutorial, linuxzookeeper tutorial

Source: Internet
Author: User

Linux zookeeper installation tutorial, linuxzookeeper tutorial

First install jdk

Then download

Because zookeeper is elected in half, an odd number of nodes are usually installed. The machine list is as follows:

192.168.33.11

192.168.33.12

192.168.33.13

1. Decompress tar-zxvf zookeeper-3.4.5.tar.gz

Mvzookeeper-3.4.5 ../zookeeper

2. modify configuration

Cp/zookeeper/conf/zoo_sample.cfg zoo. cfg

Vi zoo. cfg

Modify:

TickTime = 2000

InitLimit = 10

SyncLimit = 5

DataDir =/usr/local/zookeeper/data

DataLogDir =/usr/local/zookeeper/logs

ClientPort = 2181

Server.1 = 192.168.33.11: 2881: 3881

Server.2 = 192.168.33.12: 2882: 3882

Server.3 = 192.168.33.13: 2883: 3883

Open the Firewall:

Vi/etc/sysconfig/iptables

# Zookeeper

-A input-m state -- state NEW-m tcp-p tcp -- dport 2181-j ACCEPT

-A input-m state -- state NEW-m tcp-p tcp -- dport 2881-j ACCEPT

-A input-m state -- state NEW-m tcp-p tcp -- dport 3881-j ACCEPT

Service iptables restart

The vi/usr/local/zookeeper/data/myid value is 1.

Start./bin/zkServer. sh start

Disable./bin/zkServer. sh stop

Jps

1456 QuorumPeerMain

QuorumPeerMain is the zookeeper process, which indicates that the process is started normally.

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.