Monday, July 11, 2011

My tips for a happy Linux home server (for users new to the Linux scene).

I've recently moved from a FreeNAS 7 server to an Ubuntu Server 10.04 LTS install. The move went well, but I thought I'd share my tips/thoughts that may help some of the newer Linux home server users.
  • Why did I choose Ubuntu Server and not Fedora, CentOS, OpenSUSE, FreeBSD? A very arguable point to start withUbuntu Server was really the only distribution that I could find that was a concentrated server-only distribution that had a well managed life cycle. Others like Fedora could easily be customised to be a server but I really liked that Ubuntu Server was specifically built for this use. I'm still very new to the linux server arena so that alone gave me a little more confidence. Ubuntu's life-cycle was also a big winner for me, explained here link
  • You didn't pick Ubuntu, that's fine but know your distributions roots. Ubuntu is based on Debian so I know I can use a lot of Debian resources. Simile Fedora and CentOS are based on Redhat. You need to know this.  
  • Use Webmin link. It's a fantastic webGUI that will ease you into the headless server lifestyle, saving you time and helping you monitor your new system easily. It plugs into a ton of different areas and services (like Samba) and is supported by all of the major distributions. Its very light on system resources and its installation (for Ubuntu) is a good introduction into adding sources and installing using apt.
  • You need to know how to install and update software. For Ubuntu's it's aptand here are the basics on how to use it link.
  • Update software and the OS as soon as you install (for Ubuntu use the apt methods above). Get everything up-to-date before you start working on the server, just in case a major change is due to come down and potentially break your fresh sever. In my experience this is pretty unlikely for a basic server (file serving, basic webpage) but its also makes sure you have the best tools to set-up your server.
  • Software raid is fine, don't be afraid to use it. I wont go too far into this point, as I think this page by Jeff Garzik sums everything up really well. 
  • Mix your brands of hard drives/models (if possible). This opinion is very arguable as well, and again I wont go too far into the opinion. The idea is you will minimise the chance of more than one disk failure. Robin Harris explains it really well here link.
  • Stay away from cheap raid cards. If you do decide do go with a hardware raid instead of software raid, or even if you just want more SATA ports make sure you get an real raid card, or at least a SATA card that has known support for your Linux distribution. Fake raid cards are painful to work with. For instance I wanted to create a software raid array over five ports, using all four on-board Intel ports and a single port from my Silicon Image 3114 based PCI card. Everything was ok until the system was rebooted. It appears that my 3114 card will read the mdadm software raid metadata on any drive attached to it and assumes it should be managing that array. So it created a failed array in itself, and as the single drive wasn't available to the OS the software raid failed that disk. Very annoying.
  • Research hard drive support for your distribution. Some drives, in particular 4K sector drives, may need to be partitioned in a particular way to ensure full IO speed. Drives like 2TB western digital EARS model drives have this problem. This forum post describes it well. Just remember to a little pre-research and all should be ok.  
  • If you want timely redundancy and diversity with your server stick with common gear. Unless you need your sever to be the size of a shoe box stick with a nice compact full ATX case and power supply. If my server motherboard dies tomorrow I have access to around 5 other motherboards that will plug straight in and get me back up and running. Or if I install a service tomorrow that really pushes my CPU I know I can get a more powerful 775 CPU very easily and cheaply. 
  • Know your config files. Config file locations can get a little hard to remember. Write them down in a text file to help remind you. 
  • Use Nano instead of VI for editing config files to begin with. I find its much easier for new comers. 
  • Do you want to share a music folder with iTunes installs on the same network? mt-daapd, also know as Firefly media server, (included in the Ubuntu repositories) is light weight and easy to configure. Here is a great how to install for Ubuntu.
  • Want to virtualise from within your server? You want your CPU to have the VT extension link. You can virtualise without it but you will take a massive hit on performance. 
  • Learn how to compile and install source just in case link.
  • Lastly, google google google google and then google. If you cant get something to work don't post your problem on a forum straight away, give it a decent search first. The chance you're problem hasn't been experienced before is extremely unlikely. 
I hope that helps a few people. If anyone has any questions about this or running an Ubuntu Server at home feel free to leave a comment or give me a shout on Twitter @iammacgyver. 

1 comment:

  1. i run a windows 95 box, do u think that is good ?

    ReplyDelete