Linux 安装zookeeper及启动配置
文章目录1下载安装zookeeper1.1、下载zookeeper1.2、解压1.3、移动到指定位置并改名为zookeeper2、开机启动zookeeper2.1复制如下脚本2.2 把脚本注册为Service2.3 增加权限3、配置zookeeper3.1、初始化zookeeper配置文件3.2、启动zookeeper1下载安装zookeeper1.1、下载zookeeper 网址 htt...
·
文章目录
1下载安装zookeeper
1.1、下载zookeeper
网址 https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/
wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz
1.2、解压
1.3、移动到指定位置并改名为zookeeper
2、开机启动zookeeper
2.1复制如下脚本
#!/bin/bash
#chkconfig:2345 20 90
#description:zookeeper
#processname:zookeeper
ZK_PATH=/usr/local/zookeeper
export JAVA_HOME=/usr/local/java/jdk1.8.0_171
case $1 in
start) sh $ZK_PATH/bin/zkServer.sh start;;
stop) sh $ZK_PATH/bin/zkServer.sh stop;;
status) sh $ZK_PATH/bin/zkServer.sh status;;
restart) sh $ZK_PATH/bin/zkServer.sh restart;;
*) echo "require start|stop|status|restart" ;;
esac
2.2 把脚本注册为Service
2.3 增加权限
3、配置zookeeper
3.1、初始化zookeeper配置文件
拷贝/usr/local/zookeeper/conf/zoo_sample.cfg
到同一个目录下改个名字叫zoo.cfg
3.2、启动zookeeper
更多推荐
已为社区贡献1条内容
所有评论(0)