1 zookeeper
1.1 解压安装
[root@localhost opt]# tar -zxvfzookeeper-3.4.6.tar.gz
[root@localhost opt]# ll
总用量 175880
drwxr-xr-x. 8 uucp 143 4096 4月 11 2015 jdk7
-rw-r--r--. 1 root root 153512879 8月 26 2016jdk-7u79-linux-x64.gz
drwxr-xr-x. 9 root root 4096 1月 5 01:21 tomcat4Dubbo
drwxr-xr-x. 9 root root 4096 1月 5 01:18 tomcat7
-rw-r--r--. 1 root root 8866946 1月 2 2016 tomcat7.0.65.tar.gz
drwxr-xr-x. 10 1000 1000 4096 2月 20 2014 zookeeper-3.4.6
-rw-r--r--. 1 root root 17699306 6月 9 2015 zookeeper-3.4.6.tar.gz
1.2 配置zoo.cfg
[root@localhost opt]# cd zookeeper-3.4.6
[root@localhost zookeeper-3.4.6]# ls
bin contrib ivy.xml README_packaging.txt zookeeper-3.4.6.jar
build.xml dist-maven lib README.txt zookeeper-3.4.6.jar.asc
CHANGES.txt docs LICENSE.txt recipes zookeeper-3.4.6.jar.md5
conf ivysettings.xml NOTICE.txt src zookeeper-3.4.6.jar.sha1
[root@localhost zookeeper-3.4.6]# cd conf
[root@localhost conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg
[root@localhost conf]# cp zoo_sample.cfgzoo.cfg
可以修改端口和存放数据的目录
[root@localhost conf]# vim zoo.cfg
dataDir=/opt/zookeeper-3.4.6/data
1.3 创建data目录
[root@localhost zookeeper-3.4.6]# mkdirdata
1.4 启动命令
[root@localhost ~]# cd/opt/zookeeper-3.4.6/bin
[root@localhost bin]# ./zkServer.sh start
JMX enabled by default
Using config:/opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
1.5 查看启动状态
[root@localhost bin]# ./zkServer.sh status
JMX enabled by default
Using config:/opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: standalone
2 dubbo管理平台
2.1 上传dubbo-admin-2.5.4.war
2.2 解压到tomcat的webapps下的指定目录
[root@localhost webapps]# unzipdubbo-admin-2.5.4.war -d dubboAdmin
[root@localhost webapps]# ll
总用量 26320
drwxr-xr-x. 14 root root 4096 1月 5 01:21 docs
drwxr-xr-x. 8 root root 4096 1月 5 01:31 dubboAdmin
-rw-r--r--. 1 root root 26924417 12月 7 2015 dubbo-admin-2.5.4.war
drwxr-xr-x. 7 root root 4096 1月 5 01:21 examples
drwxr-xr-x. 5 root root 4096 1月 5 01:21 host-manager
drwxr-xr-x. 5 root root 4096 1月 5 01:21 manager
drwxr-xr-x. 3 root root 4096 1月 5 01:21 ROOT
2.3 配置dubbo.properties
可以配置zookeeper服务器地址和端口号以及管理平台的访问用户
[root@localhost bin]# cd../webapps/dubboAdmin/
[root@localhost dubboAdmin]# ls
crossdomain.xml css favicon.ico images js META-INF SpryAssets sv-SE.lnk WEB-INF
[root@localhost dubboAdmin]# cd WEB-INF/
[root@localhost WEB-INF]# ls
classes forms lib webx-governance.xml webx-personal.xml webx.xml
common i18n log4j.xml webx-home.xml webx-sysinfo.xml
dubbo.properties jointown-B2B.lnk templates web.xml webx-sysmanage.xml
[root@localhost WEB-INF]# lessdubbo.properties
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest
2.4 修改tomcat端口号
[root@localhost conf]# vim server.xml
<Connector port="8081"protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>
启动dubboAdmin
[root@localhost bin]# cd/opt/tomcat4Dubbo/bin
[root@localhost bin]# ./startup.sh