Installing NetSaint


Unpacking The Distribution

To unpack the NetSaint distribution, type the following two commands at a shell prompt:

gunzip netsaint-0.0.4.tar.gz
tar xf netsaint-0.0.4.tar

If you downloaded the ZIP version of the distribution, type the following:

unzip netsaint-0.0.4.zip

When you have finished executing these commands, you should find a netsaint-0.0.4 directory that has been created in your current directory. Inside that directory you will find all the files that compromise the core NetSaint distribution.

Compiling The Binaries

Create the base directory where you would like to install NetSaint as follows...

mkdir /usr/local/netsaint

Run the configure script to initialize variables and create a Makefile as follows (replace the /usr/local/netsaint prefix with the actual directory that you created in the step above)...

./configure --prefix=/usr/local/netsaint

Note: If you plan on using the 'make install' command to install the binaries, config files, etc. you will have to have a user and group on your system called 'netsaint'. If you want the install script to set directory permissions using a different username or group, you will have to add the '--with-netsaint-user=SOMEUSER' and '--with-netsaint-grp=SOMEGROUP' arguments to the configure script command line. Replace SOMEUSER and SOMEGROUP with the appropriate user/group names on your system.

Compile NetSaint and the CGIs with the following command:

make all

Installing Everything

Install the binaries, config files, and HTML docs with the following command:

make install

Install the sample config files with the following command:

make install-config

Directory Structure And File Locations

Change to the root of your NetSaint installation directory with the following command...

cd /usr/local/netsaint

You should see five different subdirectories. A brief description of what each directory contains is given in the table below.

Sub-Directory Contents
bin/ NetSaint core program
etc/ Main and host configuration files (netsaint.cfg and hosts.cfg)
sbin/ CGIs programs and config file (nscgi.cfg)
share/ HTML files and images for web interface and documentation
var/ Empty directory for log files

Note: The default hosts.cfg file created by the configure script will expect that plugins reside in a libexec/ subdirectory off of your NetSaint installation. While this directory is not created by the install script distributed with NetSaint, it is created by the plugin install script. I would suggest manually creating a libexec/ subdirectory and moving any existing plugins you might have there for the time being.

Configuring The Web Interface

Release 0.0.4 differs from previous version, in that the HTML files and CGIs are no longer stored in a subdirectory off of /home/httpd/html. By default, HTML files in release 0.0.4 are stored in the share/ subdirectory of your NetSaint installation and the CGI binaries are stored in the sbin/ subdirectory. In order to make the HTML files and CGIs accessible via the web, you'll have to edit your Apache web server configuration as follows...

Add a line in the srm.conf file as follows (change to match the directory structure for you installation)...

Alias /netsaint/ /usr/local/netsaint/share/

This will allow you to use an URL like http://yourmachine/netsaint to view the HTML web interface and documentation.

You'll need to create an alias for the NetSaint CGIs as well. The default installation expects to find them within http://yourmachine/cgi-bin/netsaint, although this can be changed using options to the configure script. Anyway, add something like the following to your srm.conf file (changing it to match any directory differences on your system)...

ScriptAlias /cgi-bin/netsaint/ /usr/local/netsaint/sbin/

I've noticed that this line must precede the standard 'ScriptAlias /cgi-bin/ /some...where../' directive already in the configuration file. If it doesn't come before this line, you might not be able to access the NetSaint CGIs.

Once you've editing the Apache configuration file, you'll need to restart the web server with a command like this...

/etc/rc.d/init.d/httpd restart

Once you've gotten the web server restarted, there is just one minor thing you need to verify. Check the nscgi.cfg file in the sbin/ subdirectory of your NetSaint installation and verify that the configuration file variable points to the correct location of the main configuration file on your system. The CGIs will need to know this in order to find your current status log, history log, etc.

Don't forget to check and see if the changes you made to Apache work. You should be able to point your web browser at http://yourmachine/netsaint and get the web interface for NetSaint. The CGIs will complain about not being able to read the status log, but that will be remedied once you start running NetSaint.

Where To Go From Here

Okay, so you're done compiling and installing NetSaint. Now you can move on to configuring NetSaint before starting it up.