阿里-Springboot+Dubbo2.7.3使用

本文介绍如何在CentOS 7上部署ZooKeeper 3.5.5及Dubbo-Admin,包括上传并解压ZooKeeper安装包、配置zoo.cfg文件、启动ZooKeeper服务,以及下载Dubbo-Admin并运行服务。

准备工具:

  1. centos7

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

3.dubbo-admin https://github.com/apache/dubbo-admin


  1. 首先安装ZK
    1.1 上传tar包到centos中
    1.2 解压
      tar -zxf apache-zookeeper-3.5.5-bin.tar.gz 
    

image.png


1.3配置

cd /usr/soft/zk/conf #zk的conf 目录
[root@localhost conf]# cp zoo_sample.cfg zoo.cfg 
[root@localhost conf]# vim zoo.cfg 

# 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=/usr/soft/zk/data  # 子集mkdir -p 创建目录
# 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

最后:wq 保存退出

/usr/soft/zk/bin
[root@localhost bin]# ./zkServer.sh start
[root@localhost bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/soft/zk/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Mode: standalone

ZK结束.


  1. 下载dubbo-admin
    2.1 项目打开并导入到IDEA
    image.png
    2.2 打包
    mvn clean package
    
    2.3 启动
    mvn --projects dubbo-admin-server spring-boot:run
    OR
    cd dubbo-admin-distribution/target; java -jar dubbo-admin-0.1.jar
    

2.4访问
http://localhost:8080/#/service
image.png


  1. springBoot-Dubbo
    image.png

image.png


最后上代码:
github: https://github.com/zeminli/springboot-dubbo

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值