## Installing NetSaint

Unpacking The Distribution

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

gunzip netsaint-0.0.7.tar.gz
tar xf netsaint-0.0.7.tar

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

unzip netsaint-0.0.7.zip

When you have finished executing these commands, you should find a netsaint-0.0.7 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...

./configure --prefix=prefix --with-cgiurl=cgiurl --with-htmurl=htmurl --with-netsaint-user=someuser --with-netsaint-grp=somegroup [ --enable-embedded-perl --with-perlcache ]

- Replace prefix with the actual directory that you created in the step above (default is /usr/local/netsaint)
- Replace cgiurl with the actual url you will be using to access the CGIs (default is /cgi-bin/netsaint). Do NOT append a slash at the end of the url.
- Replace htmurl with the actual url you will be using to access the HTML for the main interface and documentation (default is /netsaint/)
- Replace someuser with the name of a user on your system that will be used for setting permissions on the installed files (default is netsaint)
- Replace somegroup with the name of a group on your system that will be used for setting permissions on the installed files (default is netsaint)
- The --enable-embedded-perl option causes a PERL interpreter to be embedded into the Netsaint binary rather than being loaded every time a PERL script is executed. (PERL V5.004 or later preferred.)
- The --with-perlcache option causes the compiled version of all PERL scripts processed by the above embedded interpreter to be cached for reuse.

IMPORTANT: The --prefix argument of the configure script is very important, as it determines what directory everything gets installed under. If you do not supply this option, the configure script will use /usr/local/netsaint as the target directory. Make sure that this directory already exists on your system before attempting to install everything.

Compile NetSaint and the CGIs with the following command:

make all

Installing The Binaries And HTML Files

Install the binaries and HTML files (documentation and main web page) with the following command:

make install

Creating And Installing Sample Configuration Files

Sample main, host, resource, and CGI configuration files are automatically created in the root of the distribution directory when you run the configure script.

You can install the sample configuration files with the following command:

make install-config

Installing An Init Script

If you wish, you can also install the sample init script to /etc/rc.d/init.d/netsaint with the following command:

make install-init

Note: Previous versions of NetSaint included a "make install-daemoninit" command that was used to install an init script that launched NetSaint in daemon mode instead of a foreground process. Beginning with version 0.0.7, NetSaint now only includes the daemon init script, so both commands are equivalent.

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, host, resource, and CGI configuration files (netsaint.cfg, hosts.cfg, resource.cfg, and nscgi.cfg respectively)
sbin/ | CGIs
share/ | HTML files (for web interface and online documentation)
var/ | Empty directory for the log file

Notes:

1. The default hosts.cfg file created by the configure script will expect that all 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 install script supplied with the plugins (see below).

Installing The Plugins

In order for NetSaint to be of any use to you, you're going to have to download and install some plugins (they are usually installed in the libexec/ directory of your NetSaint installation). Plugins are scripts or binaries which perform all the service and host checks that constitute monitoring. You can grab the latest release of the plugins from the downloads page or directly from the SourceForge project page.

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. You'll also probably want to use the web interface, so you'll also have to read the instructions on installing the web interface and configuring web authentication, etc.