Manual launch
To manually launch the FlowerDocs GUI and FlowerDocs Core applications, simply issue the following commands:
./flower-docs-gui-webapp-2.8.3.jar
./flower-docs-core-webapp-2.8.3.jar
If the configuration directory is different from the runtime directory, add the parameter --spring.config.additional-location=${FD_HOME}.
Installation in service
Linux
FlowerDocs applications can be installed simply as a Linux service init.d or systemd.
In this section, it is assumed that JAR flower-docs-gui-webapp-2.8.3.jar et flower-docs-core-webapp-2.8.3.jar are placed in the /opt/flowerdocs folder. This folder is also used as a configuration directory.
Service init.d
To install FlowerDocs applications as an init.d service, simply create a symbolic link in the /etc/init.d directory:
chmod +x /opt/flowerdocs/flower-docs-gui-webapp-2.8.3.jar
ln -s /opt/flowerdocs/flower-docs-gui-webapp-2.8.3.jar /etc/init.d/gui
chmod +x /opt/flowerdocs/flower-docs-core-webapp-2.8.3.jar
ln -s /opt/flowerdocs/flower-docs-core-webapp-2.8.3.jar /etc/init.d/core
With this type of service, the user to whom the JAR belongs is used to run the application.
One log file per application is stored in the /var/log directory.
So that the service starts automatically when the system is booted:
update-rc.d gui defaults
update-rc.d core defaults
If the service is not found, it may be necessary to run the following command:
systemctl daemon-reloadService systemd
To install FlowerDocs applications as a systemd service, the gui.service and core.service scripts must be created in the /etc/systemd/system directory such as:
[Unit]
Description=FlowerDocs GUI
After=syslog.target
[Service]
User=flowerdocs
ExecStart=/opt/flowerdocs/flower-docs-gui-webapp-2.8.3.jar
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
[Unit]
Description=FlowerDocs Core
After=syslog.target
[Service]
User=flowerdocs
ExecStart=/opt/flowerdocs/flower-docs-core-webapp-2.8.3.jar
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
To have the service started automatically by systemd, run the following commands:
systemctl enable gui.service
systemctl enable core.service
JVM configuration
To configure the JVM of the application launched by the Linux service, you need to add a configuration file in the same directory as the JAR.
This configuration file must have the same name as the JAR, with the extension conf.
For example, this configuration file allows you to use a configuration directory other than the runtime directory by defining the spring.config.additional-location JVM property:
echo RUN_ARGS=\"--spring.config.additional-location=/var/flowerdocs/conf\" > /opt/flowerdocs/flower-docs-gui-webapp-2.8.3.conf
echo RUN_ARGS=\"--spring.config.additional-location=/var/flowerdocs/conf\" > /opt/flowerdocs/flower-docs-core-webapp-2.8.3.conf
Commands
To start the services, simply issue the commands:
service gui start
service core start
Other standard commands are also supported: status, stop or restart.