Next Previous Contents

3. Installing OpenNMS on Debian Sarge

This process is based on the ONMS 1.2.X packages for Debian Sarge. All the installation operations should be performed as the root user. For a detailed account of the package installation output, please see the appendix containing the Installation Transcript. There is also an appendix showing the installed packages after completing this process on a minimal system.

3.1 Add OpenNMS to the apt sources and update Sarge

  1. Edit your /etc/apt/sources.list to include the OpenNMS apt server. A typical sources.list file with the OpenNMS source as the last line might look similar to this:
    deb http://mirror.direct.ca/linux/debian/ stable main non-free contrib 
    deb http://security.debian.org/ stable/updates main contrib non-free
    deb http://debian.opennms.org/ /debian/opennms stable
    
     
    

    This particular /etc/apt/sources.list contains no deb-src lines (for downloading package source files) or deb cdrom: lines (for downloading packages from a distribution cdrom). These lines are often part of the default apt configuration, and are unecessary if you plan on using the Internet as your package installation source (recommended) and are not planning on modifying and recompiling packages (developers only). The deb cdrom: lines can cause particular annoyance when they prompt you to insert specific cds into your drive when attempting package installations. Details on obtaining the package source for OpenNMS can be found in the OpenNMS apt sources section.

  2. Update the known package lists:
    bash#apt-get update
    
     
    

    Look for output lines similar to the following to indicate a sucessful update of the OpenNMS sources:

    Get:1 http://debian.opennms.org debian/opennms/stable Packages [4706B] 
    Get:2 http://debian.opennms.org debian/opennms/stable Release [92B] 
    
     
    

    If you have already performed this action, a re-execution of the command will indicate a sucessful match to the previously downloaded OpenNMS source list:

    Hit http://debian.opennms.org debian/opennms/stable Packages 
    Hit http://debian.opennms.org debian/opennms/stable Release
    
     
    

    A successful package list update will be followed by two lines of output with no error or warning messages:

    Reading Package Lists... Done 
    Building Dependency Tree... Done 
    
     
    

    Any error output here must be dealt with before proceeding. Often this related to unavailable sources, or typos in the /etc/apt/sources.list file. Feel free to simply cut and past the above list if you are having trouble here.

  3. Upgrade your system to ensure the lastest in security updates:
    bash#apt-get upgrade
    
     
    

    You will be prompted to accept packages upgrades. Generally speaking, you can hit enter a few times here to bring a system up to the latest versions. For more information on the Debian

If you would like more information on using Apt and Debian package managment, please see the APT HOWTO .

3.2 Download and Install Sun J2SDK 1.4.2

At the time this document was created, the J2SDK version was 1.4.2_11. Use the latest 1.4.2 available for OpenNMS 1.2.X.

  1. Install some package building prerequisites (and the lynx web download tool).
    bash#apt-get install java-common gcc bzip2 lynx make sun-jdk1.4-installer
    
     
    

Depending on your existing configuration, some of these packages may exist already. On a minimal system, several additional packages will be added to support dependencies as shown above.

  1. Download the Java .bin file using the lynx web browser. Instructions are below for those new to the lynx interface.
    bash#lynx http://java.sun.com/j2se/1.4.2/download.html
    
     
    
    1. On this initial page, accept the cookie (press y), and navigate down the page using the pgdown key, or by pressing the down arrow about 45 times to the Download J2SE SDK link and select the link using the Enter key.
    2. You make get a SSL error:Can't find common name in certificate-Continue? (y) prompt a during the next steps. Just hit the y key if you see this. Do not wait too long to press (y), as timeouts can occur quickly forcing a restart of step (a).
    3. On the following page (Download Center) navigate using the pgdown key, or by pressing the down arrow about 16 times to the Continue link and select the link using the Enter key. This accepts the license agreement, and leaves you on the same page.
    4. On the same page, having accepted Sun's license agreement, navigate using the pgdown key, or by pressing the down arrow about 15 times to the Download Now! self-extracting file j2sdk-1_4_2_11-linux-i586.bin 34.63 MB link and select it using the Enter key.
    5. Press d to download the binary file. Once the download is complete, navigate with the down arrow to the Save to disk link and press Enter twice to save the downloaded file to the local disk. Type q to exit.
  2. Move the downloaded Java .bin (from Sun's J2SDK 1.4.2 Archive) into /usr/src.

    With version 1.4.2_11 on Sun's website, the filename passed to lynx contains some extra characters, so the filename is renamed with the first command below and then moved into /usr/src with the second.

    bash#mv j2sdk-1_4_2_11-linux-i586.bin\&File\=j2sdk-1_4_2_11-linux-i586.bin j2sdk-1_4_2_11-linux-i586.bin 
    
    bash#mv j2sdk-1_4_2_11-linux-i586.bin /usr/src
    
     
    


  1. Build and install the Sun JDK
    bash#build-sun-jdk14 /usr/src/j2sdk-1_4_2_11-linux-i586.bin 
    
    Unpacking the archive ... done
    Building debian package, please be patient ... done
    Success! You may now install the j2sdk1.4 package located in the
    current directory.
    
    bash#dpkg -i j2sdk1.4_1.4.2-1_i386.deb 
    
    Selecting previously deselected package j2sdk1.4.
    (Reading database ... 10164 files and directories currently installed.)
    Unpacking j2sdk1.4 (from j2sdk1.4_1.4.2-1_i386.deb) ...
    Setting up j2sdk1.4 (1.4.2-1) ...
    
     
    


3.3 Install OpenNMS 1.2

  1. Install the OpenNMS packages
    bash#apt-get install opennms opennms-doc opennms-contrib tomcat4-webapps tomcat4-admin
    
     
    

    The PostgreSQL installation will prompt for a few default settings. Hit Enter to accept the defaults.

  2. Modify the Postgres configuration to allow the opennms and posgres user access to the opennms database.
    bash~# vi /etc/postgresql/pg_hba.conf
    
     
    

    In this file, the configuration appears at the bottom after a number of comments. It is simpliest to replace the configuration with the following lines which allow access from the local system and authenticated. Access for the postgres and opennms users is required for OpenNMS installation and operation.

    # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
    local all all trust
    host all all 127.0.0.1 255.255.255.255 trust
    host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
    
     
    

    Restart the Postgres Database

    bash~# /etc/init.d/postgresql restart
    
     
    

  3. The following command creates the OpenNMS database structures
    bash#/usr/share/opennms/bin/install.pl -disU
    
     
    


Next Previous Contents