QNAPedia Community Wiki

Skip to content

Cacti

From QNAPedia

Jump to: navigation, search

Contents

Introduction

Cacti is a web-based utility that graphs interesting statistics of unlimited network hosts using SNMP.

This is a copy more or less of http://forum.qnap.com/viewtopic.php?f=32&t=21218

Preparation

Log into your QNAP with SSH.

# ipkg install rrdtool
# ipkg install net-snmp
# ipkg install php-mysql
# ipkg install mysql
# ipkg install perl
# ipkg install patch

Grab the latest Cacti

# wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz

Extract the downloaded file and put the extracted files in a new directory:

# tar -zxvf cacti-0.8.7e.tar.gz
# cd /share/MD0_DATA/.qpkg/
# mkdir cacti
# mv /root/cacti-0.8.7e/* cacti

Do Some Patching

# wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
# wget http://www.cacti.net/downloads/patches/0.8.7e/cross_site_fix.patch

# cd cacti
# patch -p1 -N < cli_add_graph.patch

(in my case i got on the first patch a error (1 out of 1 hunk ignored -- saving rejects to file cli/add_graphs.rej))

Add Cactigroup and a Cacti User

The groupname will be cactigrp and the user will be cacti

# addgroup cactigrp
# adduser -h /share/MD0_DATA/.qpkg/cacti -s /bin/false -G cactigrp cacti

Configure MySQL server

(to check use phpMyAdmin) password would be sqladmin with

# mysqladmin -u root -p status

You will find out if it is already running
if not

# /opt/bin/mysqld_safe &
# mysql -u root -p sqladmin<br>create the new Database
# mysqladmin -u root -p create CACTIDB

add the fresh datas

mysql -u root -p CACTIDB < /share/MD0_DATA/.qpkg/cacti/cacti.sql
Personal tools
Language