Dubbo-demo搭建 (mac适用)
全篇参考文章:https://blog.csdn.net/noaman_wgs/article/details/70214612
1.jdk下载/安装/设置环境变量
参考文章地址:https://blog.csdn.net/yangaiyu/article/details/72857144
附:mac中bash_profile文件的打开/保存/关闭命令:
https://www.cnblogs.com/mokey/p/3542389.html
查看mac中java的路径:
https://blog.csdn.net/caoxiaohong1005/article/details/73611424
- zookeeper
step1:mac下通过brew方式下载安装zookeeper
在命令行窗口执行:
检查是否已经安装(安装版本): brew info zookeeper
下载安装:brew install zookeeper
进入目录查看缺省的配置文件:ls /usr/local/etc/zookeeper
启动服务:zkServer
zkServer status
zkServer start
查看zookeeper运行状态:zkCli
注:zookeeper要保持开启状态哦~
*mac下的brew安装是啥意思*
brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令;
参考文章地址:https://blog.csdn.net/whereismatrix/article/details/50420099
3.maven下载安装
直接看下面的参考文章~
参考文章地址:https://blog.csdn.net/u011886447/article/details/70200922
https://blog.csdn.net/u010429286/article/details/77847676?locationNum=1&fps=1
PS:最终bash_profile的内容如下(包含了jdk的环境变量配置):
export PATH=${PATH}:/Users/…………/sdk/tools:/Users…………/sdk/platform-tools
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
export JAVA_HOME
M2_HOME=/Library/maven/apache-maven-3.5.3
export M2_HOME
PATH=
PATH:
P
A
T
H
:
{JAVA_HOME}/bin:
M2HOME/binexportPATHCLASSPATH=
M
2
H
O
M
E
/
b
i
n
e
x
p
o
r
t
P
A
T
H
C
L
A
S
S
P
A
T
H
=
JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export CLASSPATH
4.IDEA创建maven项目
直接下载网上源码,然后IDEA打开,运行~
源码下载地址:https://github.com/nomico271/DatatablesDemo
运行顺序:先确保provider已被运行后再启动consumer模块
5.tomcat下载及安装
参考文章地址:https://blog.csdn.net/feng2qing/article/details/60968548
https://blog.csdn.net/u013127850/article/details/73848843
6.dubbo-admin
dubbo-admin简介:dubbo-admin是阿里巴巴的发布的dubbo管理平台;
具体步骤:
step1:下载dubbo-admin源码
https://download.csdn.net/download/d007letian/9983539(csdn上买的)
step2:命令行窗口打包dubbo-admin源码形成war包
step3:将war包拷贝至tomcat的安装目录/webapps目录下
参考文章地址:https://blog.csdn.net/d007letian/article/details/78018176
step4:启动tomcat
进入tomcat安装目录的bin下,执行:sh ./startup.sh
step5:在浏览器中输入http://localhost:8080/dubbo-admin-2.5.5/
进入dubbo管理平台,账号密码均为root