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.
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
Notes:
Compile NetSaint and the CGIs with the following command:
make all
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
If you wish, you can also install the sample init script to your /etc/rc.d/init.d directory with the following command:
make install-init
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 |
Notes:
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 the --with-cgiurl option in 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 CGI configuration file (nscgi.cfg) in the sbin/ subdirectory of your NetSaint installation and verify that the main_config_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 should 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.