###kafka伪分布式的安装
注意:kafka_2.11-0.10.0.1.tgz  2.11表示scala版本,0.10.0.1才是kafka版本

##环境
192.168.50.246 node01
192.168.50.247 node02
192.168.50.248 node03

[root@node01 src]# pwd
/usr/local/src
[root@node01 src]# ll|grep kafka
-rw-r--r-- 1 root root  31831257 Dec 31 10:50 kafka_2.11-0.10.0.1.tgz

#解压到/export/servers/
[root@node01 src]# tar xf kafka_2.11-0.10.0.1.tgz -C /export/servers/

#配置环境变量
[root@node01 kafka_2.11-0.10.0.1]# cd /export/servers/kafka_2.11-0.10.0.1/
[root@node01 kafka_2.11-0.10.0.1]# pwd
/export/servers/kafka_2.11-0.10.0.1
[root@node01 kafka_2.11-0.10.0.1]# vim /etc/profile
export KAFKA_HOME=/export/servers/kafka_2.11-0.10.0.1
export PATH=$KAFKA_HOME/bin:$PATH
[root@node01 kafka_2.11-0.10.0.1]# source /etc/profile

#kafka中需要用到zookeeper
1、先将zk启动,如果是在伪分布式下,kafka已经集成了zk
[root@node01 kafka_2.11-0.10.0.1]# nohup bin/zookeeper-server-start.sh /export/servers/kafka_2.11-0.10.0.1/config/zookeeper.properties &
2、启动broker
[root@node01 kafka_2.11-0.10.0.1]# nohup bin/kafka-server-start.sh /export/servers/kafka_2.11-0.10.0.1/config/server.properties &
3、测试
12-20 09:43