MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1,342 bytes added ,  13 February 2022
m
→‎Installing/Configuring the MX service and the -service parameter: Remove obsolete text applying to early MX releases
m (→‎Installing/Configuring the MX service and the -service parameter: Remove obsolete text applying to early MX releases)
You don't use this parameter in a terminal or interactive instruction for running MX. Instead it appears within a file that we use to set up for running MX as a service.
====All users - mandatory edit of service file====
For recent releases, (see [https://cumulus.hosiene.co.uk/viewtopic.php?p=146473#p146473 original release announcement]):
#There is a task to do just once to configure the service
 
There are some edits needed to that section:
# Technical users might want to edit the '''User=root''' line so that the service will run as a different user, novice users are best to leave this alone
# Everyone must edit the line that begins with '''ExecStart='''
#* The mandatory change is to replace '''/home/install''' by what you have selected for EXISTING PATH
#* An optional change is to add additional parameters after the '''-service''' (select from '''-debug''', -locale, -port) as described in sub-sections above
 
====Technical users - optional edits====
 
Novice users are advised to skip this sub-section.
 
In the ''[Service]'' section of same file:
# Technical users might want to edit the '''User=root''' line so that the service will run as a different user, novicejust userschange arethe bestname tothat leaveappears thisafter alonethe "=" sign.
 
In the '''[Unit]''' section of same file:
* Depending on which release of MX you are using, you may, or may not, have a line saying <code>After=network-online.target</code>
* Technical users may wish to edit this line into <code>After=network-online.target local-fs.target time-sync.target</code>
*# The '''network-online.target''' specifies that the ''cumulusmx'' service will only start '''After''' the network service has started, i.e. there is a connection by LAN or Wireless to the internet.
*# The '''local-fs.target''' specifies that the ''cumulusmx'' service will only start '''After''' the file service has started, i.e. your computer can read files
*# The '''time-sync.target''' specifies that the ''cumulusmx'' service will only start '''After''' the computer has synced with either a real-time clock chip, or the time found on the internet, i.e. will ensure that Cumulus obtains the correct time from the computer to control all its actions
 
====Completing the service file edit====
 
Regardless of whether you simply edited the path in the ''[Service]'' section, or you have also done some more technical edits:
# Next save file with a new name '''cumulusmx_edited.service''' (using a new name stops it being overwritten when we upgrade MX
# Now copy file to where it is needed to run the service <code>sudo cp EXISTING_PATH/CumulusMX/MXutils/linux/cumulusmx_edited.service /etc/systemd/system/cumulusmx.service</code>
# Finally, '''optionally''', create a symbolic link to that file using <code>sudo systemctl enable cumulusmx</code> if you want the service to start after a reboot
 
If Cumulus MX is already running as a service, then the service is already defined, and to pick up the new definition:
* Either reboot the computer
* Or type <code>sudo systemctl daemon-reload</code>
 
====Commands to start, stop, or restart (stop and start in one command) MX as a service===
 
You will need to start (or restart) MX after you have defined (or redefined) the service as instructed above.
====Setting up as a service in release 3.8.0 ====
 
* sudo systemctl start cumulusmx
The previous section covered how to set up a service in all recent releases, but if you are still using the [https://cumulus.hosiene.co.uk/viewtopic.php?p=145048#p145048 3.8.0 release] then different instructions were supplied:
* sudo systemctl stop cumulusmx
# Ensure you are in the folder containing CumulusMX.exe
* sudo systemctl restart cumulusmx
# Type <code> mono-service -l:/var/run/cmx.pid CumulusMX.exe -service</code>
# (to verify) note this does not allow you to add -port, -debug, -locale parameters
 
=== -debug parameter for adding debugging ===
5,838

edits

Navigation menu