Zookeeper
Zookeeper安装
使用wget工具拉取tar包
wget https://archive.apache.org/dist/zookeeper/zookeeper-3.8.2/apache-zookeeper-3.8.2-bin.tar.gz
解压
tar -zxvf apache-zookeeper-3.8.2-bin.tar.gz
重命名
mv apache-zookeeper-3.8.2-bin /usr/local/zookeeper
cp配置文件
cd /usr/local/zookeeper/conf/
cp zoo_sample.cfg zoo.cfg
编写systemctl任务
vim /etc/systemd/system/zookeeper.service
[Unit]
Description=zookeeper
After=syslog.target network.target
[Service]
Type=simple
Environment=ZOO_LOG_DIR=/usr/local/zookeeper/logs
ExecStart=/usr/local/zookeeper/bin/zkServer.sh start-foreground
ExecStop=/usr/local/zookeeper/bin/zkServer.sh stop
#Restart=always
[Install]
WantedBy=multi-user.target
systemctl重载
systemctl daemon-reload
启动zookeeper
systemctl start zookeeper
检查zookeeper
systemctl status zookeeper
看到如下 属于成功