Next Previous Contents

3. Staging a Debian Woody Server

There are a number of methods of obtaining and installing Debian GNU/Linux. The Debian distribution CDs will be the installation medium used in this document. The installation steps provided here are boiled down, fairly assuming on operating system installation common practices and have been written by an individual familiar with the Debian installation system. For additional details on common staging issues and further explanation of the installation steps please refer to the Official Debian en-i386 Installation Manual. It is important to note that a network installation can be performed extremely quickly with very little media requirement. (One can deploy OpenNMS on Debian with six blank floppies and a network capable PC) Anyone interested in other methods such as direct installation via the Internet (sometimes faster) or Jigdo CD image creation (faster and more efficient than normal http/ftp downloading) should visit the Getting Debian web site. Software RAID, VPN tunnels, SNMP ALG, QoS and the iptables firewall are not covered in this document, but may be desirable additions once the OpenNMS installation is complete. This section overlaps many existing documents but is included here to help shortcut the deployment of OpenNMS (obtain a workable system to learn on quickly while retaining interest) for anyone not familiar with Debian or Linux or as a quick reference for those familiar with the Debian installation process.

3.1 Operating System Installation Goals

3.2 Download and burn the CD images

The simplest method to obtain the Debian GNU/Linux CDs is via LinuxISO.org. Simply click on the Debian icon, and download the Disk 1 (Generic boot US or NON-US) and Disk 5 (bf2.4 boot). These CDs can be created using any popular cd-writing tool. Under Windows use Easy CD Creator, Sony CD Extreme, Nero Burning ROM or CDRWin or any other cd tool can be used to burn the disc (.iso) images. Linux users can use cdrecord to burn the CDs. If there is an IDE cd burner with buffer underrun protection running under the ide-scsi module as device 1,1,0 then the following Linux command should work to burn v3.0r2 Disk 5 (bf2.4) and v3.0r2 Disk 1. Linux 2.6 kernel users can specify the device directly (/dev/hdd is secondary slave) as the ide-scsi module is no longer required to access ide cd burners. The cdrecord package is required for this burning process.

Linux 2.4 Example

bash#cdrecord -v dev=1,0,0 speed=32 -data minbuf=50 -dao fs=16m ts=95k driveropts=burnfree /downloads/debian-30r2-i386-binary-5.iso
bash#cdrecord -v dev=1,0,0 speed=32 -data minbuf=50 -dao fs=16m ts=95k driveropts=burnfree /downloads/debian-30r2-i386-binary-1.iso

Linux 2.6 Example

bash#cdrecord -v dev=/dev/hdd speed=32 -data minbuf=50 -dao fs=16m ts=95k driveropts=burnfree /downloads/debian-30r2-i386-binary-5.iso
bash#cdrecord -v dev=/dev/hdd speed=32 -data minbuf=50 -dao fs=16m ts=95k driveropts=burnfree /downloads/debian-30r2-i386-binary-1.iso

3.3 Booting the Debian Installation CD-ROMs

To start the installation process, set the CD-ROM drive as the default boot device in the BIOS and power-on the computer with Debian GNU/Linux Disk 5 (a.k.a. bf2.4) inserted in the drive. A welcome screen will appear, simply press <Enter> at the boot: prompt to begin the installation process.

Choose The Language

The first blue screen will prompt for a default language and variant. English (en / United States) was used for this document. A Release Notes informational page will also be displayed in the language specified.

3.4 The GNU/Linux Installation Main Menu (10-20min)

The Debian GNU/Linux installation steps are listed vertically in this main installation screen. At the top of the main list, three steps are repeated and prefixed with Next:, Alternate: and Alternate1:. These top three steps represent the suggested next step as well as two suggested alternate steps in the installation process. The highlighted option (default) always represents the suggested next step and will lead towards a Vanilla installation. The user can navigate to alternative installation steps (from the entire list) or to go back and modify a previous installation step at any time. In certain circumstances performing installation steps too-far-out-of-order can produce unexpected results. A step-by-step procedure to a minimal Debian GNU/Linux installation is outlined below with the specific steps represented by the subheadings below.

Configure the Keyboard

Choose the default querty/us or an alternative if a non-standard type is required.

Partition the Hard Disk

This option will bring up the cfdisk interface. If there are some old Linux partitions, the installer will default to Initialize and Activate a Swap Partition in which case the user should navigate to Partition a Hard Disk. The following prompt will ask to Select Disk Drive. SCSI drives will appear as /dev/sdX and IDE drives will appear as /dev/hdX. Select the appropriate drive and continue with the partitioning process.

