NetXMS Support Forum

English Support => General Support => Topic started by: Smurfy on March 05, 2017, 02:44:02 PM

Title: Netxmsd and Nxagentd does not auto start Centos7
Post by: Smurfy on March 05, 2017, 02:44:02 PM
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!
Title: Re: Netxmsd and Nxagentd does not auto start Centos7
Post by: Tatjana Dubrovica on March 06, 2017, 07:12:28 PM
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
Title: Re: Netxmsd and Nxagentd does not auto start Centos7
Post by: Malutki_27 on May 30, 2017, 12:53:02 AM
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