Difference between revisions of "Create Systemctl"
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...") |
|||
Line 4: | Line 4: | ||
Enter the following unit definition into the file: | Enter the following unit definition into the file: | ||
− | + | <pre> | |
[Unit] | [Unit] | ||
Requires=network.target remote-fs.target | Requires=network.target remote-fs.target | ||
Line 18: | Line 18: | ||
[Install] | [Install] | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
+ | </pre> |
Revision as of 09:54, 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