centos安装单机版zookeeper
1.安装地址https://downloads.apache.org/zookeeper/zookeeper-3.5.9/
下载后mv重命名解压tar xvfz zookeeper-3.5.9.tar.gz
2.在conf目录下新增zoo.cfg文件或修改zoo_sample.cfg重命名为zoo.cfg
3.配置如下
dataDir=/opt/apache-zookeeper-3.5.9/data
dataLogDir=/opt/apache-zookeeper-3.5.9/logs
clientPort=2181 //启动端口
clientPortAddress=192.168.00.00 //启动ip为内网ip
4.命令操作
cd /opt/apache-zook
./zkServer.sh start //启动服务
./zkServer.sh status //查看zk服务状态
./zkServer.sh stop //停止服务
./zkServer.sh restart //重启服务
5.阿里云开放端口2181