In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The editor today takes you to understand how to install zookeeper in the Linux system. The knowledge points in the article are introduced in great detail. Friends who think it is helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about how to install zookeeper in the Linux system.
ZooKeeper is a distributed, open source distributed application coordination service, an open source implementation of Google's Chubby, and an important component of Hadoop and HBase.
Installation environment: Linux Cenos64 64-bit zookeeper version: 3.4.14 installation requirements: Linux native must have installed JDK because my virtual machine has already installed JDK, will not demonstrate how to install JDK, Baidu
download
Zookeeper download address to open the link, the official recommendation to download the stable version, click to download the stable version. I downloaded the officially recommended stable version, but I always reported an error after downloading to check the startup status, so I switched the version instead of downloading the officially recommended stable version, and the problem was solved. Either the latest or the best, what suits you is the best)
Click to download
Installation
Create a new directory, zookeeper, and grant folder permissions
Cd / usr/local create directory mkdir zookeeper gives directory permission chmoid 777 zookeeper12345
Upload the downloaded software installation package to the newly created directory using FTP to extract the files and get the real directory of the compressed files.
Tar zxf zookeeper-3.4.14.tar.gz1
Go to the directory and create a new folder data
Cd / usr/local/zookeeper/zookeeper-3.4.14mkdir data12
Go to the conf folder and change the name of the configuration file
Cd / usr/local/zookeeper/zookeeper-3.4.14/conf mv zoo_sample.cfg zoo.cfg12
Modify the contents of the zoo.cfg configuration file. The official recommendation here is not to use the tmp folder. This is actually an example. Change the address corresponding to dataDir to the directory address under the newly created data folder.
In the process of using SecureCRT, it is easy to encounter the problem that the cursor disappears and cannot be found. It is very painful to use vim without the cursor, so use a shortcut key! one
Double-click the Alt key and the cursor appears!
The installation and configuration here is complete, and you can use it normally!
Start or to shut down
Start zookeeper:bin/. / zkServer.sh start
Check the zookeeper status (this step is necessary): bin/. / zkServer.sh status
Close zookeeper:bin/. / zkServer.sh stop
Keep the cluttered data of the record points for yourself to check:
What role does zookeeper play in dubbo?
The registry is responsible for the registration and search of the service address, which is equivalent to the directory service. Service providers and consumers only interact with the registry at startup, and the registry does not forward requests, so there is less pressure. If you use dubbo-2.3.3 or above, it is recommended to use a zookeeper registry. Zookeeper, a subproject of Apacahe Hadoop, is a tree directory service that supports change push and is suitable to be used as a registry for Dubbo services. It has high industrial strength, can be used in production environment, and is recommended.
Zookeeper is used to register services and load balancing. It is necessary to let callers know which service is provided by which machine. To put it simply, it is the corresponding relationship between ip address and service name. Of course, this correspondence can also be implemented in the caller's business code by hard coding, but if the service provider machine hangs up and the caller does not know, if the code is not changed, the caller will continue to request the dead machine to provide services. Through the heartbeat mechanism, zookeeper can detect dead machines and remove the ip and service correspondence of dead machines from the list. As for supporting high concurrency, it is simply scale-out, and the computing power is improved by adding machines without changing the code. By adding new machines to register the service with zookeeper, there are more service providers and more customers to serve.
Access to the monitoring center of dobuo
Put the war package provided by dubbo in the tomcat directory of the server. It is recommended that the war package be placed on the same machine as the registry. If you do not need to configure the configuration file of the monitoring center on the same machine. Access is the same as normal web project access, enter ip: tomcat port number / name of the decompressed war package
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
Thank you for reading, the above is the whole content of "how to install zookeeper in Linux system", learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
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.