安装配置Java
[root@linux124 ~]
[root@linux124 ~]
##/etc/profile
##java_home
export JAVA_HOME=/usr/java/jdk1.8.0_261-amd64
export PATH=$PATH:$JAVA_HOME/bin
[root@linux124 ~]
[root@linux124 ~]
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
安装配置zookeeper
1、安装
[root@linux124 ~]
[root@linux124 ~]
[root@linux124 conf]
[root@linux124 conf]
##zoo.cfg
dataDir=/var/lagou/zookeeper/data
[root@linux124 conf]
##/etc/profile
##zookeeper_home
export ZOOKEEPER_PREFIX=/opt/zookeeper-3.4.14
export PATH=$PATH:$ZOOKEEPER_PREFIX/bin
export ZOO_LOG_DIR=/var/lagou/zookeeper/log
[root@linux124 conf]
[root@linux124 conf]
/usr/bin/which: no zookeeper in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/java/jdk1.8.0_261-amd64/bin:/opt/zookeeper-3.4.14/bin:/opt/kafka_2.12-1.0.2/bin:/root/bin)
3、安装配置Kafka
[root@linux124 ~]
[root@linux124 ~]
##/etc/profile
##kafka_home
export KAFKA_HOME=/opt/kafka_2.12-1.0.2
export PATH=$PATH:$KAFKA_HOME/bin
[root@linux124 ~]
[root@linux124 config]
##server.properties
zookeeper.connect=linux124:2181/myKafka
log.dir=/var/lagou/kafka/kafka-logs
[root@linux124 config]
4、启动zookeeper,kafka
[root@linux124 ~]
[root@linux124 ~]
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4.14/bin/../conf/zoo.cfg
Mode: standalone
[root@linux124 ~]
[root@linux124 ~]
9954 Kafka
9676 QuorumPeerMain
48493 Jps
|