Dubbo-Admin-0.2.0服务管理中心安装

本文档详细介绍了如何下载、上传、解压Dubbo-Admin服务器,并修改其端口配置以避免冲突。内容包括:更改dubbo-admin-server的端口,创建Zookeeper配置文件,打包与部署步骤,以及成功启动后的访问验证。确保在Zookeeper中创建必要的配置文件以使服务正常运行。
摘要由CSDN通过智能技术生成

1、下载dubbo-admin服务器版本

2、上传至服务器, 并解压

3、进入解压后的目录D:\WorkJava\dubbo-admin-0.2.0

 

4、默认启动8080端口, 可能会存在冲突,

修改dubbo-admin-server的端口 D:\WorkJava\dubbo-admin-0.2.0\dubbo-admin-server\src\main\resources\application.properties

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#


# 新版注册中心
admin.config-center=zookeeper://127.0.0.1:2181


# 老版注册中心,建议注释,因为无法显示服务的方法
#这里取消了这两个配置,必须在zookeeper创建文件,否则jar包运行失败 
#zookeeper创建/dubbo/config/dubbo/dubbo.properties文件 内容
#dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.metadata-report.address=zookeeper://127.0.0.1:2181

#admin.registry.address=zookeeper://127.0.0.1:2181
#admin.metadata-report.address=zookeeper://127.0.0.1:2181



admin.registry.group=dubbo
admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
admin.apollo.appId=test
admin.apollo.env=dev
admin.apollo.cluster=default
admin.apollo.namespace=dubbo

server.port=8090

注意:

#这里取消了这两个配置,必须在zookeeper创建文件,否则jar包运行失败 
zookeeper创建/dubbo/config/dubbo/dubbo.properties文件 内容
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.metadata-report.address=zookeeper://127.0.0.1:2181

public static void main(String[] args) throws Exception {
        CuratorFramework zkClient = CuratorFrameworkFactory.builder().
                connectString("192.168.247.129:2181").
                retryPolicy(new ExponentialBackoffRetry(1000, 3)).build();
        zkClient.start();

        if (zkClient.checkExists().forPath("/dubbo/config/dubbo/dubbo.properties") == null) {
            zkClient.create().creatingParentsIfNeeded().forPath("/dubbo/config/dubbo/dubbo.properties");
        }
        zkClient.setData().forPath("/dubbo/config/dubbo/dubbo.properties", ("dubbo.registry.address=zookeeper://192.168.247.129:2181\n" +
                "dubbo.metadata-report.address=zookeeper://192.168.247.129:2181").getBytes());
    }

修改dubbo-admin-ui的端口 D:\WorkJava\dubbo-admin-0.2.0\dubbo-admin-ui\config

 

 

4、进行打包 D:\WorkJava\dubbo-admin-0.2.0

mvn clean package -Dmaven.test.skip=true

 

5.进入到dubbo-admin-distribution目录中 D:\WorkJava\dubbo-admin-0.2.0\dubbo-admin-distribution\target

将dubbo-admin-0.2.0.jar包本地部署或者服务器部署,执行运行命令 java -jar 

启动成功;访问ip:8090会出现如下页面, 代表部署已经成功。

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值