Difference between revisions of "Create Systemctl"

From Gejoreuy
Jump to navigation Jump to search
(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...")
(No difference)

Revision as of 09:53, 16 March 2020

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