Skip to content

RedHat and Oracle Linux issues

OpenKM not starting as a service automatically

Section titled “OpenKM not starting as a service automatically”

If in your OS the OpenKM service does not start automatically, this may be because the security system (SELinux) blocks services that are not recognized as native.

To enable it, we must perform the following steps:

  • Create the openkm.service file at the path (/etc/systemd/system).
Terminal window
$ nano /etc/systemd/system/openkm.service
[Unit]
Description=OpenKM - https://www.openkm.com/
After=network.target
[Service]
Type=forking
User=openkm
WorkingDirectory=/home/openkm/tomcat
ExecStart=/bin/bash /home/openkm/tomcat/bin/startup.sh
ExecStop=/bin/bash /home/openkm/tomcat/bin/shutdown.sh
[Install]
WantedBy=multi-user.target

* ExecStart contains a sample value; the correct path is the location of the startup.sh file.

  • Refresh, enable the service, and activate the service.
Terminal window
$ systemctl daemon-reload
$ systemctl enable openkm.service
$ systemctl start openkm.service

With the following command, we can check the status of the service:

Terminal window
$ systemctl status openkm.service

  • Modify the SELinux configuration file:
Terminal window
$ nano /etc/sysconfig/selinux

  • Finally, restart the server
Terminal window
$ reboot

If your OS does not come with the ImageMagick package in the repositories, you can install a fork called GraphicsMagick from the EPEL repository:

Terminal window
$ dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -y
$ dnf install GraphicsMagick

Keep in mind that there is no “convert” utility, but a general “gm” executable that can be used this way:

Terminal window
$ gm convert <params>

More info at GraphicsMagick convert documentation.