简单搭建zookeeper 解决8080端口占用问题

1、下载zk

https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.5/

2、解压

tar -xzvf apache-zookeeper-3.5.5-bin.tar.gz

3、修改zoo.cfg

/opt/apache-zookeeper-3.5.5-bin/conf
cp zoo_sample.cfg zoo.cfg

4、启动

[root@host-10-150-30-81 bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /opt/apache-zookeeper-3.5.5-bin/bin/../conf/zoo.cfg
Starting zookeeper ... FAILED TO START

5、查看状态

jps

[root@host-10-150-30-82 logs]# jps
9888 Bootstrap
24528 Jps

log报错

8080端口占用

解决办法
修改端口在…/conf/zoo.cfg里面配置端口

admin.serverPort=8888

6、重新启动

[root@host-10-150-30-81 bin]# ./zkServer.sh  start
ZooKeeper JMX enabled by default
Using config: /opt/apache-zookeeper-3.5.5-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

启动成功
简单搭建zookeeper 解决8080端口占用问题_第1张图片

你可能感兴趣的:(Zookeeper)