Created
March 3, 2016 01:39
-
-
Save dcode/b4afe536e4325125688c to your computer and use it in GitHub Desktop.
Service files for kafka and zookeeper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Kafka distributed logging server | |
| Requires=zookeeper.service | |
| After=zookeeper.service | |
| [Service] | |
| User=kafka | |
| Group=kafka | |
| SyslogIdentifier=kafka | |
| Environment="KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:/opt/kafka/config/log4j.properties" | |
| Environment="KAFKA_HEAP_OPTS=-Xmx1G -Xms1G -Djava.net.preferIPv4Stack=true -Dproc.name=kafka" | |
| Environment="KAFKA_ARGS=-name kafkaServer -loggc" | |
| Environment="KAFKA_PROPS=/opt/kafka/config/server.properties" | |
| EnvironmentFile=-/etc/sysconfig/kafka | |
| ExecStart=/opt/kafka/bin/kafka-run-class.sh kafka.Kafka ${KAFKA_PROPS} | |
| [Install] | |
| WantedBy=multi-user.targetc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Zookeeper distributed coordination server | |
| After=network.target | |
| [Service] | |
| User=zookeeper | |
| Group=zookeeper | |
| SyslogIdentifier=zookeeper | |
| Environment="KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:/opt/kafka/config/log4j.properties" | |
| Environment="KAFKA_HEAP_OPTS=-Xmx512M -Xmx512M -Djava.net.preferIPv4Stack=true -Dproc.name=zookeeper" | |
| Environment="ZOOKEEPER_ARGS=-name zookeeper -loggc" | |
| Environment="ZOOKEEPER_PROPS=/opt/kafka/config/zookeeper.properties" | |
| EnvironmentFile=-/etc/sysconfig/zookeeper | |
| ExecStart=/opt/kafka/bin/kafka-run-class.sh org.apache.zookeeper.server.quorum.QuorumPeerMain ${ZOOKEEPER_PROPS} | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment