Installing zookeeper
1, decompression zookeeper-3.4.6.tar.gz:
TAR-ZXVF zookeeper-3.4.6.tar.gz
2. Create/usr/local/zookeeper folder: Mkdir-p/usr/local/services/zookeeper
3. Enter into the/usr/local/zookeeper directory:
Cd/usr/local/zookeeper/zookeeper
4, Decompression zookeeper-3.4.6.tar.gz:
TAR-ZXVF zookeeper-3.4.6.tar.gz
5. Enter into the/usr/local/services/zookeeper/zookeeper-3.4.6/conf directory:
CD zookeeper-3.4.6/conf/
6. Copy the Zoo_sample.cfg file and name it as Zoo.cfg:
CP Zoo_sample.cfg Zoo.cfg
7. Open the Zoo.cfg file with vim and modify its contents
8. Enter into the/usr/local/services/zookeeper/zookeeper-3.4.9/bin directory
Vim/etc/profile Configuring environment variables
9, the/etc/directory under the profile file can be effective:
Source/etc/profile
10. Start Zookeeper Service:
zkserver.sh start
If you print the following information, it indicates a successful start:
ZooKeeper JMX enabled by default
Using config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfg
Starting zookeeper ... STARTED
11, Query Zookeeper status:
zkserver.sh status
12. Close Zookeeper Service:
zkserver.sh stop
If you print the following information, it indicates a successful shutdown:
ZooKeeper JMX enabled by default
Using config:/usr/local/services/zookeeper/zookeeper-3.4.9/bin/. /conf/zoo.cfg
Stopping zookeeper ... STOPPED
13. Restart Zookeeper Service:
zkserver.sh restart
If you print the following information, it indicates a successful restart:
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
Linux Installation Zookeeper