Copyright: https://blog.csdn.net/xichengqc/article/details/90136689
- Ready virtual machine environment:
Based on vmware12 + centos 6.8, virtual machine environment to build three clusters to learn
relevant installation file location:
link: https://pan.baidu.com/s/1md2w6GJiXzsUKzBXJmJNBA
extraction code: 1dj7 - Tempfile create a folder in the root directory, and then zookeeper and kafka uploaded to the directory and extract
[root@localhost tempfile]# tar xvf zookeeper-3.4.7.tar.gz
[root@localhost tempfile]# tar xvf kafka_2.11-1.0.0.tgz
- The zookeeper and kafka move to the home directory
[root@localhost home]# mkdir software
[root@localhost home]# cd /tempfile/
[root@localhost tempfile]# mv kafka_2.11-1.0.0 /home/software/
[root@localhost tempfile]# mv zookeeper-3.4.7 /home/software/
- Configuration zookeeper
[root@localhost tempfile]# cd /home/software/zookeeper-3.4.7/conf
[root@localhost conf]# cp zoo_sample.cfg zoo.cfg
[root@localhost conf]# vi zoo.cfg
Modify the configuration file as follows:
dataDir=/home/software/zookeeper-3.4.7/userData
Add the following to the last line in the configuration file
server.1=192.168.234.10:2888:3888
Switch to the next /home/software/zookeeper-3.4.7/, create a directory userData
[root@localhost zookeeper-3.4.7]# cd userData/
[root@localhost userData]# vi myid
In the file write the number 1, then save and exit
7. Start zookeeper, respectively, into the bin directory under the three nodes zk directory, execute
[root@localhost bin]# sh zkServer.sh start
Check the status of nodes:
Node 1:
[root@localhost bin]# sh zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /home/software/zookeeper-3.4.7/bin/../conf/zoo.cfg
Mode: standalone
- Installation kafka