User Tools

Site Tools


howto:solaris:install

This is an old revision of the document!


The below procedure installs serviio as a service under SMF in Openindiana v 151a and later.
It will likely work just as well, with possibly minor details changed, on Solaris 11, Nexenta and OpenSolaris b148.
The likeliest change needed is “sudo” instead of “pfexec”, since the latter is a bit specific to OpenSolaris descendants.

First, make sure you have the appropriate supporting SW installed:

ffmpeg 0.9.1 with rtmp-support, librtmp and lame mp3 can all be found in the sfe-encumbered repository at openindiama.org,
http://pkg.openindiana.org/sfe-encumbered/en/index.shtml
from where you can install using the IPS installer, pkg, of your openindiana OI_151a.

Then get the linux tar distro, and extract it under /usr/local/.

Now test it by running it manually:

prompt> cd /usr/local/serviio-0.6.1


prompt> ./bin/serviio.sh&


prompt> ./bin/serviio-console.sh &

Enter the correct address to bind to explicitly on the Status panel, and save.
Add media folder trees in the Library panel, and save.

Check to see that there are discovered renderers listed on the Status panel, and try using serviio from one of those.
Be patient, and fiddle around until it works, at least for a few video files.

When satisfied, right-click on the serviio panel app and choose “exit serviio”, or find the processes (they're Java, and you need to be a bit clever to find them) and send them kill signals, or do “kill %%” twice with a few secs in between, if you're in a csh-like shell.
Make sure serviio is stopped!

Now create a group “serviio” with a group id > 100:

prompt> groupadd -g 103 serviio

and a user “serviio” with home directory /usr/local/serviio-0.6.1/ and a uid > 100, and with the group serviio as it's primary group

prompt> useradd -u 103 -g 103 -d /usr/local/serviio-0.6.1 serviio

On my system, 103 was free in both cases, and one might as well use the same number for both.

Now, make sure the /usr/local/serviio-0.6.1 tree is owned by the group serviio and the user serviio:

prompt> cd /usr/local; chown -R serviio:serviio serviio-0.6.1

Save the xml text found at the end of this page in a file “serviio.xml”, and put it inside the serviio home dir (see above), and do:

prompt> pfexec svccfg validate ~serviio/serviio.xml


prompt> pfexec svccfg import ~serviio/serviio.xml

This creates a new service svc:/application/UPnP-AV/serviio:default, which is the complete fmri handle used by the system to start and stop serviio from now on.

Next enable the service, so that it will start up whenever the machine is booted, and will be restarted if it gets shot down by mistake.

prompt> svcadm enable serviio

and as you can see, you need not use the full fmri, as long as you use enough of the name to make it unique.

---------serviio.xml file contents------------

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
        Created by Manifold
--><service_bundle type="manifest" name="serviio">

    <service name="application/UPnP-AV/serviio" type="service" version="1">

        <create_default_instance enabled="false"/>
        
        <single_instance/>

        <dependency name="network" grouping="require_all" restart_on="error" type="service">
            <service_fmri value="svc:/milestone/network:default"/>
        </dependency>

        <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
            <service_fmri value="svc:/system/filesystem/local"/>
        </dependency>


        
        
        
        
        <method_context>
            <method_credential user="serviio" group="serviio"/>
        </method_context>

        <exec_method type="method" name="start" exec="/usr/local/serviio-0.6.1/bin/serviio.sh" timeout_seconds="60"/>

        <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>

        <property_group name="startd" type="framework">
            <propval name="duration" type="astring" value="child"/>
            
            
            <propval name="ignore_error" type="astring" value="core,signal"/>
        </property_group>

        <property_group name="application" type="application">
            
        </property_group>
        
        
        <stability value="Evolving"/>

        <template>
            <common_name>
                <loctext xml:lang="C">
                    serviio
                </loctext>
            </common_name>
        </template>

    </service>

</service_bundle>
-------end of serviio.xml contents---------------
howto/solaris/install.1326890424.txt.gz · Last modified: 2012/01/18 12:40 by n3mmr