首页 > 代码库 > zookeeper的开机自启动

zookeeper的开机自启动

zookeeper开机自启动

vim /etc/rc.local

export JAVA_HOME=/usr/local/jdk #必须加,否则后面的java服务起不来/usr/local/zookeeper/bin/zkServer.sh start

 

root外用户启动:

export JAVA_HOME=/usr/local/jdk su -user -c ‘/usr/local/zookeeper/bin/zkServer.sh start’

zookeeper的开机自启动