A description of the problem
After you deploy the zookeeper, you need to set up a startup script and set up auto-start.
Cp/opt/app/zookeeper/bin/zkserver.sh/etc/init.d/zookeeper
To change the parameters of a script
Zoobin=/opt/app/zookeeper/bin Zoobindir=/opt/app/zookeeper/bin Zoo_log_dir=/opt/logs/zookeeper
This three parameters are at your own discretion.
Perform service zookeeper start OK, but chkconfig--level zookeeper on the following error
Service zookeeper does not support Chkconfig
Two problem solving
the above questions are related to the chkconfig of this command. Consult the man Manual of the chkconfig command for more information.
Services that need to be managed by chkconfig need to add a few lines of code to the startup script in the/ETC/INIT.D directory. As follows:
#!/bin/bash## Zookeeper---This script was used to start and stop zookeeper## chkconfig:-12# Description:zookee Per is a centralized service for maintaining configuration information,naming,providing distributed Synchronization,and p Roviding Group Services. # Processname:zookeeper
Chkconfig: A line tells Chkconfig what level the service will start with by default, and how much priority it has to start and close. -Represents any level
Description: One line is the description of this service
After adding these two lines, you can use the Chkconfig setting to boot up.
Reference article:
http://maosheng.iteye.com/blog/2224962
This article is from the Linux SA John blog, so be sure to keep this source http://john88wang.blog.51cto.com/2165294/1745315
Service zookeeper does not support Chkconfig solution