In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to install zookeeper services in the linux system, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1. Create a / usr/local/services/zookeeper folder:
Mkdir-p / usr/local/services/zookeeper
2. Go to the / usr/local/services/zookeeper directory:
Cd / usr/local/services/zookeeper
3. Download zookeeper-3.4.9.tar.gz:
Wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
4. Decompress zookeeper-3.4.9.tar.gz:
Tar-zxvf zookeeper-3.4.9.tar.gz
5. Go to the / usr/local/services/zookeeper/zookeeper-3.4.9/conf directory:
Cd zookeeper-3.4.9/conf/
6. Copy the zoo_sample.cfg file and name it zoo.cfg:
Cp zoo_sample.cfg zoo.cfg
7. Open the zoo.cfg file with vim and modify its contents as follows:
# The number of milliseconds of each tick # benchmark interval defined by zookeeper (in millisecond 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=/tmp/zookeeper # data folder dataDir=/usr/local/services/zookeeper/zookeeper-3.4.9/data # Log folder dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.9/logs # the port at which the clients will connect # client access zookeeper port number 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 autopurge feature # autopurge.purgeInterval=1
8. Save and close zoo.cfg file:
9. Go to the / usr/local/services/zookeeper/zookeeper-3.4.9/bin directory:
Cd.. / bin/
10. Use vim to open the configuration file profile in the / etc/ directory:
Vim / etc/profile
And add the following to its tail:
# idea-zookeeper-3.4.9 config start-2016-09-08 export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.9/ export PATH=$ZOOKEEPER_HOME/bin:$PATH export PATH # idea-zookeeper-3.4.9 config start-2016-09-08
11. Make the profile file in the / etc/ directory take effect:
Source / etc/profile
12. Start zookeeper service:
ZkServer.sh start
If the following message is printed, it indicates that the startup is successful:
ZooKeeper JMX enabled by default Using config: / usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg Starting zookeeper... STARTED
13. Query zookeeper status:
ZkServer.sh status
14. Shut down the zookeeper service:
ZkServer.sh stop
If the following message is printed, it indicates that the shutdown is successful:
ZooKeeper JMX enabled by default Using config: / usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg Stopping zookeeper... STOPPED
15. Restart zookeeper service:
ZkServer.sh restart
If the following message is printed, the restart is successful:
ZooKeeper JMX enabled by default Using config: / usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg ZooKeeper JMX enabled by default Using config: / usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg Stopping zookeeper... STOPPED ZooKeeper JMX enabled by default Using config: / usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg Starting zookeeper... STARTED what is Linux system Linux is a free to use and freely 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.
The above content is how to install zookeeper service in linux system. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to 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.