博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
dubbo环境的搭建
阅读量:6147 次
发布时间:2019-06-21

本文共 5765 字,大约阅读时间需要 19 分钟。

一、jdk1.7.0_80的安装

二、maven的安装
三、zookeeper的安装
四、安装tomcat

##########################################################################################

一、jdk安装
tzr xf jdk-8u152-linux-x64.tar.gz -C /usr/local/
vim /etc/profile
#---------------------------------------------------------------------------------------------------#
#JDK1.8.0_152 #添加如下
#export JAVA_HOME=/usr/local/jdk1.8.0_152 #
#export PATH=$PATH:$JAVA_HOME/bin #
#export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/jre/lib/dt.jar:$JAVA_HOME/jre/lib/tools.jar#
#---------------------------------------------------------------------------------------------------#
source /etc/profile #使配置生效

#完成后的测试

#[root@ss jdk1.8.0_152]# java -version
#java version "1.8.0_152"
#Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
#Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
##########################################################################################

##########################################################################################

二、maven的安装 #用于制作dubbo war包
tar xf apache-maven-3.3.9-bin.tar.gz -C /usr/local/
vim /etc/profile
#---------------------------------------------------------------------------#
#Maven3.3.9 #
#export MAVEN_HOME=/usr/local/apache-maven-3.3.9 #
#export PATH=${PATH}:${MAVEN_HOME}/bin #
#---------------------------------------------------------------------------#
source /etc/profile

#完成后的验证

#[root@ss WEB-INF]# mvn -v #查看启动状态
#Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
#Maven home: /usr/local/apache-maven-3.3.9
#Java version: 1.8.0_152, vendor: Oracle Corporation
#Java home: /usr/local/jdk1.8.0_152/jre
#Default locale: zh_CN, platform encoding: UTF-8
#OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family: "unix"
##########################################################################################

##########################################################################################

三、zookeeper的安装
tar xf zookeeper-3.4.6.tar.gz -C /usr/local/
cd /usr/local/zookeeper-3.4.6/
mkdir data
cd conf/
cp zoo_simple.cfg zoo.cfg
vim zoo.cfg
#---------------------------------------------------------------------------#
#dataDir=/usr/local/zookeeper-3.4.6/data #数据目录
#clientPort=2181 #修改端口
#---------------------------------------------------------------------------#
cd ../bin/
./zkServer.sh start #启动zookeeper
./zkServer.sh status #查看启动状态
#---------------------------------------------------------------------------#
#JMX enabled by default #
#Using config: /usr/local/zookeeper-3.4.6/bin/../conf/zoo.cfg #
#Mode: standalone #显示已启用
#---------------------------------------------------------------------------#
##########################################################################################

##########################################################################################

四、安装tomcat
mkdir /usr/local/dubboserver/ #创建服务目录dubboserver
tar xf apache-tomcat-7.0.94.tar.gz -C /usr/local/dubboserver/
mv apache-tomcat-7.0.94/ dubbo-monitor-8888 #修改dubbo监控中心目录名字
cd dubbo-monitor-8888
vim conf/servere.xml
#---------------------------------------------------------------------------#修改端口号,需规划好使用量,视具体情况定
#<Server port="3888" shutdown="SHUTDOWN"> #shutdown端口8005改为3888
#<Connector port="8888" protocol="HTTP/1.1" #web访问端口号8080改为8888
#<Connector port="6888" protocol="AJP/1.3" redirectPort="8443" /> #8009改为6888
#---------------------------------------------------------------------------#

#dubbo-admin的war包的导入

mv dubbo-admin-2.5.6.war /usr/local/dubboserver/dubbo-monitor-8888/webapps/
./bin/startup.sh #启动tomcat
#---------------------------------------------------------------------------#
#[root@ss dubbo-monitor-8888]# ps -ef |grep tomcat #查看启动状态
#root 15095 1 79 18:25 pts/1 00:00:03 /usr/local/jdk1.8.0_152/bin/java -Djava.util.logging.config.file=/usr/local/dubboserver/dubbo-monitor-8888/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dignore.endorsed.dirs= -classpath /usr/local/dubboserver/dubbo-monitor-8888/bin/bootstrap.jar:/usr/local/dubboserver/dubbo-monitor-8888/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/dubboserver/dubbo-monitor-8888 -Dcatalina.home=/usr/local/dubboserver/dubbo-monitor-8888 -Djava.io.tmpdir=/usr/local/dubboserver/dubbo-monitor-8888/temp org.apache.catalina.startup.Bootstrap start
#---------------------------------------------------------------------------#

#dubbo监控端tomcat的操作:

配置zookeeper注册中心的用户名密码和端口
vim /usr/local/dubboserver/dubbo-monitor-8888/webapps/ROOT/WEB-INF/dubbo.properties
#---------------------------------------------------------------------------#
#dubbo.registry.address=zookeeper://127.0.0.1:2181 #
#dubbo.admin.root.password=root #
#dubbo.admin.guest.password=guest #
#---------------------------------------------------------------------------#

浏览器访问dubbo地址加端口,查看

##########################################################################################

#项目tomcat的操作

查看修改提供者和消费者的zookeeper注册中心地址
vim webapps/ROOT/WEB-INF/classes/applicationContext-provider.xml
#---------------------------------------------------------------------------#
#<dubbo:registry protocol="zookeeper" address="10.10.20.16:2181"/> #
#---------------------------------------------------------------------------#

vim webapps/ROOT/WEB-INF/classes/applicationContext-consumer.xml

#---------------------------------------------------------------------------#
#<dubbo:registry address="zookeeper://10.10.20.16:2181" check="false"/> #
#---------------------------------------------------------------------------#

##########################################################################################

转载于:https://blog.51cto.com/13006632/2389352

你可能感兴趣的文章
在soapui上踩过的坑
查看>>
MySQL的字符集和字符编码笔记
查看>>
ntpd同步时间
查看>>
must implement java.io.Serializable hessian
查看>>
Microsoft Licenses Flash Lite for Windows Mobile Users
查看>>
HDOJ 2020 绝对值排序
查看>>
HDOJ/HDU 2560 Buildings(嗯~水题)
查看>>
Maven编译时跳过Test
查看>>
Spring Boot 整合Spring Security 和Swagger2 遇到的问题小结
查看>>
[20170628]12C ORA-54032.txt
查看>>
除以2
查看>>
高可用集群原理解析
查看>>
Nginx配置URL转向tomcat
查看>>
极客Web前端开发资源大荟萃#001
查看>>
让div固定在某个位置
查看>>
Java开发环境Docker镜像
查看>>
从无到有,WebService Apache Axis2初步实践
查看>>
任务调度(一)——jdk自带的Timer
查看>>
UIKit框架(15)PCH头文件
查看>>
整理看到的好的文档
查看>>