December 10, 2006

slimserver battle

so i spent most this weekend struggling to upgrade the slimserver software on my home server. i'm running solaris nevada and of course it doesn't have all the little perl extras and super recent versions of mysql that this software wants. also, to complicate the process, i don't want to install this software as root (the way it expect to be installed) so that it can go around and upgrade/overwrite random components of my system that will then break the next time i upgrade. so i spent quite a while figuring out how to install this bugger into it's own directory and user account.

so here's the gorry details about how i finally got this working:


- run the following commands as root:
---8<---
zfs create export/home/slimserv_v6.5.0
cd /export/home
ln -s slimserv_v6.5.0 slimserv
groupadd slimserv
useradd -d /export/home/slimserv -g slimserv slimserv
chown slimserv:slimserv slimserv_v6.5.0
mkdir /export/home/slimserv/playlists
chown slimserv:slimserv /export/home/slimserv/playlists
su - slimserv
exec zsh
. /export/home/edp/.envrc
gtar -xzf $EDPHOME/install/archive/common/SlimServer_v6.5.0.tar.gz
mv SlimServer_v6.5.0/* .
rmdir SlimServer_v6.5.0
mkdir -p XML-Parser-2.34/Expat/hints
cat > XML-Parser-2.34/Expat/hints/solaris.pl <<-EOF
\$self->{INC} = '-I/usr/sfw/include';
\$self->{LDDLFLAGS} = '-G -L/usr/sfw/lib -R/usr/sfw/lib';
EOF
cat > slimserver.sh <<-EOF
#!/bin/sh
PATH=/usr/bin:\$HOME/mysql/bin
export PATH
exec ./slimserver.pl "\$@"
EOF
---8<---

- modify Bin/build-perl-modules.pl
---8<---
+ 'XML-Parser-2.34' => {
+ 'Makefile.PL' => join(' ', qw(
+ EXPATLIBPATH=/usr/sfw/lib
+ EXPATINCPATH=/usr/sfw/include
+ )),
+ },
+
'DBD-mysql-3.0002' => {
...
! for my $cmd (qw(curl wget)) {
--- 142,144 ----
! for my $cmd (qw(wget)) {
---8<---

- as the slimserv user run the following commands:
---8<---
./Bin/build-perl-modules.pl
mysql=mysql-standard-5.0.27-solaris10-i386.tar.gz
gtar -xzf $EDPHOME/install/archive/i386/$mysql
ln -s mysql-standard-5.0.27-solaris10-i386 mysql
mv ./MySQL/errmsg.sys ./MySQL/errmsg.sys.original
cp -p ./mysql/share/mysql/english/errmsg.sys ./MySQL/errmsg.sys
---8<---

- as root create /var/svc/manifest/site/slimserver.xml and then import
it and enable the new slimserver service:
---8<---
svccfg import /var/svc/manifest/site/slimserver.xml
svcadm enable svc:/network/slimserver:default
---8<---

- configure the playlist directory in the slimserver by going to the
slimserver web page and then selecing:
Home -> Server Settings -> Basic Settings
and setting: PLAYLISTS FOLDER to /export/home/slimserv/playlists


No comments:

Post a Comment