The following are a record of how i installed a Squeezebox (slimserver software) under Gentoo Linux.
Download the slimserver source tarball somewhere and then "su -
" and:
- Unpack the source tarball into
/usr/local
,
and rename it so you have a directory /usr/local/slimserver
- Change into the
/usr/local/slimserver/Bin
directory and run "./build-perl-modules.pl
"
- Copy the startup script on this page and put it in
/etc/init.d
- Copy the conf.d script on this page and put it in
/etc/conf.d
.
Edit it and delete the "--d_scan
" option (it generates too many messages for me)
- Make a user slim and a group slimserver.
- Make a directory
/var/log/slimserver
and make it owned by slim:slimserver
("chown slim:slimserver /var/log/slimserver
").
Touch the file /var/log/slimserver/messages
(and fix the ownership).
- Make a directory
/var/cache/slimserver
. Make it owned by slim:slimserver.
- Make a directory
/var/run/slimserver
. Make it owned by slim:slimserver.
- Touch the file
/etc/slimserver.pref
and change the ownership to slim:slimserver
- Test the startup script, "
/etc/init.d/slimserver start
" Check that your server runs. Note that you may need to
use http://yourhostname:9000 or http://127.0.0.1:9000.
- If everything is ok add it to startup: "
rc-update add slimserver default
"
Upgrading is similar:
- Stop the current server: "
/etc/init.d/slimserver stop
"
- Move the directory
/usr/local/slimserver
to /usr/local/slimserver.old
as a backup
- Unpack the source tarball into
/usr/local
and
move or link it so you have a directory /usr/local/slimserver
- Change into the
/usr/local/slimserver/Bin
directory and run ./build-perl-modules.pl
- Restart the server, "
/etc/init.d/slimserver start
" Check that your server runs as above.
- Once you're certain it works delete the backup
/usr/local/slimserver.old
FAQ
- Why does running
/etc/init.d/slimserver stop
produce a message "Failed to stop Slimserver"?
Your slimserver is not creating the
/var/run/slimserver.pid
file when it is started. This
results in the call to stop the daemon failing, because start-stop-daemon
doesn't find
the expected pidfile, and subsequent calls to restart the server failing since
the file used to indicate which init.d processes are running wasn't deleted.
If you're in that situation you can easily fix it and get to a cleanly stopped
slimserver state by (as root of course):
- kill the actual slimserver process, if it's really still running:
killall -QUIT slimserver.pl
- clean up the init.d state:
rm /var/lib/init.d/started/slimserver
- Any permanent solutions to the above problem?
The steps above create a /var/run/slimserver
directory so it can be owned by the slimserver
process, and thus it will not encounter permission problems trying to create the pidfile.
The solution is thus to do exactly that, or change the pidfile definition in the /etc/init.d/slimserver
file to use a directory the slimserver can write to.