cacti for Debian ---------------- originally written by Thorsten Sauter Fri, 3 Sep 2004 11:25:28 +0200 last edited by sean finney Fri, 06 Jan 2006 08:07:46 +0100 ---------------- * viewing graphs causing zombie mysql processes? If this happens, take a look at the solutions given in http://bugs.debian.org/344519. * ERROR: Garbage ':33:09 To 2005/10/27 08:33:09\c' after command: If you get this, it's probably because you just upgraded rrdtool, which changed its output format between versions and cacti is still trying to parse it using the old versions' output. If you go into your cacti settings, you will see an option to change the version of rrdtool you have installed, which should solve your problem. * installation note that cacti now uses automatic configuration via dbconfig-common. however, if you've chosen to go the manual route, the following information may be helpful. using the username and password you provided in debconf (and stored in the cacti config file /etc/cacti/debian.php), create a database and load up the cacti skeleton. assuming you chose a database and user both named 'cacti': mysql -u root -p -e "create database cacti" mysql -u root -p -e "grant all privileges on cacti.* to cacti@localhost identified by 'yourpasswordhere'; flush privileges" zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u cacti -p cacti next, go to http://$yourhost/cacti/, and follow the on-screen directions. the default login is admin/admin. once automagical configuration is brought back into cacti, this will probably change to something better. * Upgrading from recent versions of cacti (>= 0.8.x) There is a special directory install/ available, which contains some basic php scripts to upgrade your current database to the new version of cacti. Normally, this should happen automatically. If not, simply point your browser to your cacti installation: http://$yourhost/cacti/install At some point the automatic upgrade feature will return, but not now. * Upgrading from old cacti versions (<= 0.6.x) The database structure has changed between version 0.6.x and 0.8.x. To make cacti working again, you must create a new database, and import the cacti database configuration. You can do this with the following commands. Please replace "cacti" with your database name. Maybe you must also specify an host name (-h host). # backup the old database $ mysqldump -u root -p cacti | gzip -9 - >/tmp/cacti-old.gz # delete and create the database again $ mysqladmin -u root -p drop cacti $ mysqladmin -u root -p create cacti # import the database structure $ zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u root -p cacti optionally, if you have lots and lots of data and it's critically important to keep it, you can try the following, which i've had work on smaller test installations: - downgrade to the previous 0.6.x version of cacti in woody. - download version 0.6.8a from the old cacti repository: http://www.cacti.net/downloads/archive/ - extract the tarball in /usr/local/cacti, configure config.php. - change your Alias to point /cacti/ at this directory - go to http://$yourhost/cacti/install/ and do the 0.6.7->0.6.8a upgrade - turn off cron (or at least the cronjob for cacti) - back up your current database, load a copy into a database called cacti-old. truncate the old database. - repeat the described upgrade process to go from 0.6.8a to 0.8. you'll be asked for an "old database" and a "new database". this is where things will either work or not work. - remove these two cacti directories in /usr/local - install the latest version of cacti from sarge/sid - point your apache config back where it should - go to http://$yourhost/cacti/install/ and cacti should take you the rest of the way to the current version. - turn the cronjob back on note that i haven't tried this on a large scale, it takes quite a bit of effort, and i can't guarantee it will work. sorry :/ i would like at some point to offer some automated (or at least cmdline) programs to help automate this, but my first priority is to get the next upstream release out the door. i've already done some work on this, if you're interested in helping out, send me an email. * PHP command line scripts: If you install the php4-{cli,cgi} package _after_ the php4-mysql package, there will be no entry for the mysql extension in this file. To fix this, you can run the following command and select the cgi interface also: # dpkg-reconfigure php4-mysql You need to enable mysql support for apache, cli and/or cgi. Depending on your configuration. * Apache2 support If you would like to use cacti with apache2 you need to install the php4 package for apache2: libapache2-mod-php4. After this you need to enable the mysql and snmp extension for php4. # cd /etc/php4/apache2/ # grep -q mysql.so php.ini || echo "extension=mysql.so">>php.ini # grep -q snmp.so php.ini || echo "extension=snmp.so">>php.ini (Please note the two ">>" signs) * PHP short tags problem in /etc/cacti/debian.php Previous versions of cacti create the debian.php file with short php tags '