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’
时间: 2024-12-28 03:55:56