Netxmsd and Nxagentd does not auto start Centos7

Started by Smurfy, March 05, 2017, 02:44:02 PM

Previous topic - Next topic

Smurfy

Hi all,

any idea how to make it autostart everytime Server reboots?

I believe have to use systemctl and service file right? how do I do it?

thanks!

Tatjana Dubrovica

Hi you should add init.d scripts to your system. I have attached examples for centOS.

In those file you should set correctly:
$NETXMS_BINDIR
$NETXMS_LIBDIR
$NETXMSD_CONFIG
$NETXMSD_PID_FILE

Malutki_27

or you can use :

file location: /etc/systemd/system/netxms-server.service


[Unit]
Description=NetXMS Monitoring Server

[Service]
Type=forking
ExecStart=/usr/local/bin/netxmsd -d
Wants = mariadb.service

[Install]
WantedBy=multi-user.target


and:

file location: /etc/systemd/system/netxms-agent.service


[Unit]
Description=NetXMS Monitoring Agent

[Service]
Type=forking
ExecStart=/usr/local/bin/nxagentd -d

[Install]
WantedBy=multi-user.target


and after:

systemctl enable netxms-server
systemctl enable netxms-agent
systemctl start netxms-server
systemctl start netxms-agent