1、过程
- 1、官网下载稳定版3.4.11
- 2、解压后启动zkServer.cmd
第一次启动提示缺少zoo.cfg。可在config目录下参考zoo_sample.cfg。
- 3、更改临时文件创建路径
dataDir=../data
# 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=../data
# 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
[zk: localhost:2181(CONNECTED) 0] get /
cZxid = 0x0
ctime = Thu Jan 01 08:00:00 CST 1970
mZxid = 0x0
mtime = Thu Jan 01 08:00:00 CST 1970
pZxid = 0x0
cversion = -1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 1] ls /
[zookeeper]
[zk: localhost:2181(CONNECTED) 2] create -e /atguigu 1234556
Created /atguigu
[zk: localhost:2181(CONNECTED) 3] ls /
[zookeeper, atguigu]
[zk: localhost:2181(CONNECTED) 4] get /atguigu
1234556
cZxid = 0x4
ctime = Wed Oct 09 09:53:22 CST 2019
mZxid = 0x4
mtime = Wed Oct 09 09:53:22 CST 2019
pZxid = 0x4
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x10003c5c83d0001
dataLength = 7
numChildren = 0
[zk: localhost:2181(CONNECTED) 5]
- 5、下载incubator-dubbo-ops-master,可以看到是springboot工程,而admin工程是jar打包方式。
- 6、使用mvn clean package方式打包。打包后 java -jar 命令运行
- 7、默认端口号7001.访问 localhost:7001(启动的前提是zookeeper服务器已启动)