vi /usr/lib/systemd/system/zabbix-server.service
[Unit]
Description=Zabbix
After=network.target
[Service]
Environment="CONFFILE=/usr/local/zabbix-4.0.1/etc/zabbix_server.conf"
Type=forking
Restart=on-failure
PIDFile=/tmp/zabbix_server.pid
KillMode=control-group
ExecStart=/usr/local/zabbix-4.0.1/sbin/zabbix_server -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
[Install]
WantedBy=multi-user.target
--------------------------------------------
systemctl enable zabbix-server
------------------------------------