Debian Lenny base server

From SaruWiki
Jump to navigation Jump to search

Debian Etch Base Server setup

Getting the hardware

Naturally, before we can begin to install the operating system, we need to obtain the necessary hardware. Which hardware you require depends on what you want the server for; a testserver on which you will test only a single feature for a short while does not need the same quality of hardware as does a server that's supposed to act as a homeserver for many tasks for a long time. We'll assume your server will be like ours: a home server that must perform many tasks with sufficient performance for a few users, that's reliable and will last for a couple of years. So build or obtain a server with at least the following hardware:

  • a spacious casing with big, quiet cooling fans, like the one we have;
  • an efficient, heavy-duty power supply that's rated high enough for your devices, and has a decent efficiency. For example, a Corsair HX520 power supply;
  • a server class motherboard, e.g. an Intel or AMD based single-processor motherboard. DO NOT go for the cheapest motherboard you can find: if you pay peanuts, that's what you get. Server class motherboards have the quality, stability and durability you'll need from it, and usually also most of the needed peripherals, like multiple ethernet network cards on-board. Usually a Linux server doesn not require much in the way of video performance (and the screen will be used rarely, if ever), so any old integrated graphics will do.
  • a matching CPU - or multiple, if you think you need the power and the selected motherboard has the sockets.
  • a CD-ROM- or DVD-player
  • multiple harddisks - you'll want redundancy, because every harddisk fails at some time. The drive with your data on it will fail fatally when it is most inconvenient to you, and any data on it that you consider valuable will likely be lost forever. To make Murphy's work somewhat harder for him, we're going to store our data redundantly, so that if any drive in the server fails, we'll not lose our data or our server. Thus, get yourself at least two harddisks for your operating system, at least 40GiB in size (don't think you'll be able to buy smaller ones nowadays), and spanking new (NEVER use old harddisks for your production server, new ones are just too cheap to run that risk!).
  • (multipe) network card(s) (NICs) if your motherboard does not have enough NICs integrated on-board. You'll want a NIC for your network, and another one for your Internet connection; and possible a third one for the wireless segment of your network.

Now build a machine out of the above, or have someone build it for you.

Preparation of the hardware

Partitioning

This is a tricky subject, but we have put together a recommended standard partitioning scheme. The basis is this:

Partition MD LVG LV-name Size
(physical machine)
Size (VM) File System Mount point
1 /dev/md0     100MiB 100MiB ext3 /boot
2 /dev/md1     3GiB 1GiB ext3 /
3 /dev/md2 system swap 1GiB<ref name=swap>Rule of thumb: twice the size of the machine's RAM, but no less than 256MiB and no more than 2GiB</ref> 256MiB<ref name=swap/> swap  
var 2GiB 1GiB ext3 /var
appslog 3GiB - ext3 /var/appslog
home 1GiB<ref name=home>Note that this heavily depends on the purpose of the machine; if it is not to house any users, then (almost) no space is needed for /home. But on the other hand if e.g. a virtual user is to be used for keeping mailstores, or other service users need home space, then /home needs to be big enough for that.</ref> 512MiB<ref name=home/> ext3 /home
usr 3GiB 3GiB ext3 /usr
tmp 1GiB 512MiB ext3 /tmp
opt 1GiB - ext3 /opt
Total 18.1GiB 6.9GiB

(+)Rule of thumb: twice the size of the machine's RAM, but no less than 256MiB and no more than 2GiB
(++) Note that this heavily depends on the purpose of the machine; if it is not to house any users, then (almost) no space is needed for /home. But on the other hand if e.g. a virtual user is to be used for keeping mailstores, or other service users need home space, then /home needs to be big enough for that.

<references/>