名字
cd /usr/local/soft
wget https://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz
tar -zxvf apache-zookeeper-3.6.1-bin.tar.gz
mkdir /data
mkdir /data/data
mkdir /data/data/zookeeper
chmod 777 /data/data/zookeeper/
cd apache-zookeeper-3.6.1-bin/
cd conf/
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg
dataDir=/data/data/zookeeper
vi /etc/profile
export ZK_HOME=/usr/local/soft/apache-zookeeper-3.6.1-bin
export PATH=$ZK_HOME/bin:$PATH
source /etc/profile
# 启动zookeeper
zkServer.sh start
# 停止zookeeper
zkServer.sh stop
vi /etc/systemd/system/zookeeper.service
[Unit]
Description=zookeeper.service
After=network.target
ConditionPathExists=/usr/local/soft/apache-zookeeper-3.6.1-bin/conf/zoo.cfg
[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/local/soft/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start
ExecStop=/usr/local/soft/apache-zookeeper-3.6.1-bin/bin/zkServer.sh stop
[Install]
WantedBy=multi-user.target
systemctl start zookeeper
systemctl stop zookeeper
最新评论 我的评论
t-io为本站提供HTTP、WebSocket、Socket、页面渲染与压缩等服务,nginx为本站提供反向代理服务
© 2017-2023 钛特云 版权所有 | 浙ICP备17032976号 | 浙公网安备 33011802002129号