windows10 搭建Dubbo

1、官方文档

http://dubbo.apache.org/zh-cn/docs/admin/ops/dubbo-ops.html

2、下载安装包

https://mirrors.cnnic.cn/apache/zookeeper/                   https://tomcat.apache.org/download-70.cgi

3、需要安装一个tomcat,一个zookeeper

4、安装,解压在同一个文件中

windows10 搭建Dubbo

5、修改tomcat(由于当前本机是第二个tomcat,所以配置如下)

  • 修改http的访问端口

  http的访问端口默认为8080,因为是多个,所以修改如下:

 <Connector port="8082" URIEncoding="utf-8" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
  • 修改JVM启动端口

  JVM的启动端口号默认为8009,此时端口号改为如下:

 <Connector port="8029" protocol="AJP/1.3" redirectPort="8443" />
  • 修改Shutdown端口

  Shutdown是关闭Tomcat时默认启动的端口,该端口号为8005,将其修改为如下:

 <Server port="8025" shutdown="SHUTDOWN">

6、修改启动文件(startup.bat 路径:C:\dubbo\apache-tomcat-8.5.31\bin\startup.bat)

 @echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License. rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem --------------------------------------------------------------------------- set JAVA_HOME=C:/Program Files/Java/jdk1.7/jdk1.7.0_17
set CATALINA_HOME=C:/dubbo/apache-tomcat-8.5.31 setlocal rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat" rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs call "%EXECUTABLE%" start %CMD_LINE_ARGS% :end

7、下载dubbo-admin-2.5.3,修改名称为Root

放入webapps文件夹下,启动zkServer.cmd,启动tomcat

windows10 搭建Dubbo

8、访问:http://localhost:8081

输入账户:root

密码   :  root

windows10 搭建Dubbo

9、更多内容

http://dubbo.apache.org/zh-cn/docs/admin/ops/dubbo-ops.html.

https://github.com/apache/incubator-dubbo

上一篇:优雅的使用windows


下一篇:分析helo1项目中的 Web.xml