For Debian based Linux distros (e.g Ubuntu / Raspbian)

Log onto your server

First, let’s make sure the server has java installed

Bash
java -version

The version need to be at least java 21

Does it say “-bash: java: command not found“?

Bash
sudo apt-get install openjdk-21-jre-headless

This will install openjdk version 21. But there are lots of alternatives available. SDKMAN is a great tool to install and manage java versions.

Now that we have java, let’s continue

Let’s also check if we have the deamon package installed

Bash
which daemon

If the output gives you a location (like /usr/bin/daemon), then you are good.

Otherwise do:

Bash
sudo apt-get install daemon

To allow monitee agent monitor temperature of disks, we need smartmontools

Bash
sudo apt-get install smartmontools 

Then go to GitHub in a browser to find latest release download

Copy the URL of the file sysapi_x.x.x.deb

Then you can download that on your server

Remember to change x.x.x to the actual version when copy pasting

Bash
wget https://github.com/Krillsson/sys-API/releases/download/x.x.x/sysapi_x.x.x.deb

Then we need to install it using apt. Making sure we use the ./ syntax so apt knows its a file and not a package

Bash
sudo apt install ./sysapi_x.x.x.deb

Use your favorite text editor to edit the user & password of the config

Bash
nano opt/sys-api/config/configuration.yml

Then press CTRL+X to exit nano (and press Y to save)

If you need to change the default application ports 8080 and 8443, you can do so in the /opt/sys-api/config/application.properties file

Now we can start sys-api using systemctl

Bash
systemctl start sys-api

We can also check its status

Bash
systemctl status sys-api

And using journalctl we can read the log output

Bash
journalctl -u sys-api.service

When you see the following, we know that the server is up and running:

Bash
[...]: Tomcat started on ports 8443 (https), 8080 (http) with context path '/'
[...]: Started SysAPIApplicationKt in 6.352 seconds (process running for 7.234)                                               

Now you are ready to proceed to next step