The hard disk used in this document is a 20GB IDE drive. It is the master drive on the primary IDE controller (pm) and as such appears as hda. Other IDE disks can appear as hdb(ps), hdc(sm), hdd(ss), etc. SCSI disks would appear as sda, sdb, etc. The very simplest partition layout would have only two partitions; a swap partition and an operating system partition. Although this does work, it is recommended to partition the file system further in order to separate the different types and uses of files on the system.

If the disk is new or no partition table exists, the user will be asked to start with a zero table. Type y to continue with the new disk and a zero table.

Linux can operate on both primary and logical partitions. Logical partitions have been used here only out of preference and always begin numbering at 5. (i.e hda5 is always the first logical partition on any IDE drive). For this example we have divided the IDE disk hda into the following partitions.

Name    Flags    Part Type    FS Type       Size
--------------------------------------------------
hda5    Boot     Logical      Linux         98.68*
hda6             Logical      Linux       4096.19
hda7             Logical      Linux       2048.10
hda8             Logical      Linux      13267.38
hda9             Logical      Linux swap   509.97

The mount points for each partition is planned to be as follows. In the following steps we will mount the swap partition and then assign each of the partitions to the appropriate mount point, beginning with the root partition (hda6)

Part.  Mount   Description
-----------------------------------------
hda5  /boot    Kernel images for booting
hda6  /        Root file system containing system files, libraries and binaries.
hda7  /home    User home directories, user downloads and docs
hda8  /var     Variable data. All OpenNMS database entries, log files, cache, etc

Remember to change the partition FS Type for the swap partition to Linux swap([ Type ] 82). The boot flag is optional with the LILO boot loader and only affects non-Linux partitions. If no boot partition is set, cfdisk will warn that DOS MBR partitions may have trouble booting. This warning has no impact on Linux systems. Once partitioning is complete, select[ Write ] [ Quit ] to exit. cfdisk will warn to reboot the system, however this message can be ignored as it is intended for users running cfdisk once the system has been fully installed.

Initialize and Activate a Swap Partition

In this document example /dev/hda9 is automatically selected as it is the only partition with the [ Type ] set to Linux swap. Whatever partition is set to Linux swap (Type 82) will automatically be selected at this point in the installation.


Note on file systems. Ext3 and ReiserFS are both journalling file systems. ReiserFS has superior performance to Ext3. Ext3 however will boot even with a misconfigured kernel (no Ext3 support). Ext3 functions just like the standard Linux file system Ext2 if the journalling is disabled. This is a huge bonus for anyone experimenting with different kernels and allows a much simpler disaster recovery from almost any bootable Linux cd. Ext3 is more than fast enough for a production OpenNMS system and is the recommended choice.

Initialize a Linux Partition

When prompted for the file system type, select Ext3 to enable the journalling file system. Choose the partition /dev/hda6 (root partition) first. Next there will be a prompt to mount /dev/hda6 as the root(/) partition.

Initialize a Linux Partition

Choose /dev/hda5 and mount it to the /boot location, select Ext3 as the file system.

Initialize a Linux Partition

Choose /dev/hda7 and mount it to the /home location, select Ext3 as the file system.

Initialize a Linux Partition

Choose /dev/hda8 and mount it to the /var location, select Ext3 as the file system.

Install Kernel Drivers and Modules

Select cdrom as the installation medium and insert Debian CD-ROM Disk 1 when prompted. When prompted, accept the default Archive path from the list of all likely directories on the CD-ROM.

Configure Device Driver Modules

