Chapter 8. Installation Procedure

  1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory)

    cd /tmp
    wget http://www.netmrg.net/download/release/netmrg.tar.gz
    tar xzvf netmrg.tar.gz
    
  2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following:

    ./configure
    make
    make install
    

    Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options.

  3. Setup the database

    Now we need to setup the database. Please change at least the password (netmrgpass below).

    mysqladmin create netmrg
    mysql -u root -p netmrg < share/netmrg.mysql
    mysql -u root -p
    > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpass';
    
  4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf).

    The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles).

    Alias /netmrg "/usr/local/var/www/netmrg/webfiles"
    

    The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine).

    Include /usr/local/etc/netmrg.conf
    

    You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough

    killall -HUP httpd
    
  5. Configure the Installation

    All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation.

    For most installations, you will at least need to edit netmrg.xml to reflect your database username and password.

  6. Setup Permissions

    NetMRG does not need superuser permissions to run, therefore we will setup a user for it.

    # useradd netmrg
    # chown netmrg:netmrg /usr/local/var/log/netmrg
    # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd
    
  7. Setup crontab

    You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this:

    su netmrg
    */5 * * * * /usr/local/bin/netmrg_cron.sh
    exit
    

    To edit the master crontab, edit /etc/crontab and add a line similar to this:

    */5 * * * * netmrg /usr/local/bin/netmrg_cron.sh
    
  8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password!