在/etc/rc.local文件中追加:
# java_home
export JAVA_HOME=/opt/java/jdk1.7.0_75
# zookeeper
/home/cent2014/zookeeper/zookeeper-3.4.6/bin/zkServer.sh start
以上即可开机自动启动!!
(带用户:- user -c ‘/home/cent2014/zookeeper/zookeeper-3.4.6/bin/zkServer.sh start‘)
时间: 2024-10-11 01:02:40