This guide assumes you have installed Debian 8 (Jessie) and need a new Serviio install.
The new Serviio 1.9 requires Java 8. The old Serviio 1.4 required Java 7
Update: If you are interested in installing the newest version than go to http://serviio.org/download to see which is the newest version at the time. As of Nov 27, 2017 the newest version is Serviio 1.9
Debian 8 (Jessie) adds back ffmpeg, so there is no need for an extra PPA. Install required software if not already installed:
sudo apt-get install ffmpeg
sudo apt-get install dcraw
Install Java 8. You can tell which, if any, versions are installed via:
dpkg --get-selections | grep jre
You may see openjdk-7-jre. If you see both openjdk-7-jre and openjdk-8-jre, check which is the default version via:
java -version
If openjdk-8-jre is installed and "java -version" yields "1.9.0_xx", you are done. If Java is not installed or only Java 7, run:
sudo apt-get install openjdk-8-jre
If you get an error like this:
The following packages have unmet dependencies:
openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
do not despair, this command will help you:
apt install -t jessie-backports openjdk-8-jre-headless ca-certificates-java
After that, try run the previous command again.
If both Java 7 and 8 are installed, you may have to adjust the default via update-java-alternatives or edit scripts to specify the full path, e.g., /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java.
There are various ways to install Serviio, but this installs it in /opt and runs it as user serviio. The useradd option -r creates a system account and does not create a home directory. This will result in warnings in serviio.log, but there seems to be no ill effect. The first line logs in as root to make a few things easier:
sudo -H bash
useradd -r -s /bin/false serviio
mkdir -p /opt
cd /opt
wget http://download.serviio.org/releases/serviio-1.9-linux.tar.gz
tar zxvf serviio-1.9-linux.tar.gz
rm serviio-1.9-linux.tar.gz
ln -s serviio-1.9 serviio
chown -R root:root serviio-1.9
cd serviio-1.9
mkdir log
chown -R serviio:serviio library log
Use your favorite text editor and create /lib/systemd/system/serviio.service with:
[Unit]
Description=Serviio Media Server
After=syslog.target local-fs.target network.target
[Service]
Type=simple
User=serviio
Group=serviio
ExecStart=/opt/serviio/bin/serviio.sh
ExecStop=/opt/serviio/bin/serviio.sh -stop
KillMode=none
Restart=on-abort
[Install]
WantedBy=multi-user.target
Lastly, start serviio and have it run automatically at boot via:
systemctl daemon-reload
systemctl enable serviio
systemctl start serviio
Now, launch the configuration console by typing the following into the Terminal
sudo /opt/serviio-1.9/bin/serviio-console.sh