系统相关
首页 > 系统相关> > Centos6.8 Kafka 启动脚本

Centos6.8 Kafka 启动脚本

作者:互联网

1、vim /etc/init.d/kafka

#!/bin/bash
export JAVA_HOME=/opt/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH 

#chkconfig:2345 20 90
#description:kafka
#processname:kafka
case $1 in
          start) 
              /opt/kafka_2.10-0.10.2.0/bin/kafka-server-start.sh -daemon /opt/kafka_2.10-0.10.2.0/config/server.properties
              ;;
          stop)
               /opt/kafka_2.10-0.10.2.0/bin/kafka-server-stop.sh
              ;;
          status)
              jps
              ;;
          restart)
              /opt/kafka_2.10-0.10.2.0/bin/kafka-server-stop.sh
              /opt/kafka_2.10-0.10.2.0/bin/kafka-server-start.sh -daemon /opt/kafka_2.10-0.10.2.0/config/server.properties
              ;;
          *)
              echo "require start|stop|status|restart"
              ;;
esac

 

标签:脚本,opt,0.10,kafka,Centos6.8,bin,2.10,2.0,Kafka
来源: https://blog.51cto.com/u_11868971/2997931