1.dubbo的安装 quickstart

时间:2021-10-26 23:23:14

按照官网给定的指导,执行下面的步骤即可

1.Import the dubbo source code to eclipse project

在eclipse中安装git插件 egit 直接可以从github上拉代码

2. Build the dubbo binary package:
    cd ~/dubbo
    mvn clean install -Dmaven.test.skip
    cd dubbo/target
    ls

3. Install the zookeeper registry:

cd ~
    wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.3/zookeeper-3.3.3.tar.gz
    tar zxvf zookeeper-3.3.3.tar.gz
    cd zookeeper-3.3.3/conf
    cp zoo_sample.cfg zoo.cfg
    vi zoo.cfg
       - edit: dataDir=/home/xxx/data
    cd ../bin
    ./zkServer.sh start

zookeeper默认监听2181端口

4. start provider   cd ~/dubbo/dubbo-demo-provider/conf
    vi dubbo.properties
       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
    cd ../bin
    ./start.sh

5. start consumer

cd ~/dubbo/dubbo-demo-consumer/conf
    vi dubbo.properties
       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
    cd ../bin
    ./start.sh

6. start  monitor
    cd ~/dubbo/dubbo-simple-monitor/conf
    vi dubbo.properties
       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
    cd ../bin
    ./start.sh

7. Install the admin console:

cd ~/dubbo/dubbo-admin
    mvn jetty:run -Ddubbo.registry.address=zookeeper://127.0.0.1:2181
    http://root:root@127.0.0.1:8080

执行mvn jetty:run 命令时 如果出错 抛出找不到插件异常,修改maven中的 setting.xml文件 ,加入以下代码

<pluginGroups>
        <pluginGroup>org.mortbay.jetty</pluginGroup>  
  </pluginGroups>

以上就完成了dubbo的quickstart  上图为证

1.dubbo的安装 quickstart