nohup bin/zookeeper-server-start.sh config/zookeeper.properties > zookeeper.log & nohup bin/kafka-server-start.sh config/server.properties > kafka.log & #nginx的配置 在nginx.conf中与http同级上配置如下测试环境配置 server { listen 9092; proxy_pass kafka_backend; } upstream kafka_backend { server 172.20.0.248:9092; } server { listen 2181; proxy_pass zookeeper_backend; } upstream zookeeper_backend { server 172.20.0.248:2181; } } # 配置后外网可以访问的IP为 49.4.2.152:9092 49.4.2.152:2181 最后采用nat来进行配置 49.4.21.141:9092 49.4.21.141:2181 # 启动mirrorMaker 2.0的方式 nohup bin/connect-mirror-maker.sh config/connect-mirror-maker-A-J.properties > connect-mirror-maker.log & # 关闭mirrorMaker 的方式 ps aux | grep connect-mirror-maker 然后kill掉 晋城: export JAVA_HOME=/usr/local/jdk-17.0.15 export JAVA_CLASS=$JAVA_HOME/lib export PATH=$JAVA_HOME/bin:$PATH nohup bin/connect-mirror-maker.sh config/connect-mirror-maker-Prod-JC.properties > connect-mirror-maker.log &