Server Introduction

From Wiki99

Jump to: navigation, search

↑ Computers ↑
next: Bootstrap software →


Contents

Introduction

About these essays

This guide tells you something about setting up a small home server on MacOSX Tiger.
At times it describes things in extremely simple detail, and some readers may already know that detail, but at least skim that material to make sure you aren't skipping something important that you don't know.
Some of what I say is slightly simplified, but only to an extent that would upset a purist, and not, I hope, to the extent that it is misleading.
This guide is targetted at someone who has a passing familiarity with UNIX, (for example you understand UNIX permissions), but who is not especially familiar with either networking concepts or UNIX sysadmin concepts. If you don't even know the basics of UNIX like permissions, or how to use the command line, you really should read up about those before tackling setting up a server.

What is a server?

The word server refers to either hardware or software.

As hardware, a server is simply a computer that provides services to at least one other computer. Or to put it in a more practical fashion, a computer for which there is some reason for another computer to connect to it over the network.

As software, a server is a program that, again, provides services to at least one other computer.

Yet a third meaning of the word server refers to a specific category of hardware, as in "we sell laptops, desktop machines, and servers". This usage refers to high end hardware with the best of everything --- faster CPUs, more RAM, faster hard drives, and so on. Such machines may make sense for business, but for us they are unnecessary. In other words, for home use you do not need server class hardware for your server; pretty much any old computer will do.

This sounds confusing, but each use of the word generally makes sense in context.

So a (hardware) server may run, among other programs, a web server, an SMTP server (which handles email), and an ssh server (which allows for command line access over the network).

Why would you want to set up a server?

  • You may want to do this for convenience. For example you may want to set up a print server so you can print from other computers in your house to a USB printer without having to explicitly copy files to the computer attached to the printer. This is so simple Apple does everything for you, but you might find the description of how things work below interesting.
  • You may want to do this just for fun. For example you may want to create a web server to share your photos with your friends. Apple does the first half of setting this up for you (the web server part) but does NOT do what is necessary for your friends to find your web server over the internet.

  • The above two cases are fairly simple, and Apple does a lot of the work for you. Let's get to more interesting cases.
    Where many people start is setting up a mail server. A home server will allow you to have your own email address, so that you are no longer tied to your ISP's email address, and don't have to tell everyone you know about how your email address has changed when your ISP changes.
    A home server will also allow you to keep email in sync across multiple computers, say a home computer and a work computer.
    It will also allow you to install your own junk mail detector that runs in addition to the junk mail detector built into Apple Mail, and detects different kinds of things.
    If you travel, depending on how your ISP has set things up, you may have found that you can't send out mail when you are away from home. Once again, a home mail server can help with this.
    Again, if you travel, you may have encountered situations where you cannot connect to a network to download mail, but you can utilize a public web browser. Your home server can make your mail also available as webmail.

  • Or you may want to run your own wiki or weblog.

  • Or you may want to backup your other computers to a central location.

Once you have the basic server infrastructure set up, all sorts of things become possible.

Because there are so many things servers can do, there are many many ways of setting things up. Because of that, I will try in this guide to explain all the background information as to why things are being done and how things fit together. With an understanding of the various pieces, you should be able to tailor things to your needs even if you want a configuration that's a little different from what I am describing.

Limitations to what I describe

The server and services I have set up for my use are for the most part limited to my use. That means that I can use a security model that's simple, but perhaps not practical for systems with many users. It also means that it's not too important to me that the software I install is the most efficient available; more important is that it is easy to install and configure.

As always, make sure you backup all your data before playing around. You might think you know what you are doing, but sadly mistakes do happen. A later essay tells you how to perform a sophisticated backup that will backup multiple versions of everything on your system including all the changes you make to the UNIX parts. You may want to read that immediately, or, for now while you have not yet made any changes to the UNIX part of your system, you may think that a simple Finder copy of your personal folder to another hard drive is good enough.


Hardware

What computer should you use for your server?

A home server is undemanding computationally, so pretty much any mac that runs MacOS X will do just fine.
I used to use my (1st generation) Titanium Powerbook which was four or five years old at the time as my server. The CD drive was broken and the screen had three columns of dead pixels, which means it was pretty much useless as a portable computer --- and just fine as a server.
The screen on that machine has now died, and while I could, in theory, still use it as a server with an external screen, I switched to a 2nd generation Titanium Powerbook from my friend, which has a broken internal hard drive but which boots fine off an external FireWire drive, and which is again about four years old now.
The point is that a home server does not have to be a high end machine. More likely it is some machine that is broken in some way or another that makes it irritating or useless as an everyday machine, but which can still perform the basic server tasks of connecting to a disk, connecting to the network, and providing screen and keyboard that are usable but don't need to be great..

One thing to think about is noise. Your server, to do its job, has to be on 24 hours a day. If you have limited living space, say a dorm room or a studio apartment, you probably don't want to be using a mac whose fan or hard drive is noisy, no matter how cheaply you can buy it on eBay or get it from a friend. Of course if you have a basement or closet or something that houses your server, feel free to use the cheapest noisiest mac you can find.

Backups

The second thing to think about is backing up. Once you start using your server, especially for mail, you will become addicted to it. If your friends and family start using your server for their mail, or if you build up a fan base for your web site, other people will rely on you. Before starting, it's worth making sure that you can afford to do what's necessary to back things up reliably. We'll talk about general backup strategies later, but before then, be aware that just having a server is not enough. At the very least you should also have a second hard drive for backups.

You also need to remember that, at some point, Apple will release the next version of its OS, say 10.5. Given how much we will change the UNIX part of the OS, it's more than a little risky to assume that simply installing from the DVD on top of your existing 10.4 OS will just work. So you will probably want yet another hard drive as a temporary space on which you can install the new version and run through all the instructions I give below to make sure that you know how everything works in the new OS, before you do the real install on your server.

Hard drives aren't free, of course, but they are, all things considered, fairly cheap, and if you can't afford one or two for the sort of situations I described above, perhaps you ought to hold off on your server plans until you have saved a little money and hard drive prices have fallen even lower.


next: Bootstrap software →

Personal tools