zookeeper和kafka安装
目录
一、zookeeper
1st 上传包到待安装位置,解压
2nd 添加配置
3rd 启动
4th 停止
二、kafka
1st 上传包到待安装位置,解压
2nd 启动kafka
3rd 测试验证
4th 停止kafka
一、zookeeper
1st 上传包到待安装位置,解压
最终效果如下
2nd 添加配置
在conf中,创建zoo.cfg.
或者以zoo_sample.cfg为蓝本修改,并重命名为zoo.cfg
zoo.cfg内容如下
# The number of milliseconds of each tick
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=/data/kafka/zookeeper/data
# the port at which the clients will connect
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 auto purge feature
#autopurge.purgeInterval=1
3rd 启动
./bin/zkServer.sh start
4th 停止
./bin/zkServer.sh stop
二、kafka
1st 上传包到待安装位置,解压
最终效果如下
2nd 启动kafka
./bin/kafka-server-start.sh -daemon ./config/server.properties
注意:kafka中zookeeper相关配置是否正确。
3rd 测试验证
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
4th 停止kafka
./kafka-server-stop.sh
还没有评论,来说两句吧...