In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about the installation and configuration of zookeeper, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Today I took this opportunity to use hadoop's zookeeper, which is used in conjunction with the dubbo services framework.
The following step-by-step explanation of the use process: (note: this installation process is based on Red Hat linux, the system has installed JDK6 and Tomcat6.0, about the installation of JDK and Tomcat, there is no detailed description here. )
1. Install and configure Zookeeper
Download address: http://apache.etoak.com/zookeeper/zookeeper-3.4.5/ can download the latest version 3.4.5 tar.gz package.
Copy the downloaded zookeeper to / opt/: cp zookeeper-3.4.5.tar.gz / opt/
The command side executes the following:
Tar zxvf zookeeper-3.4.5.tar.gzcd zookeeper-3.4.5cp conf/zoo_sample.cfg conf/zoo.cfg
Configure zookeeper:
Vi conf/zoo.cfg
If you do not need a cluster, the content of zoo.cfg is as follows: (the data directory needs to be changed to your real output directory)
TickTime=2000initLimit=10syncLimit=5dataDir=/opt/dubbo/zookeeper-dataclientPort=2181
If you need a cluster, the content of zoo.cfg is as follows: (the data directory and server address need to be changed to the information of your actual deployment machine)
TickTime=2000initLimit=10syncLimit=5dataDir=/opt/dubbo/zookeeper-dataclientPort=2181server.1=192.168.1.101:2555:3555server.2=192.168.1.102:2555:3555
And place the myid file in the data directory: (dataDir in zoo.cfg above)
Mkdir datavi myid
Myid indicates its own id, which corresponds to the server in the above zoo.cfg. After the number, the content of the first is 1, and the content of the second is 2.
Start:
. / bin/zkServer.sh start
Stop:
. / bin/zkServer.sh stop
Whether the test starts properly:
Telnet 127.0.0.1 2181dump
Or
Echo dump | nc 127.0.0.1 2181
At this point, the installation and configuration of zookeeper is complete.
The above is what the installation and configuration of zookeeper is like, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.