jmx端口主要用来监控kafka集群的. 在启动kafka的脚本kafka-server-start.sh中找到堆设置,添加export JMX_PORT="9999" if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G" export JMX_PORT=" fi 或者在启动脚本中添加如下: #!/bin/sh JM
前置: 文件host 192.168.11.13 192.168.11.14 192.168.11.30 脚本init_kafka.sh #!/bin/bash source /etc/profile if [ `whoami` != "root" ];then echo " only root can run me" exit 1 fi basepath=$(cd `dirname $0`; pwd) cd $basepath for host in `cat $