1.dubbo设计架构
2.dubbo设计架构
3.demo演示
dubbo官网:https://dubbo.apache.org/zh/
3.1下载zk
下载网址:https://zookeeper.apache.org/
3.2修改zk配置文件
# 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.
dataDir=../data
#dataLogDir=../data/tlog
# 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
# the port at which the clients will connect
clientPort=2181
minSessionTimeout=5000
maxSessionTimeout=10000
server.1=127.0.0.1:28880:38880
#server.2=10.143.24.16:28880:38880
#server.3=10.143.24.17:28880:38880
3.3操作zk
启动zk./zkServer.sh start zkClient.sh 连接zk服务端,get / 查看根节点下面信息 在zk中创建临时节点create -e /节点路径 节点里的内容 ,使用 ls /节点路径 查看节点中的内容
3.4dubbo安装admin
git clone https://github.com/apache/dubbo-admin.git 将admin项目clone到本地 使用idea打开dubbo-admin工程修改其admin中的配置文件为要连的注册中心的地址,并且使用mvn clean ,mvn package 打包,即可看到
将打出的jar包拖出来执行java -jar dubbo-admin-0.0.1-SNAPSHOT.jar 浏览器输入http://localhost:7001/ 账号root 密码root 进入管理页面
|