Configuring FME Server as a System Service (Linux)
You can configure FME Server as a system service that starts when you start your system. You should do this only if you have set up system services before and understand the different run levels on your system.
WARNING: Configuring scripts to run at start-up on Linux is an advanced task. The steps for doing so vary, depending on your configuration. Use the steps listed in this section as a guide only.
FME Server is composed of a series of components, and each component has its own scripts. Both systemd and SysV scripts are provided.
The following FME Server systemd startup scripts are provided upon installation:
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-appserver.service
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-cleanup.service
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-core.service
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-database.service
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-engines.service
- /fme/enterprise/Resources/Server/startup/systemd/fmeserver-websocket.service
You must copy these scripts and place them in the following directory, depending on your privilege level:
- root privilege: /etc/systemd/system/
- user-level privilege (no system administration rights): /usr/lib/systemd/system/
To enable startup scripts to run at system boot time
Run the following command for each script:
systemctl enable *.service
For example:
systemctl enable fmeserver-core.service
To disable startup scripts from running at system boot time
Run the following command for each script:
systemctl disable *.service
For example:
systemctl disable fmeserver-core.service
To start services manually
Run the following command for each script:
systemctl start *.service
For example:
systemctl start fmeserver-core.service
To stop services manually
Run the following command for each script:
systemctl stop *.service
For example:
systemctl stop fmeserver-core.service
Make a copy of the FME Server startup scripts:
- <FMEServerDir>/Server/startup/FMEServerAppServer
- <FMEServerDir>/Server/startup/FMEServerCleanup
- <FMEServerDir>/Server/startup/FMEServerCore
- <FMEServerDir>/Server/startup/FMEServerDatabase
- <FMEServerDir>/Server/startup/FMEServerEngines
- <FMEServerDir>/Server/startup/FMEServerWebSocket
placing the scripts here:
- /etc/init.d/FMEServerAppServer
- /etc/init.d/FMEServerCleanup
- /etc/init.d/FMEServerCore
- /etc/init.d/FMEServerDatabase
- /etc/init.d/FMEServerEngines
- /etc/init.d/FMEServerWebSocket
Create links from the scripts you just copied to a script in the correct run level, depending on your distribution and configuration.
For Debian, this is typically 2 (rc2.d), and for Red Hat and Fedora, this is typically 5 (rc5.d). If you are unsure what run level you should use, we recommend that you contact your system administrator before proceeding.
If you are on a Debian based distribution such as Ubuntu, run the following commands:
update-rc.d FMEServerAppServer start 99 2 . stop 99 6 .
update-rc.d FMEServerCleanup start 99 2 . stop 99 6 .
update-rc.d FMEServerCore start 99 2 . stop 98 6 .
update-rc.d FMEServerDatabase start 98 2 . stop 99 6 .
update-rc.d FMEServerEngines start 99 2 . stop 98 6 .
update-rc.d FMEServerWebSocket start 99 2 . stop 99 6 .
On Red Hat, use the chkconfig command. This automatically adds them to runlevel 3. If you need to use a different run level, modify the chkconfig header of these scripts, or manually:
chkconfig --add FMEServerAppServer
chkconfig --add FMEServerCleanup
chkconfig --add FMEServerCore
chkconfig --add FMEServerDatabase
chkconfig --add FMEServerEngines
chkconfig --add FMEServerWebSocket
On other distributions, or to manually set up the startup scripts, create the proper links in the appropriate run level directory.
The following steps use a run level of 2.
- Create the Web Application Server startup link:
- Create the FME Server Core startup link:
- Create the Database Server startup link:
- Create the FME Server Engines startup link:
- Create the FME Server Cleanup service link:
- Create the FME Server WebSocket service link:
- Create the Web Application Server shutdown link:
- Create the FME Server Cleanup service shutdown link:
- Create the FME Server Core shutdown link:
- Create the Database Server shutdown link:
- Create the FME Server Engines shutdown link:
- Create the FME Server WebSocket service shutdown link:
sudo ln -s /etc/init.d/FMEServerAppServer /etc/rc2.d/S99fmeserverappserver
sudo ln -s /etc/init.d/FMEServerCore /etc/rc2.d/S99fmeservercore
sudo ln -s /etc/init.d/FMEServerDatabase /etc/rc2.d/S98fmeserverdatabase
Note: It is important that this is S98, not S99.
sudo ln -s /etc/init.d/FMEServerEngines /etc/rc2.d/S99fmeserverengines
sudo ln -s /etc/init.d/FMEServerCleanup /etc/rc2.d/S99fmeservercleanup
sudo ln -s /etc/init.d/FMEServerWebSocket /etc/rc2.d/S99fmeserverwebsocket
sudo ln -s /etc/init.d/FMEServerAppServer /etc/rc6.d/K99fmeserverappserver
sudo ln -s /etc/init.d/FMEServerCleanup /etc/rc6.d/K98fmeservercleanup
Note: It is important to specify K98, not K99.
sudo ln -s /etc/init.d/FMEServerCore /etc/rc6.d/K98fmeservercore
Note: It is important to specify K98, not K99.
sudo ln -s /etc/init.d/FMEServerDatabase /etc/rc6.d/K99fmeserverdatabase
sudo ln -s /etc/init.d/FMEServerEngines /etc/rc6.d/K98fmeserverengines
Note: It is important to specify K98, not K99.
sudo ln -s /etc/init.d/FMEServerWebSocket /etc/rc6.d/K98fmeserverwebsocket
Note: It is important to specify K98, not K99.