Install Quickstart

1. Download and Explode

Download the latest stable (or development if you're feeling lucky) tarball from the download page.

Extract it:

tar -xvzf freenats-XX.YY.ZZ.tar.gz

2. Move it where you like

The web folder needs to be web-accessible. If you mess with the structure (e.g. the base directory is not in the same location as the web folder) you must edit the include.php in the folder (e.g. in the web or bin) and point to the base directory.

3. Setup the database

Setup a database for FreeNATS to use (and a user etc for it to access it with), and then edit the base/ file to include these credentials.

4. Set it all up

Navigate to http://your-freenats-uri/firstrun.php (note: you may find the file is called firstrun-.php in which case rename it to firstrun.php).

Follow the instructions in the browser to initialise the database schema and initial settings.

Afterwards rename firstrun.php to firstrun-.php to avoid script-kiddies messing with your setup.

5. Setup scheduled jobs

Now setup a cron job to run the tests (do the actual monitoring!). This may vary a little depending on your system but the following is pretty Linux-common. The tester needs to run as root (or needs extensive workarounds not detailed here).

  • Create a /etc/cron.minute folder
  • Put a file in there called freenats-tester with the following contents (assuming your FreeNATS server/bin directory is in /opt/freenats/server - otherwise modify as needed):
    cd /opt/freenats/server/bin
    ./ 2>&1 > /dev/null
  • Make that executable: chmod 755 /etc/cron.minute/freenats-tester
  • Make the script fire every minute by appending the following to your /etc/crontab file:
    * * * * * root run-parts /etc/cron.minute
  • Create a cleanup script in /etc/cron.daily called freenats-cleanup containing:
    cd /opt/freenats/server/bin
    ./ 2>&1 > /dev/null
  • Make that executable: chmod 755 /etc/cron.daily/freenats-cleanup

6. Victory!

Navigate to http://your-freenats-uri/ and off you go, happy monitoring!

More details

Have a look at the full install wiki page.