Build an OS X Friendly Linux Media Server From Your Old PC
Posted 12/10/2009 at 3:37pm
| by Arvind Srinivasan
Welcome to the wonderful word of Apple. Your new Mac comes chock filled with a variety of intriguing software and helpful, built-in utilities, and we're sure that you'll enjoy your new machine for years to come. However, you may be wondering what in the heck to do with your old PC. Surely, that Windows machine gave you some good years, before it became plagued with menacing viruses and fattening bloatware. So, why not give it a new lease on life by reconfiguring your old PC to serve as a Linux media server for your Mac? It's the perfect trade-off and will ensure that no old computers rise up out of the ashes with revenge on the mind.
Before we get started, we'd like to caution that you'll probably need to upgrade the hard drive in your PC to correspond with the amount of media that you have. If you plan on using the heck out of this media service, we recommend you procure a gigabit ethernet networking card and a lightening fast router in order to maximize speed. In any case, most current rigs should work fine. We used an Intel Celeron 1.2GHz processor with 384MB of RAM.
Difficulty Level
Hard
What You Need
> Crunchbang Linux Standard Edition (www.crunchbanglinux.org)
> A Blank CD
> InfraRecorder (Windows only -- infrarecorder.org)
> PulpTunes (www.pulptunes.com)
> A PC that is connected to the Internet at all times
> One (or more) Macs
1) Partition + Install Linux
The first thing you need to decide is whether to delete Windows entirely or keep your PC as a dualboot machine. There is a certain euphoria attached to the act of deleting Windows, but we can understand if you want to keep it in case something goes awry.
However, server software performs best when the operating system uses a minimal amount of system resources, so we will be using a pared down version of Linux for this tutorial. We recommend Crunchbang Linux, a variant of Ubuntu that uses the lightweight OpenBox window manager, or Puppy Linux. Though this guide will use Crunchbang, the same steps will work for both. Once you have downloaded either ISO, use a program like InfraRecorder on Windows or Disk Utility on OS X to burn that image to CD.
If you happen to be using an older Mac for this project, check out our guide to installing Linux on it. All of the subsequent steps will remain the same.
On a PC, boot from the CD. To do this, you will need to press one of the F keys during startup, depending on your computer's model. Usually, this will be F12.
Once you reach the Crunchbang installer, either choose to install it side by side with Windows, and move the slider to give Crunchbang the majority of space, or select "use entire hard drive" to delete Windows completely. Proceed with the default install options.
Crunchbang In Action
2) Update Linux
Once you have installed Linux, it is time to boot into it and configure it. In the install process, you would have installed the GRUB boot menu, so when you start up your computer, you should be able to select which operating system to launch. Choose Crunchbang and log in.
The first thing you need to do is make sure your system is updated and running properly. Instead of using a menubar, every function in Crunchbang is accessible via the right click menu. With this in mind, right click and select System > System Upgrade. This will update your operating system with the latest software and patches. The Terminal window will close when finished updating the OS.

Next, make sure your repositories are up to date. Open Terminal (right click > Terminal), and type
sudo aptitude update
Every time you run a sudo command, it will ask you for your sudo password. This is the same, by default, as the password of the first account you set up.
Now, you are ready to start installing server software.
3) Configure SSH
Since this is a server, you don't want it to be plugged in to a monitor, keyboard, and mouse at all times. The best way to control it remotely is via SSH, which essentially lets you run terminal commands remotely. In Crunchbang, unlike other distros, SSH is not included by default, so we will have to install it manually.

Open Terminal and type in
sudo apt-get install ssh
It will ask you if you want to proceed. Type 'y'.
Now you need to test the SSH connection. First, take note of your IP address. To do this, go to Terminal and type
ifconfig
You will see a long string of text, but the important thing to note is what comes after "inet addr:" This is your server's IP address.

Now, go to your Mac and open up its Terminal (Applications > Utilities > Terminal). Type:
ssh {your username on linux}@{the ip address of your linux server}
It should ask you to add the RSA key to a list of trusted ones. Type 'yes.'
Now, you should be able to run commands as if you were typing them into the Linux computer directly. You can test this by running sudo aptitude update -- this will only work if your ssh connection works.
If you're so inclined. you can now use SSH for the remainder of the steps.
Next: Install AFP and an iTunes server