Install zookeeper-3.4.9 service on CentOS7, centos install zookeeper

Source: Internet
Author: User

Install zookeeper-3.4.9 service on CentOS7, centos install zookeeper

Install zookeeper-3.4.9 services on CentOS7 1, create the/usr/local/services/zookeeper Folder: mkdir-p/usr/local/services/zookeeper2, go to the/usr/local/services/zookeeper Directory: cd/usr/local/services/zookeeper3, download zookeeper-3.4.9.tar.gz: wget history zookeeper-3.4.9.tar.gz: tar-zxvf zookeeper-3.4.9.tar.gz5, go to the/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. 7. Use vim to open zoo. the cfg file is modified as follows: # The number of milliseconds of each tick # The baseline interval defined by zookeeper. Unit: millisecond tickTime = 2000 # The number of ticks that the initial # synchronization phase can takeinitLimit = 10 # The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit = 5 # directory where the snapshot is stored. # do 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 will connect # client access to zookeeper port number clientPort = 2181 # the maximum number of client connections. # increase this if you need to handle more clients # maxClientCnxns = 60 # Be sure to read the maintenance section 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 # autopurge. purgeInterval = 18. Save and disable 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 profile: vim/etc/profile in the/etc/directory and append the following content at the end of the directory: # idea-zookeeper-3.4.9 config start-2016-09-08export 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, make the profile file under the/etc/directory take effect: source/etc/profile12, start zookeeper service: zkServer. if the following information is printed, sh start indicates that the startup is successful: ZooKeeper JMX enabled by defaultUsing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin /.. /conf/zoo. cfstarting zookeeper... STARTED13. query zookeeper status: zkServer. sh status14. Disable zookeeper: zkServer. sh stop: ZooKeeper JMX enabled by defaultUsing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin /.. /conf/zoo. cfstopping zookeeper... STOPPED15. Restart zookeeper: zkServer. sh restart: if the following information is printed, the restart is successful: ZooKeeper JMX enabled by defaultUsing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin /.. /conf/zoo. zoozookeeper JMX enabled by defaultUsing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin /.. /conf/zoo. cfstopping zookeeper... STOPPEDZooKeeper JMX enabled by defaultUsing config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin /.. /conf/zoo. cfstarting zookeeper... STARTED

  

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.