Linux Format

Building and configurin­g

Assemble and pray to $DEITY for the happy beeps. Then install Debian.

-

Not that long ago we would’ve spent a good page talking about hardware considerat­ions – back then hardware support was something of a minefield – here we’ve squished it all into a box.

Things still aren’t perfect on Linux, but serious hardware incompatib­ilities tend to be reserved for laptops, so any issues you run into elsewhere tend to be pretty minor and easily corrected. In theory, you could cobble any old bits together and make a server, but old components (particular­ly disk drives and power supplies) have a habit of breaking and broken is generally not a good state for a server to be in. Further, when these components do break, replacemen­ts are often only available second-hand (and often at a vastlyinfl­ated price) and so may not last long. Also that ten-year-old IDE drive that’s been sitting on your desk all year is unlikely to be fast or capacious enough to be useful. Add to that the fact that old gubbins is inefficien­t and tends to get hot and noisy (and nobody likes inefficien­cy, fires or disturbanc­e) and our perils of relying on old hardware talk is done. By all means use spare parts that you have lying around, but only if you’re confident they will last.

We’re going to use Debian for our server, though all the packages we refer to are available on other distros, so you can use whatever you like. If you really must, this includes desktop distros, but we have no need of GUIs where we’re going. So things like Ubuntu Server, CentOS, or Arch Linux are more reasonable choices. We’re going to have a dead simple partition set up for our OS drive—just an ext4 partition for the OS and a swap partition, basically what you get if you accept the defaults on a standard install. While some people would be tempted to do something more exotic, viz snapshots, rescue partitions and LVM, we’re working on the theory that if the worst does happen our configurat­ion will be easy to replicate with a fresh install. Backing up a couple of key configurat­ion files will make this process even easier.

Debian is easy to install, just grab the ISO (either the small Network Install or the first CD from the install set) from www.debian.org and away you go. You’ll be prompted to set a password for the root user, setting this to blank will disable the root account and install sudo, which you may prefer. You’ll certainly want at least one user account at this stage, others can be added as required (with draconian storage quotas, if you want to be that kind of sysadmin). The ‘Guided—use entire disk’ option will set up an ext4 and a swap partition, which is all our server needs.

Once everything’s installed reboot into the new system and log in as root (or your user if you disabled the root account, we’ll use the # prompt to indicate commands that will require sudo usage). It’s good practice to keep your server up-to-date, so our first act will be to update package lists and catch any last minute upgrades: # apt-get update # apt-get upgrade

 ??  ??
 ??  ?? This is the minimal Debian collection set we started with. The installati­on took up just over a gigabyte.
This is the minimal Debian collection set we started with. The installati­on took up just over a gigabyte.

Newspapers in English

Newspapers from Australia