NOCWizard Live Help Accept Decline Close
 
  Downloads
  Install Instructions
  Get a Key
  EULA
  Changelog
   
  RTG Installation
   
 

Latest Release:
VERSION 3.1.0 RC1
View ChangeLog

Released on
13 NOVEMBER 2005
Download Now
 
Our typical online Hours are from 10:00 AM EST
to 6:00 PM EST
HOME DOWNLOADS RTG INSTALL INSTRUCTIONS 0.7.4

Ok, unlike NOCWizard, RTG can be a bear to install. Below I've compiled what you need to do in order to get it to work. Most of this information is right off the install documentation on the RTG website, just in an easier to read format.

PREREQUISITES
INSTALLATION
MODIFYING APACHE
RTG SQL DATABASE


PREREQUISITES (these must be installed and running prior to installation of RTG) [TOP]

RTG comes as C source code and is intended to run on UNIX systems. RTG requires a UNIX system with POSIX thread support, 64-bit long integers and a sane compiler (gcc works great). RTG requires two external packages:

- MySQL (http://www.mysql.com/)
- Net SNMP (http://net-snmp.sourceforge.net/)

RTG can also use the older UCD SNMP, but we recommend sticking with Net SNMP.

To use the built in reports and configuration generators and to generally get the most out of RTG, it is strongly recommended that you also install:
- Apache (http://www.apache.org)
- PHP (http://www.php.net)
- Perl DBI (http://www.mysql.com/downloads/api-dbi.html)


INSTALLATION [TOP]

Install or make sure it's installed:

CGILIB
ZLIB (needs to be installed PRIOR to instaling LIBPNG)
LIBPNG
GD

Thes files are included with RTG but I've usually had to go download the latest versions from the websites. The above are links to the actual website.

  1. Create a database for RTG and then assign a user to that database. I suggest using a Control Panel or PHPmyadmin. You'll need the username, database name and password for later steps.
  2. Once you've done step one above, import the database below to create the initial tables
  3. Change to the /tmp directory and wget the program OR FTP and move the .tar.gz file here
  4. $ tar -zxf rtg-x.y.tar.gz
    $ cd rtg-x.y/
    $ ./configure
    $ make
    # make install
  5. Once you've done this, copy the RTG folder from the /usr/local directory and place it in your NOCWizard main directory, this is the directory that has the include directory in it. This step is NOT manditory, but we do suggest it.
  6. Copy all the files from the BIN directory, inside the RTG directory to the WEB directory.
  7. CHMOD all the files in the WEB directory to 777 (chmod 777 *)
  8. Inside the WEB folder there is a COMMON.PHP.
    1. Edit that and change the top lines to reflect your database information.
    2. There are 4 lines that read something like $configs[]. Change the second one to reflect the path to your config file. It will be something like /home/username/www/nocwizard/rtg/etc/rtg.conf
  9. Inside the WEB folder copy RTGPLOT to RTGPLOT.CGI
  10. Inside the ETC folder there is RTG.CONF
    1. Edit the database lines to reflect the database for RTG
    2. Copy the modified RTG.CONF file into the WEB directory
  11. Edit the ROUTERS file in the ETC folder and enter your switch(s)/router(s) information
  12. You now need to create the database tables for the database you created in step 1 above. I suggest that you just import the code below into the database using phpmyadmin.
  13. Once you've done all the above steps, run rtgtargmkr.pl to populate the database. This can be done by typing perl rtgtargmkr.pl or ./rtgtargmkr.pl

Once you've done all these steps, you should be ready to have RTG start polling for information. The following line (and it is ONE line, it wordwraps here) is what's needed to make the poller start polling.

/home/username/www/nocwizard/rtg/bin/rtgpoll -c /home/username/www/nocwizard/rtg/etc/rtg.conf -t /home/username/www/nocwizard/rtg/etc/targets.cfg -v

!!! NOTE !!! Anytime you run rtgtargmkr.pl you will need to restart rtgpoll.


MODIFYING APACHE [TOP]

I can tell you first hand that if you don't do the following, you'll get red X's for all your graphs inside of NOCWizard and inside of RTG itself.

  1. Add "SetEnv LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib/mysql" to httpd.conf (Or wherever your MySQL libraries are found), without the quotes.
  2. Uncomment (or possibly add) "AddHandler cgi-script .cgi" in httpd.conf
  3. Add "ExecCGI" to the htdocs Options statement in httpd.conf
  4. Uncomment (or possibly add) "AddType application/x-httpd-php .php"
  5. Restart apache

Several of the above may already be there, but from what I've found, Step 1 is never in the httpd.conf file. Once you do


RTG DATABASE SQL CODE [TOP]

#
# Table structure for table 'router'
#

CREATE TABLE router (
rid int(11) unsigned NOT NULL auto_increment,
name char(120) NOT NULL default '',
pop char(10) NOT NULL default '',
popid tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (rid)
);

#
# Table structure for table 'interface'
#

CREATE TABLE interface (
id int(11) unsigned NOT NULL auto_increment,
name char(255) NOT NULL default '',
rid int(11) NOT NULL default '0',
speed bigint(11) default NULL,
description char(255) default NULL,
status enum('active','inactive') default 'active',
PRIMARY KEY (id)
);

#
# Table structure for table 'ifInOctets'
#

CREATE TABLE ifInOctets (
id int(11) NOT NULL default '0',
dtime datetime NOT NULL default '0000-00-00 00:00:00',
counter bigint(20) NOT NULL default '0',
KEY ifInOctets_idx (dtime)
);

#
# Table structure for table 'ifOutOctets'
#

CREATE TABLE ifOutOctets (
id int(11) NOT NULL default '0',
dtime datetime NOT NULL default '0000-00-00 00:00:00',
counter bigint(20) NOT NULL default '0',
KEY ifOutOctets_idx (dtime)
);

#
# Table structure for table 'ifInUcastPkts'
#

CREATE TABLE ifInUcastPkts (
id int(11) NOT NULL default '0',
dtime datetime NOT NULL default '0000-00-00 00:00:00',
counter bigint(20) NOT NULL default '0',
KEY ifInUcastPkts_idx (dtime)
);

#
# Table structure for table 'ifOutUcastPkts'
#

CREATE TABLE ifOutUcastPkts (
id int(11) NOT NULL default '0',
dtime datetime NOT NULL default '0000-00-00 00:00:00',
counter bigint(20) NOT NULL default '0',
KEY ifOutUcastPkts_idx (dtime)
);

#
# Table structure for table 'ifInErrors'
#

CREATE TABLE ifInErrors (
id int(11) NOT NULL default '0',
dtime datetime NOT NULL default '0000-00-00 00:00:00',
counter bigint(20) NOT NULL default '0',
KEY ifInErrors_idx (dtime)
);

Copyright © 2004 NOCWizard
AFFILIATES
Budget Web Hosting - Cheap Web Hosting - Webmaster Resources - Dedicated Headquarters
DataCenter Discussion - Game Server Search