Lin Bingwen Evankaka original works. Reprint please specify the source Http://blog.csdn.net/evankaka
Zookeeper is a distributed, open source distributed application Coordination Service that is an open source implementation of Google's chubby and an important component of Hadoop and HBase. It is a software that provides consistent services for distributed applications, including configuration maintenance, name services, distributed synchronization, group services, and so on.
Dubbo is the Alibaba Open source distributed service framework, and its biggest feature is the layered approach to architecting, which allows for decoupling (or maximum coupling) between layers. From the point of view of the service model, Dubbo uses a very simple model, either the provider service or consumer consumption services, so it can be abstracted from the service provider (Provider) and the service consumer (Consumer) two roles. About the Registry, protocol support, service monitoring and other content.
Native Environment: jdk:1.8
maven:apache-maven-3.2.1
zookeeper:zookeeper-3.4.6
tomcat:apache-tomcat-7.0.62
Dubbo-admin:dubbo-admin-2.5.4-snapshot.war This is my own local package build
First, zookeeper installation and start-up
The first thing you need to do is install the JDK, download it from Oracle's Java Web site, and install it very simply, no details. One of the zookeeper is http://www.apache.org/dyn/closer.cgi/zookeeper/, downloaded directly after decompression, do not install.
Before you execute the startup script, there are a few basic configuration items that need to be configured, Zookeeper configuration files in the Conf directory, this directory has zoo_sample.cfg and log4j.properties, what you need to do is Zoo_ Sample.cfg renamed Zoo.cfg because Zookeeper will find this file as the default profile at startup. The meanings of each configuration item in this configuration file are described in detail below.
# The number of milliseconds of each tickticktime=2000# the number of ticks, the initial # synchronization phase can T akeinitlimit=10# the number of ticks so can pass between # Sending a request and getting an acknowledgementsynclimit=5# The directory where the snapshot is stored.# does not use/tmp for storage,/tmp here is just # example Sakes.datadir=d:\\ja va\\tool\\zookeeper-3.4.6\\tmp# the port at which the clients would connectclientport=2181# the maximum number of client Co nnections.# increase this if you need to handle more clients#maxclientcnxns=60## is sure to read the Maintenance section O f 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# S ET to ' 0 ' to disable Auto purge feature#autopurge.purgeinterval=1
Put
Datadir=/tmp/zookeeper
Change to the following:
Datadir=d:\\java\\tool\\zookeeper-3.4.6\\tmp
You can change it to your favorite.
which
Ticktime: This time is the time interval between the Zookeeper server or between the client and the server to maintain the heartbeat, that is, each ticktime time sends a heartbeat. DataDir: As the name implies is Zookeeper to save the data directory, by default, Zookeeper will write the data log file is also stored in this directory. Datalogdir: As the name implies is Zookeeper save the log file directory ClientPort: This port is the client connection Zookeeper server port, Zookeeper will listen to this port, accept client access requests. When these configuration items are configured, you can start Zookeeper now, after starting to check whether Zookeeper is already in service, you can check with the Netstat–ano command to see if there is a ClientPort port number you configured in the Listening service
Single-machine installation is very simple, as long as the Zookeeper to obtain a compressed package and extract to a directory such as: D:\Java\Tool\zookeeper-3.4.6, Zookeeper startup script in the bin directory, Windows The startup script under is the bin file, such as D:\Java\Tool\zookeeper-3.4.6\bin\ Zkserver.cmd.
Start as follows:
Input JPS, which appears as follows, also indicates the successful start
The above black box is not closed, it means that the registry has been switched, be sure to remember the registry to open before the program runs, and is always open
II. installation of Dubbo-admin management Platform 1.1, dubbo-admin local compilation package
Because zookeeper is just a black box, we can not see whether there are any providers or consumers, it is necessary to use the Dubbo-admin management platform for real-time viewing, but also through this platform to manage the creators and consumers.
Dubbo-admin.war can be on-line Baidu to download, but I downloaded several war packages, the launch of the service started all the error, this time is probably the JDK of our system and compiled Dubbo-admin.war JDK version of the different results. So I downloaded the source code of Dubbo-master directly and then compiled a war package myself, so there would be no problem of starting an error. (Here it is strongly recommended to compile a, the basic of the Internet to do not, try a lot of, and finally to do their own) the process of compiling their own computer as follows, must be installed maven and jdk!
All source code of Dubbo can be downloaded from Https://github.com/alibaba/dubbo. Unzip after the good.
Unzip the contents of the file, here you do not have to control the other, just dubbo-admin.
Because here only need to compile dubbo-admin, so open cmd, and then into the decompression path e:\ download \dubbo-master\dubbo-master\dubbo-admin, someone put the whole project compiled, actually no need, Only need to compile dubbo-admin, what depends on, MAVEN will automatically help you solve. The whole process is as follows:
First, enter the directory via CMD and type the command
then enter the command
MVN package-dmaven.skip.test=true
Here you have to configure the MAVEN environment variable, where the-dmaven.skip.test indicates that the test package is not packaged. Then the results are as follows, indicating a successful package
Re-open the project's file location: E:\ download \dubbo-master\dubbo-master\dubbo-admin\target
The target represents the local path of the build, opened, and there is a file Dubbo-admin-2.5.4-snapshot.war that the package is successful and the file must be placed under Tomcat to run.
1.2, Dubbo-admin Installation
Dubbo-admin has been packaged successfully, then it's a lot easier.
1. Installation
Copy the Dubbo-admin-2.5.4-snapshot.war into the Tomcat WebApps
2. Configuration
Modify the Tomcat port 8088, modify the method as follows, hit the file server.xml under Conf, because zookeeper will use 8080 of the port, so in order to not conflict, the Tomcat port to change. Always remember to change!!!
And then Modify
3. Start Tomcat and let it unzip the war.
The process is as follows
And then start
Found WebApp a folder more
Turn the tomcat off again, stop directly, the button above
4, modify the Dubbo.properties
D:\Java\Tool\apache-tomcat-7.0.62\webapps\dubbo-admin-2.5.4-SNAPSHOT\WEB-INF
is the following:
dubbo.registry.address=zookeeper://127.0.0.1:2181dubbo.admin.root.password=rootdubbo.admin.guest.password= Guest
if it is, do not change, here the 127.0.0.1 corresponds to their own computer IP, because here zookeeper also on their own computer, so to write. In general, there is no need to change, because the initial is the local IP address. But look, it's safer .
5. Visit:
This is all configured well, first of all, be sure to start zookeeper start before you start tomcat! Be sure to start zookeeper startup before you start tomcat! Be sure to start zookeeper startup before you start tomcat! The important thing three times!
Start Zookeeper
Start Tomcat
Visit http://localhost:8088/dubbo-admin-2.5.4-SNAPSHOT/must pay attention to the name must be the same as you webapp under the project name!!
Pop up as follows:
Enter the user name and password are root
You will see:
The following interface shows that the installation configuration is successful and the login password is root/root
Now that's done, you can start using the ~~~~~~~~
Copyright NOTICE: This article for Bo Master Lin Bingwen Evankaka original article, reproduced please indicate the source Http://blog.csdn.net/evankaka
Construction of Dubbo-admin management platform and Zookeeper registration center