Installing Ubuntu 10.04 LTS
The first step in this process I'm going to leave mostly to the reader and other HOWTOs as it in itself can be an entire post. Installing Ubuntu 10.04 LTS server requires going to Ubuntu's website to download an ISO copy of the installer for either i386 (32-bit) or x64(64-bit). Once downloaded burn the ISO to a CD or mount it to your VM and boot to CD. Take the defaults and don't install any of the server roles, except OpenSSH Server, at the end of the install to get a bare bones server system.
Installing the Prerequisite Ubuntu Packages for NMIS
Once you have a working system, login to the server either locally or via SSH. The first set of applications will be used later to compile other prerequisites.
sudo apt-get updateThe next group of packages are required to compile RRDTools which will be done later in the process.
sudo apt-get install autoconf automake gcc
sudo apt-get install libcairo2 libcairo2-dev \Packages for SNMP (Simple Network Management Protocol) are the next to be installed.
libglib2.0-dev libpango1.0-dev libxml2 libxml2-dev
sudo apt-get install snmp net-snmp-lib net-snmp-utils net-snmp-perlFinally we need to install the packages for the Apache webserver.
sudo apt-get install apache2
Installing RRDTool From Source for NMIS
The developers of NMIS recommend that you use RRDTool compiled from source instead of the Ubuntu maintained packages. This is a relatively straightforward process.
tar xzvf rrdtool.tar.gz
./configure --enable-shared --prefix=/usr/local/rrdtool
sudo make install
Installing Perl Packages from CPAN
NMIS uses several Perl packages that are maintained in the Comprehensive Perl Archive Network (CPAN). These packages can be installed using the CPAN module of Perl. In my instructions I include upgrading the CPAN module first because it sometimes helps to have the newest version. When you first open CPAN you can accept the defaults unless you need to setup an HTTP proxy
sudo perl -MCPAN -e "shell"Install NMIS
o conf prerequisites_policy follow
o conf commit
install CPAN::Bundle YAML
Now that we have the prerequisites out of the way it's time to install the NMIS application itself. You will have to go to Opmantek's website to download NMIS. While it is free, they do currently require you to register to get a link to download the newest version of NMIS. Once you have the link download the nmis-8.1.1.tar.gz file to your Ubuntu server and proceed as follows. The first step is to decompress the archive and copy the files into /usr/local.
tar xzvf nmis-8.1.1.tar.gzOnce the files are copied you will need to setup the nmis user and nmis group as well as add the www-data user to the nmis group. We also need to give proper permissions to the NMIS files.
sudo cp -Rpv nmis8/ /usr/local/
sudo cp -Rpv /usr/local/nmis8/install/* /usr/local/nmis8/conf/
sudo useradd nmis
sudo usermod -G nmis www-data
sudo chown -Rv nmis:nmis /usr/local/nmis8
sudo chmod -Rv g+w /usr/local/nmis8
Verifying NMIS is Installed
Once everything above is done, it is a good time to verify that the basic install process is done. You can do this by doing
sudo /usr/local/nmis8/cgi-bin/nmiscgi.plAs long as you get HTML output, all of the Perl prerequisites have been installed. If you get errors about missing modules, verify that they are installed via CPAN. The next verification is to run a check on the basic configuration.
sudo /usr/local/nmis8/bin/nmis.pl type=config debug=trueThis should result in something similar to the below output:
Next we will check to make sure that the NMIS update and collection scripts work by running them against the NMIS server.
NMIS Copyright (C) 1999-2011 Opmantek Limited (www.opmantek.com)
This program comes with ABSOLUTELY NO WARRANTY;
This is free software licensed under GNU GPL, and you are welcome to
redistribute it under certain conditions; see www.opmantek.com or email
NMIS version 8.1.1
Root directory of NMIS is /usr/local/nmis8
14:07:35 checkConfig, Config Checking - Checking database directories
Continue with bin/nmis.pl type=apache for configuration rules of the Apache web server
sudo /usr/local/nmis8/bin/nmis.pl type=update node=localhost debug=trueConfigure Apache for NMIS
sudo /usr/local/nmis8/bin/nmis.pl type=collect node=localhost \
Now that we know that NMIS is ready to answer the call, we need to setup Apache so that we can serve up the Web GUI for NMIS. NMIS provides a script to produce the proper Apache configuration.
sudo /usr/local/nmis8/bin/nmis.pl type=apache > 000-nmis
sudo mv /etc/apache2/sites-enabled/000-default \
sudo cp 000-nmis /etc/apache2/sites-enabled/000-nmis
sudo htpasswd /usr/local/nmis8/conf/users.dat admin
sudo /etc/init.d/apache2 restart
Verify NMIS Web Interface
Point your web browser (Firefox or IE work best, Chrome UI is buggy unfortunately) to http://yournmishost/cgi-nmis8/nmiscgi.pl and you should see something like this: