No worries. You do need to copy it to the /etc/init.d
as you mentioned. This will only tell the system how it can start/stop/restart the arcgisserver service. However you still need to tell it you want it to start at boot.
All the major distros now use something called systemD which handles starting up the system, so you have to do two other small things, listed below, to get it to start on boot.
To interact with system you mainly use the systemctl command to tell it what you want to do .
-
The following will tell systemD to start the arcgisserver service.
systemctl start arcgisserver
-
This next command will tell systemD to start it EACH time it boots up.
systemctl enable arcgisserver
So just run both of the above commands. Or just run systemctl enable arcgisserver
, and reboot the machine, and it will start on the next boot.
If you were to run the systemctl commands without copying over the arcgisserver file to an init.d directory (which is where it saves all its initialization scripts.) SystemD would basically say, “ok I hear you want to start and/or enable arcgisserver, but how do I do that?”
Just some background info if you’re interested; if you open up the arcgisserver file it’s just a plain text file (technically a bash script) that basically can be distilled down into 3 functions, start, stop and restart. That way when you tell systemD to start the arcgisserver service, it will
-
Look for an arcgisserver script in its init scripts directory
-
If it finds one, it runs it,
-
calling the function corresponding action (start/stop/restart) from within that script. That’s why we package the script, so you can tell the system how you want to service to actually run.