Build an OS X Friendly Linux Media Server From Your Old PC
Posted 12/10/2009 at 3:37pm
| by Arvind Srinivasan
7) Install PulpTunes
Shared iTunes is great, but Firefly will not work if you are outside your home network. PulpTunes is software that will display your music as a webpage, and stream it through a flash based player. Unfortunately, PulpTunes is not in the Ubuntu repositories, so installing it is a bit more work than sudo apt-get. You will need to download the .zip file manually from their website. Drag the unzipped PulpTunes folder to some folder on your server. The location is relatively unimportant -- we recommend the home directory.
PulpTunes works by using the file locations in your iTunes Library.xml file, which is in ~/Music/iTunes/ on your Mac. Unfortunately, the iTunes Library.xml file points to folder locations on your Mac, and PulpTunes doesn't remap the locations automatically. To fix this, create a copy of the iTunes Library.xml file, and open it with your favorite text editor (we used Smultron). Find and replace all instances of file://localhost/Users/{your Mac username}/Music/iTunes/iTunes Music/ with the location of the folder you plan to put your music in on the server.
The easiest way to do this is to copy line 10 of the iTunes Library.xml file, press Command+F (find) and use the "replace all" function. Save the file, and drag it to some location on your server.
Now, copy your music over, preserving the artist hierarchy, to the server. Use the location that you provided in the modified iTunes Library.xml file. This will only work if you let iTunes manage your music for you when you first configured it on your Mac.
Finally, run PulpTunes by running the pt_linux.sh script. This will install and run PulpTunes. To do this, type the file path of the script into the terminal. For example, if the script is in /home/media/pulptunes/, in Terminal, type
/home/media/pulptunes/pt_linux.sh

The installer will ask you for the location of the iTunes Library.xml file that you created in the previous step. Select it through the file browser that pops up. Once the PulpTunes server is running, an icon of an orange will show up in the taskbar of the server.

Finally, to test your PulpTunes setup, browse to
http://{server ip address}:15000
You should see a web interface where you can see all the music referenced in your iTunes Library.xml file. Note that you can only play back music that you have actually uploaded to the server.

8) Torrent Server
One of the touted features of dedicated Network Access Storage boxes, more commonly known as NAS, is a server torrent interface. Of course, we don't advocate torrenting illegally, but if you want to torrent directly to your server, it is relatively easy to set it up.
First, install Torrentflux, the server interface we will be using. In the terminal, type
sudo apt-get install torrentflux
Torrentflux uses the LAMP (Linux, Apache, MySQL, PHP) stack to power its web interface, so it will install it automatically when you use sudo apt-get. Now, you should be able to browse to the Torrentflux interface by navigating to
http://{server ip address}/torrentflux/

Torrentflux will ask you to log in with your Linux username and password
In the TorrentFlux interface, you can choose to upload a torrent file, download directly from a magnet link, or search for a torrent with one of the built in search engines (PirateBay, etc.). The file will download directly to the server.

Now you're ready to stream Media from your old PC to your new Mac!