This step allows specifies which kernel modules to load into the system. For OpenNMS we are interested in only network related modules in addition to the standard kernel. Sound cards, special input devices and support for other file systems can also be selected here. Users familiar with the Linux kernel will likely want to build their own custom kernel once the installation is complete. Some prefer the robustness, stability and blind upgradability of the kernel packages.

  1. Network cards. The bf2.4 kernel natively supports RTL8139 network cards. For others, select them from the list of modules for network cards. Some common types (good types) are listed below:
    /kernel/drivers/net/tulip:tulip - Tulip Based (DEC 2114X, Macronix MX98X)
    /kernel/drivers/net:3c59x - Common 3COM (3c905X)
    /kernel/drivers/net:tlan - Thunderlan (Older Compaqs)
    /kernel/drivers/net:via-rhine - Many VIA motherboards
    /kernel/drivers/net:eepro100 - Intel 8255X chips (Newer Compaq/HP)
    
     
    
  2. Other kernel extras. The bf2.4 kernel natively supports FAT disks if they are needed.
    /kernel/fs/smbfs:smbfs - Mount windows (SMB) file shares remotely
    /kernel/drivers/md:raid1 - Software RAID Mirroring
    /kernel/net/ipv4/netfilter:ip_conntrack - For NAT capabilities
    /kernel/net/ipv4/netfilter:ip_conntrack_ftp - For passive FTP 
    /kernel/net/ipv4/netfilter:ip_nat_ftp - For FTP over NAT
    /kernel/net/ipv4/netfilter:ip_nat_snmp_basic - For SNMP ALG NAT
    /kernel/net/ipv4/netfilter:ip_tables - For firewall capabilities
    /kernel/net/ipv4/netfilter:iptable_filter - For firewall capabilities
    /kernel/net/ipv4/netfilter:ipt_REJECT - For firewall capabilities
    /kernel/net/ipv4/netfilter:ipt_mulitport - For firewall capabilities
    /kernel/net/ipv4/netfilter:ipt_state - For firewall capabilities
    /kernel/net/ipv4/netfilter:iptable_mangle - For advanced nmap tool use
    /kernel/net/ipv4/netfilter:ipt_LOG - For logging traffic
    /kernel/net/ipv4/netfilter:ipt_unclean - For advanced nmap tool use
    
     
    



Configure the Network

Enter the hostname, ip address, netmask, domain name and DNS servers.

Install the Base System

Accept the current CD-ROM (Disk 1) as a package source.

Make the System Bootable

Set LILO to install into the MBR. For primary master IDE drives, this is /dev/hda. For SCSI systems with a single disk this is /dev/sda

Make a Boot Floppy(Optional)

This will create a boot floppy that understands where the root partition is located. i.e. if there is a problem booting the new Debian installation (other Boot Loaders, Dual-Boot scenarios) this will allow to boot the OS using a floppy initially that passes the boot over to the hard disk. This can also be used to boot other Linux systems with damaged boot loaders using the followingboot: prompt command with the proper location of the root (/) partition.

boot:rescue root=/dev/hda6

Reboot the System

Remove all CD-ROMs and floppies.

3.5 Package Configuration

The system will restart with a welcome screen.

Time Zone Configuration

Hardware clock set to GMT (Default). Select the appropriate time zone.

Password setup

Enable MD5 and shadow(Default) passwords. Enter a root password, and setup a normal user account.

Debian System Configuration

Remove the PCMCIA (Default) packages.

Do not use a PPP connection (Default).

Apt Configuration

If the Debian CD was left in the drive it will automatically be added as an apt source, and there will be prompts for any additional cds. Additional cds can be added, however all packages can be downloaded from the Internet. Internet access is needed to install OpenNMS on Debian woody as the packages are not part of the official stable distribution. After adding cds (if this is preferred) add another apt source and select http as the method apt should use to access the Debian archive. Select the non-US, non-free and contrib package groups to make all Debian packages available (not necessarily installed).

Choose the country and mirror closest to the staging site. (also any proxy information if it is required). Add a second source if required. (Normally one is fine)

Use the security updates from security.debian.org when asked.

Debian System Configuration

When prompted to run tasksel select <No>.

When prompted to run dselect select <No>.

It is important to note that using dselect will introduce suggested and recommended dependencies that can lead to a level of package entropy that defeats the ease of management that apt provides.

At this point the required packages are queued for download, and the pcmcia packages will be removed. Accepting yes to the apt prompt Do you want to continue? will begin the download and configuration of any security updates.

Configuring Man-db

Have man and mandb setuid man for performance and dynamic updates.

The system will ask to erase the .deb (package files) for the programs installed. Accepting the default is fine, otherwise the installed packages are preserved locally in the /var/cache/apt.

Mail system configuration

Select option (1) if the system is capable of connecting to other mail servers directly using port 25. To pass outgoing mail thru another server select option (2). We will assume a direct Internet connection with no restrictions on port 25 use for the example in this documentation. Like all packages, the reconfiguration can take place later if the settings are initially incorrect. The mail configuration questions are quite verbose, so the following are a typical series of answers.

That's it. Enjoy a minimal Debian server configuration. For ssh, just apt-get install ssh. Other utilities and common packages to consider for a system to compliment the OpenNMS server are listed in the Debian Network Tools section.


Next Previous Contents