Create Systemctl

From Gejoreuy
Revision as of 09:53, 16 March 2020 by Gejor (talk | contribs) (Created page with "Create the unit file for zookeeper: sudo nano /etc/systemd/system/zookeeper.service Enter the following unit definition into the file: [Unit] Requires=network.target...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Create the unit file for zookeeper:

 sudo nano /etc/systemd/system/zookeeper.service

Enter the following unit definition into the file:

 [Unit]
 Requires=network.target remote-fs.target
 After=network.target remote-fs.target
 [Service]
 Type=simple
 User=kafka
 ExecStart=/home/kafka/kafka/bin/zookeeper-server-start.sh /home/kafka/kafka/config/zookeeper.properties
 ExecStop=/home/kafka/kafka/bin/zookeeper-server-stop.sh
 Restart=on-abnormal
 [Install]
 WantedBy=multi-user.target