clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
Linux安装dubbo admin 管理控制台安装详细介绍
http://81.68.100.55:8080/dubbo-admin
一、zookeeper部署
1.1、安装jdk
01
02
03
04
05
|
[root@dubbo src] # rpm -ivh jdk-8u181-linux-x64.rpm [root@dubbo src] # java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) |
1.2、zookeeper下载
下载链接:http://archive.apache.org/dist/zookeeper/
01
02
03
04
05
06
|
[root@dubbo ~] # mkdir /data/src [root@dubbo ~] # cd /data/src [root@dubbo src] # ll -rw-r--r-- 1 root root 11833706 Oct 31 2014 zookeeper-3.3.6. tar .gz [root@dubbo src] # tar xf zookeeper-3.3.6.tar.gz -C /usr/local/ [root@dubbo src] # mv /usr/local/zookeeper-3.3.6/ /usr/local/zookeeper |
1.3、zookeeper配置
创建zookeeper数据目录:mkdir -p /data/app/zookeeper/
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
|
[root@dubbo zookeeper] # cd conf/ [root@dubbo conf] # ls configuration.xsl log4j.properties zoo_sample.cfg [root@dubbo conf] # cp zoo_sample.cfg zoo.cfg #名称必须为zoo.cfg [root@dubbo 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. dataDir= /data/app/zookeeper #数据目录根据自己的需要修改 # the port at which the clients will connect clientPort=2181 #zookeeper端口 |
1.4、zookeeper启动
01
02
03
04
05
06
07
|
[root@dubbo src] # /usr/local/zookeeper/bin/zkServer.sh start JMX enabled by default Using config: /usr/local/zookeeper/bin/ .. /conf/zoo .cfg Starting zookeeper ... STARTED [root@dubbo src] # ps -ef|grep zookeeper [root@dubbo src] # netstat -lntp|grep 2181 tcp6 0 0 :::2181 :::* LISTEN 4354 /java |
二、maven环境部署
下载地址:https://mirrors.cnnic.cn/apache/maven/maven-3/
01
02
03
04
05
06
07
08
09
10
11
12
13
|
[root@dubbo src] # wget https://mirrors.cnnic.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz [root@dubbo src] # tar xf apache-maven-3.6.1-bin.tar.gz -C /usr/local/ [root@dubbo src] # cd /usr/local/ [root@dubbo local ] # mv apache-maven-3.6.1/ maven [root@dubbo local ] # vim /etc/profile export PATH= /usr/local/maven/bin :$PATH [root@dubbo local ] # source /etc/profile [root@dubbo local ] # mvn -version Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00) Maven home: /usr/local/maven Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /usr/java/jdk1 .8.0_181-amd64 /jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" , version: "3.10.0-693.el7.x86_64" , arch: "amd64" , family: "unix" |
三、tomcat环境部署
安装tomcat之前配置java环境
tomcat下载连接:https://tomcat.apache.org/
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#下载并解压 [root@dubbo src] # ll apache-tomcat-8.0.38.tar.gz -rw-r--r-- 1 root root 9305616 Jan 7 2019 apache-tomcat-8.0.38. tar .gz [root@dubbo src] # tar xf apache-tomcat-8.0.38.tar.gz -C /usr/local/ [root@dubbo src] # cd /usr/local/ [root@dubbo local ] # mv apache-tomcat-8.0.38/ tomcat #配置环境变量 [root@dubbo local ] # vim /etc/profile export PATH= /usr/local/tomcat/bin :$PATH [root@dubbo local ] # source /etc/profile #查看tomcat版本 [root@dubbo local ] # /usr/local/tomcat/bin/version.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat/bin/bootstrap .jar: /usr/local/tomcat/bin/tomcat-juli .jar Server version: Apache Tomcat /8 .0.38 Server built: Oct 6 2016 20:51:55 UTC Server number: 8.0.38.0 OS Name: Linux OS Version: 3.10.0-693.el7.x86_64 Architecture: amd64 JVM Version: 1.8.0_181-b13 JVM Vendor: Oracle Corporation #启动tomcat [root@dubbo local ] # /usr/local/tomcat/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat/bin/bootstrap .jar: /usr/local/tomcat/bin/tomcat-juli .jar Tomcat started. |
四、dubbo admin部署
注意事项:
1、dubbo-2.6.1以后的版本不再有dubbo-admin
2、安装dubbo admin管理控制台的时候,前提需要先安装zookeeper
Dubbo相关网站:
dubbo的中文官方网站:http://dubbo.apache.org/#!/?lang=zh-cn
dubbo的英文官方网站:http://dubbo.apache.org/#!/?lang=en-us
Dubbo 版本历史:https://github.com/apache/incubator-dubbo/releases
Dubbo admin 新地址:https://github.com/apache/incubator-dubbo-ops/
4.1、maven构建生成war
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[root@dubbo src] # ll dubbo-2.5.x.zip -rw-r--r-- 1 root root 3087131 Sep 4 00:48 dubbo-2.5.x.zip [root@dubbo src] # unzip dubbo-2.5.x.zip #进入dubbo-admin目录 [root@dubbo src] # cd dubbo-2.5.x/dubbo-admin/ #maven构建war包(时间长) [root@dubbo dubbo-admin] # mvn install -Dmaven.test.skip=true [root@dubbo dubbo-admin] # ll total 8 -rw-r--r-- 1 root root 6575 Aug 16 2018 pom.xml drwxr-xr-x 4 root root 30 Aug 16 2018 src drwxr-xr-x 7 root root 182 Nov 9 13:03 target #生成target目录 [root@dubbo dubbo-admin] # cd target/ [root@dubbo target] # ll total 31528 drwxr-xr-x 4 root root 33 Nov 9 12:58 classes drwxr-xr-x 8 root root 132 Nov 9 12:59 dubbo-admin-2.5.10 -rw-r--r-- 1 root root 218056 Nov 9 13:03 dubbo-admin-2.5.10-sources.jar -rw-r--r-- 1 root root 32062835 Nov 9 12:59 dubbo-admin-2.5.10.war #目标war包 drwxr-xr-x 3 root root 25 Nov 9 12:58 generated-sources drwxr-xr-x 2 root root 28 Nov 9 12:59 maven-archiver drwxr-xr-x 3 root root 35 Nov 9 12:58 maven-status |
4.2、war拷贝到tomcat webapp下并启动
注意:注意启动之前先要启动zookeeper
01
02
03
04
05
06
07
08
09
10
11
12
13
14
|
[root@dubbo target] # cp dubbo-admin-2.5.10.war /usr/local/tomcat/webapps/ [root@dubbo webapps] # /usr/local/tomcat/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat/bin/bootstrap .jar: /usr/local/tomcat/bin/tomcat-juli .jar Tomcat started. [root@dubbo webapps] # ls dubbo-admin-2.5.10 dubbo-admin-2.5.10.war #停止tomcat,更改目录名后,重启tomcat [root@dubbo webapps] # mv dubbo-admin-2.5.10 dubbo-admin [root@dubbo webapps] # /usr/local/tomcat/bin/startup.sh |
浏览器访问:http://81.68.100.55:8080/dubbo-admin
密码:root root