Make a Linux Home Data Server of an Old PC

You’ve got an old computer, and you don’t know what to do with it. Sure, it can’t play new video games, maybe can’t run the latest and greatest software, don’t fret, it’s not totally worthless. Converting your old computer in to a home data server opens a range of possibilities, and a range of new things you can do with your computer(s) and the network.

So, how do you do it? Well, if it’s already set up for Windows Networking, you’ve got the basics set up for a Windows file server, and can simply use your local area network for transfering/working with files, however, this article is gonig to show you the more effective, and more powerful way: setting up a Linux file server.

The first step is to pick a Linux distro, DistroWatch.com lists the most popular distributions, and reviews a range of distributions, we’re going to use the Ubuntu [5.10] operating system, with a server installation, simply because it’s the operating system this author uses for his desktop, and is quickly becoming the most popular distribution around.


Your old computer likely has enough memory, and a powerful enough CPU to run Ubuntu, however, if you intend to use this server as a major central file server, it will likely need a new hard-drive. You can deal with that on your own.

When you insert the Ubuntu CD, and boot to it, instead of just pressing [enter] at the boot screen, type ’server’ then press enter - this will prevent it from installing any of the *-desktop packages, and not setting up any unneeded applications.

After following the steps of installation, you will be prompted with a logon screen - enter the username and password you provided during installation, and you are in your brand new Linux system. From here, you can do everything from browse the web, to set up the computer for various networking tasks, to play a range of Linux-based games.

Package management is a critical part of running a Linux system, luckily Ubuntu comes with two distinct and useful tools to aid in your package managing. Aptitude [which, is actually just a UI for apt-get] and apt-get.


A package called “samba” will allow you to set up proper networking between Linux and Windows computers (at least, we hope you’ve got your networking issues sorted out). Running “sudo apt-get install samba” in your new command line will tell the apt-get application to install the samba package, and set it up with default settings.

Once samba is installed, you’ll want to set it up to share certain files/directories, and set them up on your network - samba networking is a massive topic of it’s own, and way beyond the scope of this article, however, running “man samba” will give you the samba manual file, which lists off a series of other manuals to look at. Google’s always helpful too. :)

Now, once you have networking and samba set up, you should be able to transfer files between Windows and Linux through Network Neighborhood/smbclient - you’ve now got a basic data server set up. That was easy, wasn’t it?

For those who want to go further, Pure-FTPd will allow you to set up a fully featured FTP (file transfer protocol) server on this box, which you could use to access your files remotely from any computer set up with an FTP client (Windows Explorer has one built in!), setting up an Apache based web-server is fairly simple with Ubuntu’s apt-get packages, and OpenSSH allows the user to remotely log in to the Linux shell from any computer equipped with an SSH client.

A slight advancement to this system could allow you to set up Bash scripts combined with cron would allow you to set up scripts which immediately backup files every X days, or scripts to do certain processing to files at certain times - the possibilities are effectively endless.

Summary

…and you thought that 5 year old computer was worthless.


Contact the author.
Comments

You should have mentioned that the drive on the ubuntu machine should have a fat 32 partition that Windows and Linux can both read and write to. Why is a linux distro better for file sharing on a home network than a windows PC?

Posted by John Smith on April 14th, 2006 at 9:57 am

This is a great idea, of course. One way to make it even easier would be to use Clark Home, a free version of the Clark Server family, available at http://www.clarkconnect.com/community/ It’s relatively easy to set up a good Samba, web, FTP, photo gallery or whatever server you want, and its browser-bassed administration is a piece of cake. It’ll also perform as a gateway/firewall/DHCP server.

Thanks for the article!

Posted by Uncle Ed on April 14th, 2006 at 3:32 pm

You’re missing a bet here: Apache. When I’m bringing up a new box on my network (usually but not always Linux — I do keep some Windows stuff around), there’ll usually be a core of files that I immediately want to copy over onto the new machine. Having those files available via http on a central server on my LAN means that I only have to bring up a browser, or wget, in order to fetch them in before I’ve even got all the permissions and logins straightened out. Device drivers for Windows, favorite commandline tools for Linux — they’re all there in easy reach.
Plus, having a webserver that nobody on the Internet can see means that I can preview my webpages without embarrassment, experiment with CGI stuff without worrying about what strangers might do to it, and learn something about Web hosting in the process without risking my public site’s security.

Posted by crb3 on April 14th, 2006 at 5:55 pm

Interesting, but why bother? Seems to be a Rube Goldberg solution to the problem of adding more file space. Instead, buy a second hard drive and put it in a spare slot of a computer on your home network. Make it sharable. Job done.

Posted by Ralph Cringely on April 15th, 2006 at 11:10 am
Post your Comments
Please ensure your comment is appropriate before posting.