Skip to content

Update: running SlimServer on Solaris

January 6, 2007

Eric Bautsch has kindly given me permission to post his latest updates for running slimserver on Solaris. He has made a few improvements over my previous scripts, so you might want to use these instead.

Here is a shell script used to build the slimserver distribution:

cd /usr/local
gunzip -c /sw/src/audio/slimserver/SlimServer_v6.5.0.tar.gz | tar xfv -
\
        >> ${LOG} 2>&1
mv SlimServer_v6.5.0 slimserver >> ${LOG} 2>&1
mkdir /usr/local/slimserver/cachedir >> ${LOG} 2>&1
chown -R slimsrv:slimsrv slimserver >> ${LOG} 2>&1
cd slimserver/Bin >> ${LOG} 2>&1
export PATH=${PATH}:/opt/SUNWspro/bin:/usr/sfw/sbin
echo "/usr/bin/perl\n/usr/local/slimserver\n/tmp" | \
        ./build-perl-modules.pl >> ${LOG} 2>&1
cd /tmp/XML-Parser* >> ${LOG} 2>&1
perl Makefile.PL EXPATLIBPATH=/usr/sfw/lib
EXPATINCPATH=/usr/sfw/include \
        >> ${LOG} 2>&1
cd /usr/local/slimserver/Bin >> ${LOG} 2>&1
echo "/usr/bin/perl\n/usr/local/slimserver\n/tmp" | \
        ./build-perl-modules.pl >> ${LOG} 2>&1
cp -p /sw/src/audio/slimserver/my.tt /usr/local/slimserver/MySQL
>> ${LOG} 2>&1
cp -p /sw/src/audio/slimserver/slimrun /usr/local/slimserver >>
${LOG} 2>&1

svccfg import /sw/src/audio/slimserver/slimserver_manifest >>
${LOG} 2>&1
svcadm enable slimserver >> ${LOG} 2>&1

Note: The above double call of the build-perl-modules.pl with the manual
build of XML-Parser was neccessary because XML parser requires expat
but appears to be unable to pick up that it’s in /usr/sfw, despite set
PATH and LD_LIBRARY_PATH.

my.tt is simply modifed in that mysql provided in /usr/sfw does not
like innodb, default-character-set and default-collation, so I have
hashed these out.

slimrun is attached and simply sets the PATH to find mysqld prior to
calling slimserver.

Here is the slimrun script:

#!/bin/sh

PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/i86pc/sbin:/usr/sfw/bin:/usr/sfw/sbin
export PATH

exec /usr/local/slimserver/slimserver.pl –cachedir=/usr/local/slimserver/cachedir –user=slimsrv –group=slimsrv –audiodir=/apps/jukebox/NEW/xmcd –prefsfile=/usr/local/slimserver/cachedir/slimserver.pref –pidfile=/usr/local/slimserver/cachedir/slimserver.pid $*

Here is the updated manifest

<?xml version=”1.0″?>
<!DOCTYPE service_bundle SYSTEM “/usr/share/lib/xml/dtd/service_bundle.dtd.1”>
<service_bundle type=’manifest’ name=’slimserver’>
  <service name=’application/slimserver’ type=’service’ version=’1′>
        <create_default_instance enabled=’false’/>
        <single_instance/>
<dependency name=’name-services’ grouping=’require_all’ restart_on=’none’ type=’service’>
<service_fmri value=’svc:/milestone/name-services’ />
</dependency>
<dependency name=’network’ grouping=’require_all’ restart_on=’none’ type=’service’>
<service_fmri value=’svc:/milestone/network’ />
</dependency>
<dependency name=’local-filesystems’ grouping=’require_all’ type=’service’ restart_on=’none’>
<service_fmri value=’svc:/system/filesystem/local’ />
</dependency>
        <exec_method type=’method’ name=’start’
                exec=’/usr/local/slimserver/slimrun –daemon’
                timeout_seconds=’30’ />
        <exec_method type=’method’ name=’stop’
         exec=’:kill’
                timeout_seconds=’30’ />
        <stability value=’Unstable’ />
        <template>
               <common_name>
                        <loctext xml:lang=’C’>Slim Server</loctext>
                </common_name>
                <documentation>
                        <doc_link name=’SlimDevices Home’ uri=’http://www.slimdevices.com/’/&gt;
                </documentation>
        </template>
  </service>
</service_bundle>

powered by performancing firefox

Advertisements

Comments are closed.

%d bloggers like this: