Zookeeper use service management and power-on self-starter

Source: Internet
Author: User
Tags zookeeper

1. Switch to the/etc/rc.d/init.d/directory with cd command 2.  T Ouch zookeeper creates a file 3.  Add executable Permissions ch mod +x zookeeper 4. VI Zookeeper #!/bin/bash # chkconfig:2345 # description:manage zookeeper case ' in Start ' su root/usr/local/z           ookeeper/zookeeper-3.4.5/bin/zkserver.sh start;;           Stop) su root/usr/local/zookeeper/zookeeper-3.4.5/bin/zkserver.sh stop;;           Status) su root/usr/local/zookeeper/zookeeper-3.4.5/bin/zkserver.sh status;; Restart) su root/usr/local/zookeeper/zookeeper-3.4.5/bin/zkserver.sh restart;; Esac
Script Description: After Su Root is the Zookeeper execution script path, which can be modified according to the actual situation
5. At this time zookeeper can use service management to initiate shutdown and other operations 6.  Using the command: chkconfig-Add zookeeper added to the boot List 7.  Using the command: Chkconfig zookeeper on is set to power-on self-boot (negligible) 8. Using Commands: Chkconfig | grep Zookeeper is successful if view 2345 is on state

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.