FAQ  •  Register  •  Login

OpenBSD 5.8 Serviio Install - HowTo

<<

Manxmann

Serviio newbie

Posts: 6

Joined: Sun Aug 18, 2013 5:19 pm

Post Wed Dec 16, 2015 5:55 pm

OpenBSD 5.8 Serviio Install - HowTo

Hi Folks,

I'm a long time user, fan and subscriber of Serviio. Due to the excellent nature of the software I've very rarely needed to call on any tech support to get things up and running and when I did found this forum invaluable!

Given this I decided it was time I gave a little back and provide a quick 'How To' for installing Serviio onto an OpenBSD host. OpenBSD being my preference for its clean install, exemplary security record and ease of use. Hopefully anyone who follows this short guide will agree with that last statement.

The install is broken down into three main steps these being:

Install OpenBSD
Install required packages and download Serviio
Modify the Serviio launcher file


Install OpenBSD
-------------------
Ok to business, this is not intended as an OpenBSD 5.8 install guide there are far better sources for this info than I can provide so Google is your friend.

Install required packages and download Serviio
-------------------------------------------------------
Once you have OpenBSD 5.8 or later installed login to either a remote (SSH) or the local console. If you logged on as any other user than ROOT start a new root level session by issuing:

$ sudo -s

At the command prompt. Once we have a root level session we can begin the installation.

