Author Topic: Using your Microserver as a Squeezebox Music Server (Ubuntu)  (Read 6852 times)

Offline Rotten Johnny

Initial preparation
First off let me state that if you want to get the best performance out of Logitechmediaserver you should install *nix as an OS.  LMS runs a hell of a lot faster under *nix than it does under any flavour of Windows I've ever tried it on - this is especially the case where library scans are concerned.  This guide speaks to an Ubuntu installation.

Installing Ubuntu Server to a memory stick using a 2nd memory stick
Secondly, let me cover some stuff that had me pulling out what little hair I have on Friday night - installing Ubuntu from a memory stick to another memory stick on the Microserver (harder than it should be because the Microserver is idiosyncratic). To do this, remove/ disconnect all hard drives and USB devices (other than the USB stick you want to install from) from the Microserver, fire it up and make sure the BIOS is set to boot from the USB you have inserted.  Save and exit the BIOS settings and let the Microserver start firing up the Ubuntu live session...whilst this is happening, insert the USB you want to install to into the motherboard USB header - it'll be visible to the Ubuntu live session and it'll be the only installation candidate available to you.  Once you've gotten to this point follow Gert's instructions here: Setting up a NAS using Ubuntu Server.  If you don't want to set up a raid array just skip that part of the instructions.

Before going on to the next part of these instructions make sure you've shut down the Microserver, added all the hard drives you want to use and reboot it. At this juncture I'm assuming you've a fully functional Ubuntu Server setup on your Microserver (which boots off a memory stick) and that you've mounted and can write to your hard drive(s).  If you're booting from a hard drive then most of what follows is irrelevant to you.

Caveat - Ubuntu Server 12.04
If you're installing Ubuntu Server 12.04 you may find that LMS doesn't start up (as I did).  Do this before attempting to install LMS:
Code: [Select]
sudo apt-get install libgd-gd2-perl
Installing LMS
First off you need to add the LMS repositories to Ubuntu server.  In a terminal window enter the following:
Code: [Select]
sudo nano /etc/apt/sources.listfollowed by your user password when prompted.  Now add one of the following lines to the bottom of the file (stable is an official release, testing implies testing releases):
Code: [Select]
# Squeezebox
deb stable main
Code: [Select]
# Squeezebox
deb testing main
Save your changes and exit.

Now type the following in the terminal window:
Code: [Select]
sudo apt-get update && sudo apt-get install logitechmediaserver
It may take a while for LMS to be downloaded and installed.

When the install is completed LMS will automatically be started.  This represents a problem if you're running the OS on a memory stick because LMS is going to build its database on the memory stick (not a good idea from a performance perspective, if you have a large collection, or make changes to tags on a regular basis).

To have LMS write its database to an alternative location on a hard drive stop LMS, move its data files to the location of your choice and create a symbolic link to the new destination using the following:
Code: [Select]
sudo service logitechmediaserver stop
Move the contents of /var/lib/squeezeboxserver/cache to the drive and folder in which you wish to house LMS' database.  I find it easiest to do this using Midnight Commander

Now remove the folder /var/lib/squeezeboxserver/cache and replace it with a symbolic link to the folder you moved the contents to.
Code: [Select]
sudo rm -R /var/lib/squeezeboxserver/cache && sudo ln -s /path/to/target/dir /var/lib/squeezeboxserver/cache
Change ownership of the symbolic link to your target directory from the "root" user to the "squeezeboxserver" user:
Code: [Select]
sudo chown -R squeezeboxserver:nogroup /var/lib/squeezeboxserver/cache
Finally restart LMS
Code: [Select]
sudo service logitechmediaserver start
That's it, now you can go ahead and configure LMS and scan your library (I suggest that the first thing you do is tell LMS that your library and playlists are located in /tmp whilst you're configuring LMS - this avoids it triggering a scan of your library until you've set it up to run the way you like - the last step should be pointing it to your actual library for the real scan to initiate).
« Last Edit: June 02, 2012, 02:19:13 PM by audiomuze »
I like beautiful melodies telling me terrible things -- Tom Waits

Free your mind...and your ass will follow.

Offline GearSlave

  • Peacekeeper Extraordinaire
  • Trade Count: (+3)
  • AVForums Grandmaster
  • *****
  • Posts: 8,796
  • Total likes: 0
  • Ohm's Law has no business in Audio
    • Studio B
Re: Using your Microserver as a Squeezebox Music Server (Ubuntu only)
« Reply #1 on: May 20, 2012, 07:32:54 PM »
^^^ Thanks for that. I think my cache is still running on my memory stick :-[
Resistance is not futile; it is voltage divided by current (R=V/I)

Offline fdlsys

Re: Using your Microserver as a Squeezebox Music Server (Ubuntu only)
« Reply #2 on: May 20, 2012, 07:43:03 PM »
 :thumbs: :notworthy:
The four building blocks of the universe are fire, water, gravel and vinyl. Dave Barry
Come back when you’ve lived a little. Miles Davis