Linux Learning: Building a zookeeper environment

Source: Internet
Author: User
Tags zookeeper


First step: Unzip the ZK tar package to/opt

TAR-ZXVF zookeeper-3.4.5.tar.gz-c/opt

Step Two: rename it to zookeeper

MV Zookeeper-3.4.5/zookeeper

Step Three: Modify environment Variables

vi/etc/profile

Export Zookeeper_home=/opt/zookeeper export java_home=/opt/jdk1.7.0_71 export path=.: $JAVA _home/bin: $ZOOKEEPER _h Ome/bin: $PATH

Fourth Step: Refresh profile configuration file

Source/etc/profile

Fifth Step: Configure Zookeeper

to modify the configuration file under Zookeeper:

1 . Rename the zoo_sample.cfg under Zookeeper/conf to Zoo.cfg

MV Zoo_sample.cfg Zoo.cfg

2. Modify the zoo.cfg file

A, modify DataDir to save the data directory

Datadir=/opt/zookeeper/data

B. add the last side

server.0=192.168.91.3:2888:3888 #如果有多个 #server. 1=192.168.91.4:2888:3888 #server. 2=192.168.91.5: 2,888:3,888

3. Create the Data folder below zookeeper

mkdir data

4. Create the myID file under the Data folder and fill in the appropriate content

VI myID

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8C/32/wKioL1hk_mGhkAdAAAAFVkG02uA870.png "title=" _) q_ EFI4) 3f3403p61om ' 47.png "alt=" Wkiol1hk_mghkadaaaafvkg02ua870.png "/>

Sixth step: Start

Path:/usr/local/zookeeper/bin

execution:zkserver.sh start

Status:zkserver.sh status

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8C/35/wKiom1hlFGng30KEAAA5Uj1CIbc352.png "title=" EFJRC9 {3Q] P ' 6cdh8mdc{(6.png "alt=" Wkiom1hlfgng30keaaa5uj1cibc352.png "/>



This article is from "I Love Big gold" blog, please be sure to keep this source http://1754966750.blog.51cto.com/7455444/1887486

Linux Learning: Building a zookeeper environment

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.