简单配置

1.进入下载页下载 apache-zookeeper-3.5.6-bin.tar.gz

2.tar 命令解压

3.进入conf目录

4.拷贝一份zoo.cfg

5.修改配置

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/Users/promiss/Soft/apache-zookeeper-3.5.6-bin/data
logDir=/Users/promiss/Soft/apache-zookeeper-3.5.6-bin/logs
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

# 将默认的8080端口改成38080(任意), 防止端口冲突
admin.serverPort=38080

6.启动

bin/zkServer.sh start

7.停止

bin/zkServer.sh stop

8.查看启动状态

bin/zkServer.sh status

Mac安装zookeeper dubbo-admin_其他
9.连接zk

bin/zkCli.sh

10.从GitHub下载dubbo-admin

Mac安装zookeeper dubbo-admin_其他_02

11.导入到IDEA

12.修改dubbo-admin/dubbo-admin-server/src/main/resources/application.properties文件

server.port=8085
admin.registry.address=zookeeper://127.0.0.1:2181
admin.config-center=zookeeper://127.0.0.1:2181
admin.metadata-report.address=zookeeper://127.0.0.1:2181

13.mvn package -Dmaven.test.skip=true

14.cd dubbo-admin-server/target

15.java -jar dubbo-admin-server-0.2.0-SNAPSHOT.jar > run.log &

16.http://127.0.0.1:8080/