Quick Install DataGrapher

Introduction

The Package ist prepered for Debian GNU Linux.
If you use some other Unix system you have to
pay attention to the packages and path names.

Requirements

Modul Debian Package/CPAN
Log::Log4perl (liblog-log4perl-perl)
HTML::Template (libhtml-template-perl)
HTML::TreeStructured (cpan> install HTML::TreeStructured)
Net::SNMP (libnet-snmp-perl)
DBI (libdbi-perl)
DBD::Mysql (libdbd-mysql-perl)

Download (binary)

Download the binary installation Package from:

http://sourceforge.net/project/showfiles.php?group_id=166467

Start installation (binary)

After download you could chose if you make the DataGrapher_0.1.sh
executable and run it then (1) or if you run it with the sh command.(2)

(1)
# /home/dg: chmod u+x DataGrapher_0.1.sh
# /home/dg: ./DataGrapher_0.1.sh

(2)
# /home/dg: sh DataGrapher_0.1.sh

you will get the following output:

##############################################################################
# The DataGrapher Project - Copyright (C) 2004 - 2006 by Lars Wildemann #
# Tool : DataGrapher - Next Generation Version 2.0 #
# Author: Lars Wildemann #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
##############################################################################

creating Temp Directory..
extracting Files...
start installing...

This is the Directory where all the subdirs modules and other stuff is
storred. (i choose a homedir cause i have no space left elsewhere)
for a debian standard apache installation the default dir will be right.

Target Directory [/var/www/DataGrapher]: /home/dg/dataGrapher

The apache group is the group under which the apache server runs under.
If you don't know under which user you apache runs you could find out with:
grep "^Group" /etc/apache/httpd.conf or ps -eo group,args | grep 'httpd\|apache'
and then grep for the group id in /etc/group.

Apache Group [www-data]: wwwusers
copying files...
.....
checking if all Directories exists...
....

Checking for RRDTool...
RRDtool 1.0.49 Copyright 1997-2004 by Tobias Oetiker

Creating Configfile Template...

straightening rights...

Checking for Perl Modules...
........

Done!

Now, please configure your Webserver and your Database.
Look in '/home/dg/dataGrapher/doc' for examples
At last accommodate the Config File '/home/dg/dataGrapher/etc/dataGrapher.conf' to your environment

Have a lot of fun

Now it should look like this:

# /home/dg: ls
dataGrapher DataGrapher_0.1.sh
# /home/dg: cd dataGrapher
# /home/dg/dataGrapher: ls
cgi-bin data doc etc html logs modules spool tools
# /home/dg/dataGrapher:

Now you have to configure you apache server
if you could use virtual hosts this should be the configuration you could use:

#datagrapher

RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
ServerAdmin webmaster@yourowndomain.com
ServerName datagrapher.yourowndomain.com
DocumentRoot /home/dg/dataGrapher/html
ErrorLog /var/log/httpd/vhosts/dataGrapher.yourowndomain.com-error_log
CustomLog /var/log/httpd/vhosts/dataGrapher.yourowndomain.com-access_log common
CustomLog /var/log/httpd/vhosts/dataGrapher.yourowndomain.com-combined_log combined
ScriptAlias /cgi-bin/ /home/dg/dataGrapher/cgi-bin/


Options +ExecCGI
AllowOverride AuthConfig
Order allow,deny
allow from all



The documenation for a non virtualhost configuration is a todo.
If you now type into you browser: http://datagrapher.yourowndomain.com you should see gui from datagrapher.
There is also a configuration example for a virtual server in the $Installdir/doc directory called
config_apache.txt

Now you have to add a user and database to your mysql database.
$Installdir/dataGrapher/etc/dataGrapher.conf there you see the defaults:
DBHOST = localhost # Hostname of your Database
DBNAME = DataGrapher # Name of the Database
DBUSER = dataGrapher # Name of the Database User
DBPASS = geheim! # Password if the Database User

You should change the password.
In the $Installdir/dataGrapher/doc dir is also an
create_mysql.sql script which adds database and user to the mysql database.
After the database is ready you have to add a crontab entry for the dataCollector:
Crontab entry:
*/5 * * * * /home/dg/dataGrapher/tools/dataCollector-ng.pl 1>/dev/null

Have fun.
If you need help with adding the first device or createing the first graph maybe the
UserGuide Documentation will help You. You could also ask questions in the DataGrapher
Project Forum on Sourceforge or write a email to ulf(at)liesdiemanpage(dot)de