First we need to tell the OpenBSD PKG_ADD utility where it can find the pre-built packages to install. To do this we set the PKG_PATH environment variable to the URL where the appropriate packages can be found. (See http://www.openbsd.org/ftp.html for a full list of mirrors).

At the command prompt enter:

# export PKG_PATH=http://mirror.exonetric.net/pub/OpenBSD/5.8/packages/amd64/

In order to run Serviio, OpenBSD needs three core packages to be installed namely JDK-1.8 / FFMPEG / DCRAW. To install these we issue the following commands:

# pkg_add jdk

As of OpenBSD 5.8 there are two versions of the JDK available from the packages repository v1.7 and v1.8 as we will be using v1.5.x of Serviio when prompted choose option 2 to install the v1.8 JDK release.

Ambiguous: choose package for jdk
a 0: <None>
1: jdk-1.7.0.80p0v0
2: jdk-1.8.0.45p0v0
Your choice: 2


Then add FFMPEG using the following command:

# pkg_add ffmpeg

and finally add the DCRAW package using the following command:

# pkg_add dcraw

The system is now ready to run Serviio so lets download the latest release.

First lets add the WGET package in order to download the Linux GZIP from the Serviio website, do this by issuing the following command:

# pkg_add wget

Once installed lets download the Serviio GZIP itself. I like to install Serviio in the /var directory on my server.

# cd /var
# wget http://download.serviio.org/releases/se ... nux.tar.gz


Once the download has completed extract the GZIP to the local directory.

# tar -xvzf serviio-1.5.2-linux.tar.gz

Then rename the newly created directory

# mv serviio-1.5.2 serviio

Remove the old GZIP file

# rm /var/serviio-1.5.2-linux.tar.gz

Modify the Serviio launcher file
-------------------------------------
OpenBSD uses a slightly different layout for system and user binaries and given that the serviio.sh script isn't coded to handle OpenBSD by default the script is unable to find the necessary Java runtime to allow Serviio to launch.

My simple, if inelegant, solution is to edit the serviio.sh script to set the local path where the said Java runtime can be found. Using the vi issue the following command to open the startup script.

# vi /var/serviio/bin/serviio.sh

Once open add the following line directly below the PROGNAME variable declaration.

JAVA_HOME="/usr/local/jdk-1.8.0"

once done the file will look like this:

DIRNAME=`dirname $0`
PROGNAME=`basename $0`
JAVA_HOME="/usr/local/jdk-1.8.0"

One other quirk I discovered running Serviio on OpenBSD is that it can take a LONG time for the server to appear in the list of my DLNA clients (Both SONY/Panasonic TV's and Humax STB). This appears to be due to the beaconing interval default used within the Serviio code. In order to overcome this problem add the following to the JAVA_OPTS string within the serviio.sh script:

-Dserviio.advertisementDuration=60

The new launch command will look as follows:

# Setup Serviio specific properties
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=ffmpeg -Ddcraw.location=dcraw -Dserviio.advertisementDuration=60"

Save the file and exit vi, your Serviio instance is now ready to start. Do this by issuing the following:

# /var/serviio/bin/serviio.sh &

Below is the log output (/var/serviio/log/serviio.log) of Serviio 1.5.2 successfully running on a new OpenBSD install. Unlike a standard Ubuntu install transcoding, including the Flash media browser, works straight out of the box!

2015-12-15 15:36:57,665 INFO [MediaServer] ------------------------------------------------------------------------
2015-12-15 15:36:57,670 INFO [MediaServer] Serviio DLNA media streaming server v 1.5.2 (rev. 4b9ce176daa1)
2015-12-15 15:36:57,670 INFO [MediaServer] Petr Nejedly 2009-2015
2015-12-15 15:36:57,670 INFO [MediaServer] http://www.serviio.org
2015-12-15 15:36:57,671 INFO [MediaServer]
2015-12-15 15:36:57,671 INFO [MediaServer] Java 1.8.0_45-Oracle Corporation amd64
2015-12-15 15:36:57,672 INFO [MediaServer] OS OpenBSD 5.8
2015-12-15 15:36:57,672 INFO [MediaServer] File encoding: US-ASCII
2015-12-15 15:36:57,675 INFO [MediaServer] Headless mode enabled: true
2015-12-15 15:36:57,676 INFO [MediaServer] User: root
2015-12-15 15:36:57,676 INFO [MediaServer] User home dir: /root
2015-12-15 15:36:57,676 INFO [MediaServer] Temp dir: /tmp/
2015-12-15 15:36:57,677 INFO [MediaServer] ------------------------------------------------------------------------
2015-12-15 15:36:58,302 INFO [WebServer] Socket buffer set to 65535 bytes
2015-12-15 15:36:58,305 INFO [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2015-12-15 15:36:58,615 INFO [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2015-12-15 15:36:58,617 INFO [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2015-12-15 15:36:58,682 INFO [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2015-12-15 15:36:58,717 INFO [DatabaseManager] Using DERBY database language
2015-12-15 15:37:01,525 INFO [MediaServer] ------------------------------------------------------------------------
2015-12-15 15:37:01,526 INFO [MediaServer] License: PRO (EVALUATION, id: 11111111-1111-1111-1111-111111111113)
2015-12-15 15:37:01,527 INFO [MediaServer] ------------------------------------------------------------------------
2015-12-15 15:37:01,547 INFO [Device] Created UPnP Device with UUID: f021f470-ae6b-37c6-94c1-1703e9ab0cdc, bound address: 172.16.10.83
2015-12-15 15:37:05,353 INFO [ProfilesDefinitionParser] Parsing Profiles definition
2015-12-15 15:37:05,649 INFO [ProfilesDefinitionParser] Added profile 'Generic DLNA profile' (id=1)
2015-12-15 15:37:05,716 INFO [ProfilesDefinitionParser] Added profile 'Samsung TV (B-series)' (id=2)
2015-12-15 15:37:05,730 INFO [ProfilesDefinitionParser] Added profile 'Xbox 360' (id=3)
2015-12-15 15:37:05,735 INFO [ProfilesDefinitionParser] Added profile 'Playstation 3' (id=4)
2015-12-15 15:37:05,736 INFO [ProfilesDefinitionParser] Added profile 'Samsung TV (A-series)' (id=5)
2015-12-15 15:37:05,744 INFO [ProfilesDefinitionParser] Added profile 'DirecTV HD-DVR' (id=6)
2015-12-15 15:37:05,750 INFO [ProfilesDefinitionParser] Added profile 'Samsung TV / player (H-series)' (id=sam_h)
2015-12-15 15:37:05,754 INFO [ProfilesDefinitionParser] Added profile 'Samsung TV / player (E/F-series)' (id=sam_ef)
2015-12-15 15:37:05,757 INFO [ProfilesDefinitionParser] Added profile 'Samsung TV / player (C/D-series)' (id=7)
2015-12-15 15:37:05,763 INFO [ProfilesDefinitionParser] Added profile 'LG TV / player' (id=8)
2015-12-15 15:37:05,775 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2012)' (id=sony2012)
2015-12-15 15:37:05,791 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2013/14)' (id=sony2013)
2015-12-15 15:37:05,793 INFO [ProfilesDefinitionParser] Added profile 'Sony BDP-Sx100 (2013)' (id=bdp2013)
2015-12-15 15:37:05,796 INFO [ProfilesDefinitionParser] Added profile 'Sony BDP-Sx90 (2012)' (id=bdp2012)
2015-12-15 15:37:05,817 INFO [ProfilesDefinitionParser] Added profile 'Sony BDP-Sx70/SMP-N100 (2010)' (id=bdp2010)
2015-12-15 15:37:05,819 INFO [ProfilesDefinitionParser] Added profile 'Sony BDP-Sx70/SMP-N100 (2010) - US' (id=bdp2010us)
2015-12-15 15:37:05,823 INFO [ProfilesDefinitionParser] Added profile 'Sony BDP-Sx80/SMP-N200 (2011)' (id=bdp2011)
2015-12-15 15:37:05,828 INFO [ProfilesDefinitionParser] Added profile 'Toshiba REGZA' (id=13)
2015-12-15 15:37:05,829 INFO [ProfilesDefinitionParser] Added profile 'Toshiba REGZA 2012-' (id=tosh2012)
2015-12-15 15:37:05,836 INFO [ProfilesDefinitionParser] Added profile 'WDTV Live' (id=14)
2015-12-15 15:37:05,839 INFO [ProfilesDefinitionParser] Added profile 'LaCie LaCinema Media Player' (id=15)
2015-12-15 15:37:05,843 INFO [ProfilesDefinitionParser] Added profile 'Manta WIFI Centre' (id=16)
2015-12-15 15:37:05,844 INFO [ProfilesDefinitionParser] Added profile 'Pure Flow' (id=17)
2015-12-15 15:37:05,851 INFO [ProfilesDefinitionParser] Added profile 'Sharp Aquos' (id=18)
2015-12-15 15:37:05,853 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2011)' (id=sony2011)
2015-12-15 15:37:05,856 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2010)' (id=sony2010)
2015-12-15 15:37:05,868 INFO [ProfilesDefinitionParser] Added profile 'Philips (2010-)' (id=plps2010)
2015-12-15 15:37:05,870 INFO [ProfilesDefinitionParser] Added profile 'Philips (2009)' (id=20)
2015-12-15 15:37:05,873 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2009)' (id=sony2009)
2015-12-15 15:37:05,882 INFO [ProfilesDefinitionParser] Added profile 'Denon AVR' (id=22)
2015-12-15 15:37:05,913 INFO [ProfilesDefinitionParser] Added profile 'Panasonic Viera (2013)' (id=viera2013)
2015-12-15 15:37:05,914 INFO [ProfilesDefinitionParser] Added profile 'Panasonic Viera G/GT/DT/UT/VT (2011/2012)' (id=viera2011a)
2015-12-15 15:37:05,916 INFO [ProfilesDefinitionParser] Added profile 'Panasonic Viera E/S/ST/VT (2011)' (id=viera2011)
2015-12-15 15:37:05,917 INFO [ProfilesDefinitionParser] Added profile 'Panasonic Viera (2010)' (id=viera2010)
2015-12-15 15:37:05,923 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2012) - US' (id=sony2012us)
2015-12-15 15:37:05,924 INFO [ProfilesDefinitionParser] Added profile 'Sony Bravia TV (2011) - US' (id=sony2011us)
2015-12-15 15:37:05,925 INFO [ProfilesDefinitionParser] Added profile 'Sony AVReceiver STR' (id=SonySTR)
2015-12-15 15:37:05,926 INFO [ProfilesDefinitionParser] Added profile 'Sony Audio CMT' (id=SonyCMT)
2015-12-15 15:37:05,938 INFO [ProfilesDefinitionParser] Added profile 'Vizio TV' (id=viziotv)
2015-12-15 15:37:05,951 INFO [ProfilesDefinitionParser] Added profile 'Windows 8/RT' (id=win8metro)
2015-12-15 15:37:05,955 INFO [ProfilesDefinitionParser] Added profile 'Panasonic BD player' (id=panasonicBDT220)
2015-12-15 15:37:05,957 INFO [ProfilesDefinitionParser] Added profile 'Philips NP Streamium' (id=philips_streamium)
2015-12-15 15:37:05,978 INFO [ProfilesDefinitionParser] Added profile 'Chaneru' (id=roku)
2015-12-15 15:37:05,986 INFO [ProfilesDefinitionParser] Added profile 'Roku Media Player' (id=RokuMPApp)
2015-12-15 15:37:05,987 INFO [ProfilesDefinitionParser] Added profile 'Yamaha BD-A1020/BD-A1010' (id=YamBD)
2015-12-15 15:37:06,001 INFO [ProfilesDefinitionParser] Added profile 'Telenet Yelo TV' (id=TNDC)
2015-12-15 15:37:06,002 INFO [ProfilesDefinitionParser] Added profile 'Xbox One' (id=xbox_one)
2015-12-15 15:37:06,005 INFO [ProfilesDefinitionParser] Added profile 'Raumfeld' (id=raumfeld)
2015-12-15 15:37:06,077 INFO [ProfilesDefinitionParser] Parsing Profiles definition
2015-12-15 15:37:06,141 INFO [ProfilesDefinitionParser] Added profile 'Flash player' (id=flv_player)
2015-12-15 15:37:06,143 INFO [ProfilesDefinitionParser] Added profile 'iOS' (id=ios)
2015-12-15 15:37:06,145 INFO [ProfilesDefinitionParser] Added profile 'HTML5' (id=html5)
2015-12-15 15:37:06,148 INFO [ProfilesDefinitionParser] Added profile 'ServiiGo (Standard)' (id=serviigo_standard)
2015-12-15 15:37:06,151 INFO [ProfilesDefinitionParser] Added profile 'ServiiGo (Legacy Devices)' (id=serviigo)
2015-12-15 15:37:06,152 INFO [ProfilesDefinitionParser] Added profile 'ServiiGo (HLS)' (id=serviigo_hls)
2015-12-15 15:37:06,162 INFO [ProfilesDefinitionParser] Added profile 'ServiiGo (Google TV)' (id=serviigo_gtv)
2015-12-15 15:37:06,163 INFO [ProfilesDefinitionParser] Added profile 'Google Cast' (id=googlecast)
2015-12-15 15:37:06,165 INFO [ProfilesDefinitionParser] Added profile 'Chromecast' (id=chromecast)
2015-12-15 15:37:06,166 INFO [ProfilesDefinitionParser] Added profile 'Windows Phone 8' (id=wp8)
2015-12-15 15:37:06,237 INFO [PluginCompilerThread] Looking for plugins at /var/serviio/plugins
2015-12-15 15:37:07,017 INFO [UpdateChecker] Checking if a new version is available
2015-12-15 15:37:06,241 INFO [PluginCompilerThread] Started looking for plugins
2015-12-15 15:37:07,582 INFO [FFMPEGWrapper] Found FFmpeg: ffmpeg version git-N-72901-g15466db Copyright (c) 2000-2015 the FFmpeg developers
2015-12-15 15:37:07,584 WARN [FFMPEGWrapper] FFmpeg is not compiled with librtmp support, RTMP streaming will not work.
2015-12-15 15:37:07,707 INFO [AbstractTranscodingDeliveryEngine] Cleaning transcode engine and its data
2015-12-15 15:37:07,813 INFO [Device] Updated bound IP address of Device with UUID: f021f470-ae6b-37c6-94c1-1703e9ab0cdc, bound address: 172.16.10.83
2015-12-15 15:37:07,813 INFO [WebServer] WebServer starting on port 8895
2015-12-15 15:37:07,976 INFO [EventSubscriptionExpirationChecker] Starting EventSubscriptionExpirationChecker
2015-12-15 15:37:07,986 INFO [DiscoverySSDPMessageListener] Starting DiscoverySSDPMessageListener using interface vio0 (vio0) and address 172.16.10.83, timeout = 0
2015-12-15 15:37:07,992 INFO [EventDispatcher] Starting EventDispatcher
2015-12-15 15:37:08,006 INFO [DiscoveryAdvertisementNotifier] Starting DiscoveryAdvertisementNotifier
2015-12-15 15:37:08,008 INFO [RendererExpirationChecker] Starting RendererExpirationChecker
2015-12-15 15:37:08,011 INFO [RendererSearchSender] Searching for Renderer devices
2015-12-15 15:37:11,576 INFO [ContentDirectoryDefinitionParser] Parsing ContentDirectory definition
2015-12-15 15:37:15,068 INFO [BrowsingCategoriesMessages] Loaded browsing categories message bundle for locale: en
2015-12-15 15:37:34,607 INFO [FeedUpdaterWorker] Started looking for information about online resources
2015-12-15 15:37:34,733 INFO [FileDeltaWatcher] Using 'sun.nio.fs.PollingWatchService' for delta scan
2015-12-15 15:37:34,787 INFO [RepositoriesStatusCoordinator$RepositoriesStatusThread] Started checking repositories status
2015-12-15 15:37:34,800 INFO [LocalLibraryManager] Starting automatic library scan
2015-12-15 15:37:34,803 INFO [LibraryDeltaScanner] Starting the library delta scan
2015-12-15 15:37:34,808 INFO [PlaylistMaintainerWorker] Started looking for playlist changes

Additionally you might want to look at adding a new SERVIIO non privileged user and launching Serviio at boot under his account.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 17, 2015 8:38 am

Re: OpenBSD 5.8 Serviio Install - HowTo

Great... what about adding it to the wiki? There are guides for other Linux / Unix distros there too.

Return to User experiences

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.