zookeeper systemctl开机启动
创建 /etc/systemd/system/zookeeper.service 文件,内容下 [root@zookeep-kafka-node1 bin]# cat /etc/systemd/system/zookeeper.service [Unit] Description=zookeeper.service After=network.target ConditionPathExists=/opt/zookeeper-3.5.6/conf/zoo.cfg [Service] Type=forking ExecStart=/opt/zookeeper-3.5.6/bin/zkServer.sh start ExecStop=/opt/zookeeper-3.5.6/bin/zkServer.sh stop [Install] WantedBy=multi-user.target 启动命令,开机启动 [root@zookeep-kafka-node1 ~]# systemctl daemon-reload [root@zookeep-kafka-node1 ~]# systemctl enable zookeeper [root@zookeep-kafka-node1 ~]# systemctl start zookeeper [root@zookeep-kafka-node1