Installing SlimServer on a LinkStation

[Page 1] [Page 2] Page 3 [Page 4]

Installing SlimServer.

Perl. SlimServer requires Perl (a programming language) to be installed on your LinkStation. Although Perl 5.6.x will suffice, certain SlimServer features (such as the RSS news ticker and the database caching feature) will not work unless you have Perl 5.8.x. My LinkStation came with Perl 5.6.x installed. Sam from the LinkStation Yahoo! Group compiled and packaged Perl 5.8.5 for the LinkStation. If you would like to use Perl 5.8.5, you can download a copy from my web server, http://fieldnetworks.com/slim/perl-5.8.5-linkstation.tar.gz. Note that your browser might change the file extension to .tar.tar (the same is true when you download SlimServer, a little later in the process). Don't worry if this happens. Just change the extension back to .tar.gz before proceeding and everything should work perfectly.

Here is what you need to do to install Perl 5.8.5: After downloading a copy, move it to your LinkStation's shared folder using smb/nfs (Linux) or Windows file sharing. Next, telnet into your LinkStation as root. Before installing the new Perl from the network share into its installation directory, you should move the old one for safe-keeping: First, if you did not already create a /mnt/old-stuff directory when backing up the /etc/passwd file, make the directory now, "mkdir /mnt/old-stuff". Then, "mv /usr/share/perl /mnt/old-stuff/old-perl" and "mv /usr/bin/perl /mnt/old-stuff/old-perl-executable". This will move the entire Perl installation folder and the executable into your "/mnt" directory.

Why move it here? The way Buffalo partitions the hard disk inside your LinkStation, there is very limited storage anywhere except your /mnt directory. The /etc/fstab file from my LinkStation (below) shows that my LinkStation's disk has three partitions: /dev/hda1 (the first partition on the hard drive), which is used for the root filesystem ("/"), /dev/hda2 (the second partition), which is used as swap space, and /dev/hda3 ("/mnt"), which is used for the directories you share on the network and anything else you'd like.

root@LINKSTATION:~# more /etc/fstab
# /etc/fstab: static file system information.
#
#                        
/dev/hda1       /               ext3    defaults,noatime,errors=remount-ro
0 0
proc            /proc           proc    defaults                        0 0
none            /dev/pts        devpts  gid=5,mode=20                   0 0
/dev/hda2       swap            swap    defaults                        0 0
/dev/hda3       /mnt            ext3    defaults,noatime                0 0

More explanation for those unfamiliar with Linux filesystems: On a Linux system, there is no "c drive," "d drive," etc. Instead, all the various storage media are mounted into a single file system. So on your Windows system, a single hard drive partitioned with your LinkStation's partition scheme would actually show up as three hard drives in My Computer, a very small c drive, a very small d drive, and a huge e drive. In Linux, the entire drive, and all other storage devices mounted to your system, would show up somewhere in the file tree beginning with "/". Your /etc/fstab file determines where each partition shows up in your file system. Buffalo chose to place the large partition at /mnt.

TerraStation owners: Your filesystem is more complicated than the one described above (which makes sense given that you have four internal hard drives and RAID capability). You will need to determine, based on the way you configured your TerraStation, where to place the files related to your SlimServer installation. You will, of course, need to modify the commands in these instructions to use the file locations applicable to your TerraStation (this applies only to files located within the /mnt directory and not files in standard Linux directories such as /etc or /usr).

Now that you created more space on the first partition (/dev/hda1) for the new Perl installation by moving the old one to /mnt, copy the downloaded file from your network share to the root directory of the LinkStation: "cp /mnt/name-of-network-share/perl-5.8.5-linkstation.tar.gz /". Now, change to the root directory and extract the file: First, "cd /". Then, "tar xzvf perl-5.8.5-linkstation.tar.gz".

Background for Windows users. The tar utility does part of what Windows zip utilities do: It bundles multiple files together into one file (originally used to create tape backup archives). Another utility called gzip compresses the tar file. Thus the .tar.gz file extension. The "xzvf" command switches tell tar to use a file (not a tape) as its input (f), unzip the tar file (z), extract the various files comprising the tar file (x), and display the file names as it goes (v, for verbose). It's basically the same as unzipping a file in Windows.

