[Unit] Description=Highly reliable distributed coordination server After=network.target [Service] Type=simple User=root SyslogIdentifier=zookeeper Environment=ZOOCFGDIR=/etc/zookeeper Environment=ZOO_LOG_DIR=/var/log/zookeeper Environment=JAVA_HOME=/usr/lib/jvm/java-7-openjdk WorkingDirectory=/opt/zookeeper-3.4.5 ExecStart=/opt/zookeeper-3.4.5/bin/zkServer.sh start-foreground ExecStop=/opt/zookeeper-3.4.5/bin/zkServer.sh stop [Install] WantedBy=multi-user.target