Debian Lenny base server

From SaruWiki
Revision as of 21:02, 27 April 2008 by 212.238.151.172 (talk) (Preparation of the hardware)
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

(Note: in the following we're again assuming you're running an x86/x64 type of machine. Hardware requirements and preparation for other platforms, e.g. IBM's Series p or HP 9000, can differ significantly)

Next, check the assembled hardware:

  • is the configuration complete?
  • are all components connected properly (memory DIMMs seated correctly in their sockets, AGP card inserted correctly into the AGP slot, et cetera) and are all cable connections made (multiple power cables to the motherboard, one power cable plus one data cable to each hard disk, etcetera)?

Following this, you may hook up the machine. It's going to need power, and you will need at least a keyboard and a monitor attached. And if you want to use a Graphic User Interface to install, a mouse is required also. When you've ensured that everything is safe, you can turn on the machine, and continue to check it:

  • do all fans start to run when you turn on the machine? (if not, then quickly turn off your machine and correct the problem!)
  • does/do the hard disk(s) spin up?
  • do the power button and reset button operate correctly?
  • are the power led, HDD led and other display gadgetry functional?
  • when you let the machine power up, does it emit a single beep? And does it then show a Power-On Self Test screen (POST)?
  • Does it show the correct amount of memory in the POST screen? The correct number & speed of the CPU(s)?
  • Does the machine recognise all controller cards (SCSI, S-ATA etc)? And all attached DVD-drives and hard disks?
  • are all BIOSes/firmwares up to date?
  • does the machine attempt to boot from at least the hard disk?

...et cetera. If there is any problem, or you want to update the BIOS or firmwares, it's best to do it before the operating system is installed. This Wiki, however, is not the place (yet) to get the information on how to accomplish these type of tasks.

The last step in the preparation of the hardware, is to ensure that the machine can boot from CD/DVD, so that you can start installing Debian from it. It is possible to install Debian over the network, but that requires setting up a PXE Boot server which is (currently) outside the scope of this wiki.

By now the system should be all ready to receive it's Operating System.

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

<references/>