You can run jetty on the same server. Jetty (or Tomcat) is just a java application which can run .war files.
Recent jetty is not available in packages, but it's easy to install by hand:
Unit file:
Recent jetty is not available in packages, but it's easy to install by hand:
Code Select
curl -O https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.17/jetty-home-12.0.17.tar.gz # download latest Jetty12
tar zxf jetty-home-12.0.17.tar.gz -C /opt # unpack it to /opt/
ln -s /opt/jetty-home-12.0.17 /opt/jetty-home-12 # make a symlink without a minor version, so every upgrade you don't have to modify systemd unit
mkdir /opt/netxms-web/ # actual work area for the web
cd /opt/netxms-web/
java -jar /opt/jetty-home-12.0.17/start.jar --add-modules=server,http,ee8-deploy,gzip,http2,https,logging-logback,plus,ssl,work # create default configuration for jetty
vim start.d/ssl.ini # change keyStorePath and keyStorePassword to match your keystrore
curl -o webapps/ROOT.war https://netxms.com/download/releases/5.1/nxmc-5.1.4.war # download war file to webapps/ROOT.war, so app will be available at /
java -jar /opt/jetty-home-12.0.17/start.jar # test that it runs
useradd -r -s /sbin/nologin jetty # create user so we don't run it as root
systemctl edit --full --force netxms-web.service # create service, paste sample from bellow
systemctl enable --now netxms-web.service # enable autostart and start immediately
Unit file:
Code Select
[Unit]
Description=NetXMS WEB UI
StartLimitIntervalSec=0
[Service]
Type=simple
WorkingDirectory=/opt/netxms-web
User=jetty
Group=jetty
ExecStart=java -jar /opt/jetty-home-12/start.jar
Restart=on-failure
RestartSec=30
TimeoutSec=900
[Install]
WantedBy=multi-user.target