For Debian based Linux distros (e.g Ubuntu / Raspbian)
Log onto your server
First, let’s make sure the server has java installed
java -versionThe version need to be at least java 21
Does it say “-bash: java: command not found“?
sudo apt-get install openjdk-21-jre-headlessThis 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
which daemonIf the output gives you a location (like /usr/bin/daemon), then you are good.
Otherwise do:
sudo apt-get install daemonTo allow monitee agent monitor temperature of disks, we need smartmontools
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
wget https://github.com/Krillsson/sys-API/releases/download/x.x.x/sysapi_x.x.x.debThen we need to install it using apt. Making sure we use the ./ syntax so apt knows its a file and not a package
sudo apt install ./sysapi_x.x.x.debUse your favorite text editor to edit the user & password of the config
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
systemctl start sys-apiWe can also check its status
systemctl status sys-apiAnd using journalctl we can read the log output
journalctl -u sys-api.serviceWhen you see the following, we know that the server is up and running:
[...]: 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
