zookeeper systemctl 服务化
vim /etc/systemd/system/zookeeper.service假设/data/zookeeper是它的安装目录[Unit]Description=ZookeeperAfter=network.target[Service]Type=simple#Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
·
vim /etc/systemd/system/zookeeper.service
假设/data/zookeeper是它的安装目录
[Unit]
Description=Zookeeper
After=network.target
[Service]
Type=simple
#Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin/java/:/usr/java/jdk1.8.0_151/jre/bin"
Environment=ZOO_LOG_DIR=/data/zookeeper/logs
User=root
Group=root
ExecStart=/data/zookeeper/bin/zkServer.sh start
ExecStop=/data/zookeeper/bin/zkServer.sh stop
PIDFile=/data/zookeeper/data/zookeeper_server.pid
[Install]
WantedBy=multi-user.target
/data/zookeeper/bin/zkServer.sh status 查看状态
更多推荐
已为社区贡献12条内容
所有评论(0)