aus ANOther Wiki, der freien Wissensdatenbank

 

Cacti ist ein Tool, welches verschiedenste Zustände in einem Netzwerk graphisch darstellen kann. Es nutzt dabei die Funktionen des http://oss.oetiker.ch/rrdtool/">rrdtool

Inhaltsverzeichnis

Bezugsquellen

Cacti kann direkt von der http://www.cacti.net/download cacti.php">cacti-Homepage bezogen werden.

Voraussetzungen

Cacti benötigt ausserdem folgende Software:

  1. RRDTool 1.0.48 oder höher
  2. MySQL 3.23 oder höher, wobei höher als 4.0.20d empfohlen wird
  3. PHP 4.1 oder höher, wobei höher als 4.3.6 empfohlen wird

http://www.debianhelp.co.uk/apacheinstall.htm">Apache mit php-Unterstützung wird ebenso vorausgesetzt

Installation

Unter Debian ist die Installation mit

# apt-get install cacti

denkbar einfach. So werden gleich die benötigten Pakete wie mysql und rrdtool mitinstalliert, sofern nötig

Nun müssen unter Umständen einige Zeilen geändert werden:

/etc/php4/apache/php.ini
extension=mysql.so
extension=gd.so
und
From /etc/apache2/apache2.conf
AddType application/x-httpd-php .php


Danach sollte ein cacti-User angelegt werden:

adduser cacti

Erstellen der MySQL-Datenbank

mysqladmin --user=root create cacti

Die default-Datenbank importieren:

gunzip /usr/share/doc/cacti/cacti.sql.gz
mysql cacti < /usr/share/doc/cacti/cacti.sql

Nun muss die /etc/cacti/debian.php angepasst werden:

$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";

Nun ein paar Rechte setzen

 chown -R cactiuser rra/ log/

wobei "cactiuser" ein gültiger user sein sollte

Nun noch einen Eintrag in die /etc/crontab

 */5 * * * * cactiuser php /usr/share/cacti/site/poller.php > /dev/null 2>&1

Wobei u.U. der User und der Pfad angepasst werden müssen

Nur noch vhost anpassen und fertig. Das erste Einloggen passiert mit admin/admin In den folgenden Seiten können einzelne Pfade noch einmal überprüft werden.

Weitere Infos

cacti-support-forum: http://forums.cacti.net/">http://forums.cacti.net/

off. Patches: http://www.cacti.net/download patches.php">http://www.cacti.net/download_patches.php

cacti-scripts: http://www.cacti.net/additional scripts.php">http://www.cacti.net/additional_scripts.php

screenshots: http://www.cacti.net/screenshots.php">http://www.cacti.net/screenshots.php

Upgrading Cacti to latest version

1. Backup the old Cacti database.

2. shell> mysqldump -l --add-drop-table cacti > mysql.cacti

Note: You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.

3. Backup the old Cacti directory.

4. shell> mv cacti cacti_old

5. Extract the distribution tarball.

6. shell> tar xzvf cacti-version.tar.gz

7. Rename the new Cacti directory to match the old one.

8. shell> mv cacti-version cacti

9. Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

10. $database_default = "cacti";

11. $database_hostname = "localhost";

12. $database_username = "cactiuser";

13. $database_password = "cacti";

14. Copy the *.rrd files from the old Cacti directory.

15. shell> cp cacti_old/rra/* cacti/rra/

16. Copy any custom scripts from the old Cacti directory.

17. shell> cp cacti_old/scripts/* cacti/scripts/

18. Set the appropriate permissions on Cacti's directories for graph/log generation. You should execute these commands from inside Cacti's directory to change the permissions.

19. shell> chown -R cactiuser rra/ log/

(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)

20. Point your web browser to: http://your-server/cacti/">http://your-server/cacti/>

If you need any help you can use cacti forums http://forums.cacti.net/">http://forums.cacti.net/