Enable MySQL by adding the following to /etc/rc.conf:
mysql_enable="YES"Start MySQL:
# /usr/local/etc/rc.d/mysql-server startLock down MySQL by adding a password for the MySQL root account:
# mysqladmin -u root password $NEW_PASSWORD_HEREFlush the MySQL Privileges:
# mysqladmin flush-privilegesRun the RTG setup script:
# /usr/local/etc/rtg/createdb $MYSQL_ROOT_PASSWORD
Edit the routers file to contain an entry pointing to your router:
192.168.1.1:public:32Run rtgtargmkr.pl to create the targets file:
# ./rtgtargmkr.pl Poking 192.168.1.1 (public) (32 bit)... No router id found for 192.168.1.2...adding. No id found for VLAN1 on device 1...adding. No id found for FastEthernet0/1 on device 1...adding. No id found for FastEthernet0/6 on device 1...adding. No id found for FastEthernet0/7 on device 1...adding. No id found for FastEthernet0/8 on device 1...adding. No id found for FastEthernet0/12 on device 1...adding. No id found for FastEthernet0/13 on device 1...adding. No id found for FastEthernet0/14 on device 1...adding. No id found for FastEthernet0/23 on device 1...adding. No id found for FastEthernet0/24 on device 1...adding. Done.
Create a /usr/local/etc/rtg/run file containing:
#!/bin/sh exec /usr/local/bin/rtgpoll -v -c /usr/local/etc/rtg/rtg.conf -t /usr/local/etc/rtg/targets.cfgChange the run file to be executable:
chmod +x /usr/local/etc/rtg/runCreate a /usr/local/etc/rtg/log directory:
mkdir /usr/local/etc/rtg/logCreate a /usr/local/etc/rtg/log/run file containing:
#!/bin/sh exec multilog t ./mainChange the run file to be executable:
chmod +x /usr/local/etc/rtg/log/runLink /usr/local/etc/rtg to the /service/rtg:
ln -s /usr/local/etc/rtg /service/Configure svscan to start by adding the following to /etc/rc.conf:
svscan_enable="YES" svscan_servicedir="/service"Create the /service directory for svscan:
mkdir /serviceCheck to see if RTG is running, by running:
# svstat /service/rtg/ /service/rtg/: up (pid 6544) 28 seconds