Systemd
Install ZincObserve as a system service use systemd.
Create env file
/etc/zincobserve.env
ZO_ROOT_USER_EMAIL = "root@example.com"
ZO_ROOT_USER_PASSWORD = "Complexpass#123"
ZO_DATA_DIR = "/data/zincobserve"
Create systemd service file
/usr/lib/systemd/system/zincobserve.service
[Unit]
Description=The ZincObserve server
After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=simple
LimitNOFILE=65535
EnvironmentFile=/etc/zincobserve.env
ExecStart=/usr/local/bin/zincobserve
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
Tips:
EnvironmentFile
andExecStart
should be the config file and zincobserve binary path.
Enable service
After create env file and service file, you can reload systemed and enable ZincObserve service:
Then, you can use systemctl control ZincObserve as a system service.
Start ZincObserve
Stop ZincObserve
Status of ZincObserve
Test service
You will see: