dubbo管控台安装
Posted 你好,旧时光
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了dubbo管控台安装相关的知识,希望对你有一定的参考价值。
1. jdk安装
# cp installpkgs/jdk-7u67-linux-x64_tar_gz /usr/local
# tar -zxf jdk-7u67-linux-x64_tar_gz
# vi /etc/profile
export JAVA_HOME=/usr/local/jdk1.7.0_67 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar |
# source /etc/profile
# java -version
切换普通用户有jdk
# vi /etc/bashrc
export JAVA_HOME=/usr/local/jdk1.7.0_67 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar |
# source /etc/bashrc
2. zookeeper安装
# su haoxr
$ cd ~
$ cp /installpkgs/zookeeper-3.4.6.tar.gz .
$ tar -zxvf zookeeper-3.4.6.tar.gz
$ cd zookeeper-3.4.6/
$ mkdir data
$ mkdir logs
$ cd conf
$ cp zoo_sample.cfg zoo.cfg
$ vi 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. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/home/haoxr/zookeeper-3.4.6/data dataLogDir=/home/haoxr/zookeeper-3.4.6/logs # the port at which the clients will connect clientPort=2181 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1 server.1=srv-provider:2888:3888 |
$ cd ../data
$ vi myid
1 |
配置zookeeper环境变量
$ vi /home/haoxr/.bash_profile
export ZOOKEEPER_HOME=/home/haoxr/zookeeper-3.4.6 export PATH=$ZOOKEEPER_HOME/bin:$PATH |
$ source /home/haoxr/.bash_profile
切回root用户,添加dns域名解析
$ su root
Password:******
# vi /etc/hosts
192.169.213.129 srv-provider |
# exit
$ cd zookeeper-3.4.6/bin/
$ zkServer.sh start
查看状态
$ zkServer.sh status
设置zookeeper开机启动
切换root用户
# vi /etc/rc.local
su - haoxr -c \'/home/haoxr/zookeeper-3.4.6/bin/zkServer.sh start\' |
3. dubbo管控台安装
$ cp /installpkgs/apache-tomcat-7.0.41.tar.gz .
$ tar -zxvf apache-tomcat-7.0.41.tar.gz
$ mv apache-tomcat-7.0.41/ dubbo-admin-tomcat
$ cd dubbo-admin-tomcat/webapps
$ rm -rf *
$ unzip /installpkgs/dubbo-admin-2.5.3.war -d ROOT
$ vi ROOT/WEB-INF/dubbo.properties
dubbo.registry.address=zookeeper://192.168.43.130:2181 dubbo.admin.root.password=123456 dubbo.admin.guest.password=123456 |
$ cd ../bin/
$ ./startup.sh
查看启动日志
$ tail -f ../logs/catalina.out
关闭防火墙,切到root身份
立即生效
# service iptables stop
重启永久生效
# chkconfig iptables off
以上是关于dubbo管控台安装的主要内容,如果未能解决你的问题,请参考以下文章