Installing the zookeeper-3.4.9 service on CentOS7

Source: Internet
Author: User

Install zookeeper-3.4.9 service 1 on CentOS7, create/usr/local/services/zookeeper folder: Mkdir-p/usr/local/services/zookeeper2, enter to/usr /local/services/zookeeper directory: cd/usr/local/services/zookeeper3, download Zookeeper-3.4.9.tar.gz:wget https:// MIRRORS.TUNA.TSINGHUA.EDU.CN/APACHE/ZOOKEEPER/ZOOKEEPER-3.4.9/ZOOKEEPER-3.4.9.TAR.GZ4, decompressing ZOOKEEPER-3.4.9.TAR.GZ:TAR-ZXVF zookeeper-3.4.9.tar.gz5, enter to/usr/local/services/zookeeper/zookeeper-3.4.9/conf Directory: cd ZOOKEEPER-3.4.9/CONF/6, copy the zoo_sample.cfg file and name it ZOO.CFG:CP zoo_sample.cfg Zoo.cfg7, open with Vim zoo.cfg File and modify its contents as follows: # The number of milliseconds of each tick# zookeeper defined by the base time interval, in milliseconds ticktime=2000# the number of ticks that th E Initial # Synchronization phase can takeinitlimit=10# the number of ticks that can pass between # Sending a request and  Getting an acknowledgementsynclimit=5# the directory where the snapshot is stored.# does not use/tmp for storage,/tmp here is just # example sakes.# datadir=/tmp/zookeeper# Data folder Datadir=/usr/local/services/zookeeper/zookeeper-3.4.9/data# log Folder datalogdir=/usr/local/services/zookeeper/zookeeper-3.4.9/logs# the port at which the clients would connect# Client Access Zookeeper port numbers clientport=2181# The maximum number of client connections.# increase this if you need to hand  Le more clients#maxclientcnxns=60## is sure to read the maintenance sections of the # Administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to Retain in datadir#autopurge.snapretaincount=3# Purge task interval in hours# Set to ' 0 ' to disable auto Purge Feature#auto Purge.purgeinterval=18, save and close the Zoo.cfg file: 9. Go to the/usr/local/services/zookeeper/zookeeper-3.4.9/bin directory: CD. /BIN/10, use VIM to open the configuration file under the/etc/directory Profile:vim/etc/profile and append the following at its tail: # idea-zookeeper-3.4.9 config start-2016-09-08 Export Zookeeper_home=/usr/local/services/zookeeper/zookeeper-3.4.9/export path= $ZOOKEEPER _home/bin: $PATHexport path# idea-zookeeper-3.4.9 config start-2016-09-0811, makeThe profile file in the/etc/directory can be effective: source/etc/profile12, start zookeeper Service: zkserver.sh start the following message indicates the startup success: Zookeeper JMX enabled by defaultusing Config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfgstarting Zookeeper ...  STARTED13, Query zookeeper status: Zkserver.sh status14, close zookeeper service: zkserver.sh stop if you print the following message indicates a successful shutdown: Zookeeper JMX enabled by defaultusing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfgstopping Zookeeper ... STOPPED15, restart Zookeeper service: zkserver.sh Restart if you print the following message, it indicates a successful restart: Zookeeper JMX enabled by defaultusing Config:/usr/local/s ervices/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfgzookeeper JMX enabled by defaultusing Config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfgstopping Zookeeper ... Stoppedzookeeper JMX enabled by defaultusing Config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfgstarting Zookeeper ... STARTED

  

Installing the zookeeper-3.4.9 service on CentOS7

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.