

---- NRG Requirements ----

- You must have perl.  Information about perl can be found at 
http://perl.com/.

- You must have a web server installed, configured and running.
The Apache web server can be found at http://www.apache.org/.

- You must have a full Net-SNMP v5 (or UCD-SNMP v4) install.
Currently NRG is developed using RedHat Enterprise Linux 3 (RHEL3)
with the net-snmp-5.0.9 and net-snmp-devel-5.0.9 RPMs.  Information
about Net-SNMP can be found at http://www.net-snmp.org/.

- You must have RRDtool installed.  Currently NRG is developed
tested under version 1.0.49.  Information about RRDtool can be
found at http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/.

- NRG usually installs on top of RRDtool.   Make sure the RRDtool
directory tree is owned by an ordinary (non-root) user so you can
install and operate NRG as an ordinary user.  Do this as root:

  find /usr/local/rrdtool-* -print | xargs chown your-login

- If you do not want to install NRG on top of RRDtool (eg because
you already have an existing RRDtool install), then simply build
and install RRDtool using "./configure --prefix=/usr/local/nrg"

- If you want to graph response times of TCP services, then you need
to install the Time::HighRes perl module.  NRG is developed using
the RHEL3 perl-Time-HiRes-1.38 RPM.  The source for Time::HiRes
can be found at http://www.cpan.org/.

- If you want to graph name service response times, then you need
to have "dig" (a program for doing domain name service queries.)
Dig is included in the RHEL3 bind-utils-9.2.4 RPM.  You can find
the source in the BIND contrib package, which can be found via
http://www.isc.org/

- If you want to graph Unix resource utilization (load average
memory use, virtual memory use, disk use), then you need to install
and configure Net-SNMP's snmpd on each Unix host.  Net-SNMP can be
found at http://www.net-snmp.org/.  Instructions for configuring 
Net-SNMP's snmpd can be found at L<net-snmp>.



---- NRG Build ----

- Do "./configure".  

- Build roverpingd:

    make pingd



---- NRG Install ----

- Make the symbolic link /usr/local/nrg that points to RRDtool:

    cd /usr/local
    ln -s rrdtool-1.0.x nrg

- Do "make install".

- By default, this will install NRG in the /usr/local/nrg
directory tree.  To install NRG somewhere else, use "./configure
--prefix=/somewhere/else".  (NRG assumes RRDtool is installed in
/somewhere/else, so you should have done/do the same ./configure
command for building RRDtool.)

- If you built roverpingd, then do "make install.pingd"

- Make a directory to hold your NRG web pages.  For stock Apache, 
try something like:

     mkdir /usr/local/apache/html/nrg
     chown yourlogin /usr/local/apache/html/nrg

If you have RedHat Linux, do:

     mkdir /var/www/html/nrg
     chown yourlogin /var/www/html/nrg

- For convenience, create a sym link that points /usr/local/nrg/web
at your web NRG pages:

     ln -s /some/path/to/html/nrg /usr/local/nrg/web

- Install the NRG images: 

     mkdir /usr/local/apache/html/nrg/icons
     cp images/* /usr/local/apache/html/nrg/icons
 
- Tell your web server to run as the same user that runs NRG: 

      vi /usr/local/apache/conf/httpd.conf # generic Apache or
      vi /etc/httpd/conf/httpd.conf        # RedHat linux specific
      # change "User something" to your unix login

- Tell your web server to execute .cgi files.  For Apache, add
the configuration string "AddHandler cgi-script .cgi" and restart
the httpd daemon:

     vi /usr/local/apache/conf/httpd.conf # generic Apache or
     vi /etc/httpd/conf/httpd.conf        # RedHat Linux specific

     # add the following...
     <Directory /path/to/html/nrg>
       Options ExecCGI
     </Directory>
     AddHandler cgi-script .cgi

- Tell your web server to expire .gif files so the auto-reloading 
of web pages works.  The known method for doing this is to use
Apache with mod_expires and the following configuration stuff:

     vi /usr/local/apache/conf/httpd.conf # generic Apache or
     vi /etc/httpd/conf/httpd.conf        # RedHat linux specific
     # add the following:
     <Files "*.gif">
       ExpiresActive On
       ExpiresDefault M5
     </Files>

- Restart your web server.  For Apache, do:

     apachectl restart     # generic Apache or
     service httpd restart # RedHat Linux specific

Now read the file "configuration"