You now have Perl 5.8.5 installed...well almost. SlimServer expects to see Perl installed in /usr/bin/, but Perl 5.8.5 was packaged to install in /usr/local/bin (probably to allow installation of 5.8.x in addition to older installations of Perl). One solution would be to edit the main SlimServer program file (slimserver.pl) to tell it to look in a different place for Perl. However, if you do that, you will have to remember to do it again each time you upgrade SlimServer. A better approach is to divert SlimServer from /usr/bin to your Perl installation in /usr/local/bin by creating a symbolic link (similar to a Windows shortcut): "ln -s /usr/local/bin/perl /usr/bin/perl" (i.e., the file called /usr/bin/perl will point to /usr/local/bin/perl).

root@LINKSTATION:/usr/bin# ln -s /usr/local/bin/perl /usr/bin/perl
root@LINKSTATION:/usr/bin# ls -lF /usr/bin/perl
lrwxrwxrwx    1 root     root           19 Dec  3 20:34 /usr/bin/perl -> /usr/local/bin/perl*
root@LINKSTATION:/usr/bin#

Getting SlimServer on the LinkStation. Now that you have Perl installed, you are finally ready to put the SlimServer software on the LinkStation. Using your PC, you need to download the file from the Slim Devices website. For the best compatibility with LinkStation and TerraStation, I recommend using SlimServer version 6.1.1, available at http://slimdevices.com/downloads/SlimServer_v6.1.1/SlimServer_v6.1.1.tar.gz. If you want to try the latest version of SlimServer, you can always get the "Perl Source Code (tar.gz)" download at http://slimdevices.com/su_downloads.html (however, when you run later versions of SlimServer, you are likely to see errors about missing Perl modules; if you do not know where to download these missing modules or how to compile them yourself, you are best off using SlimServer version 6.1.1). Next, copy the file to your LinkStation's shared folder using smb/nfs (Linux) or Windows file sharing. Now, telnet into your LinkStation as root. You are going to extract the SlimServer archive and then move it to a certain directory: First, change to your shared folder: "cd /mnt/name-of-network-share". Next, extract the file by typing: "tar xzvf name-of-downloaded-file". This will create a directory in your network share with the SlimServer software. Next you are going to move the directory: "mv name-of-extracted-slimserver-folder /mnt/slimserver". One last detail is to create a directory for SlimServer's data files (such as your SlimServer settings): "mkdir /mnt/slim-data". Believe it or not, that's it! The software is installed and can be run.

A quick note on where I have chosen to place my files (and recommend you place yours): I put my installation of SlimServer and all its prefs and data files (such as the cache and playlists) in the /mnt directory. You may have seen advice to place the program files in /usr/local and the data files in /etc (which is typical on a standard Linux system). Either way is fine. I prefer to use /mnt for two reasons: First, space outside /mnt is very limited due to Buffalo's partitioning scheme, as mentioned above. I would rather keep as much as possible in the larger partition (mounted as /mnt). Second, I view the files outside /mnt as outside my control in the event I choose to upgrade my LinkStation's firmware, i.e., I have no idea what changes Buffalo might make to the /usr or /etc directories when upgrading firmware. Therefore, I think it's safer to put my files in /mnt, which Buffalo expects the user to use and as such is much less likely to modify. Again, either way is fine; it's up to you. However, if you do choose the traditional installation directories, you will have to modify the commands in this article accordingly.

A note on upgrading your SlimServer installation. If you would like to upgrade to a newer version of SlimServer (e.g., from 5.4 to 6.0), the procedure is easy. The first step is to stop the currently running SlimServer process: "killall slimserver.pl". Next, you should move your old installation for safekeeping (you can delete it once you are satisfied that the new version is working properly): "mv /mnt/slimserver /mnt/old-stuff/slimserver-version-x.y.z". With the old copy out of the way, repeat the steps in the paragraph entitled "Getting SlimServer on the LinkStation" to download, extract, and move the new copy into place. You should be able to use your existing settings folder with your new installation, but it is a good idea to make a backup first: "cp -r /mnt/slim-data /mnt/old-stuff/slim-data-version-x.y.z". That's it! You can start the new SlimServer from the command line (see the next page for details), or if you configured your LinkStation to start SlimServer at boot time, you can just reboot.

[Page 1] [Page 2] Page 3 [Page 4]

Copyright © 2005-2006 Marc D. Field. Third party brands and marks are the property of their respective owners.


















Low Price Search