Cacti, SNMP and Gentoo

Here are the instructions I followed to get SNMP and Cacti working on Gentoo:

emerge cacti cacti-cactid
groupadd cacti
useradd -g cacti -G cron cactiuser

cd /var/www/localhost/htdocs/cacti/
mysql –user=root cacti < cacti.sql
chown -R cactiuser rra/ log/
mysql> create database cactidb;
mysql> grant all on cactidb.* to root;
mysql> grant all on cactidb.* to root@localhost;
mysql> grant all on cactidb.* to cactiuser;
mysql> grant all on cactidb.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password(‘mycactipw’);
mysql> exit

nano config.php

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "mycactipw";

Now open browser to http://localhost/cacti

Follow the steps:

Login as admin password admin
change password

Back to the command line

crontab -e -u cactiuser
*/5 * * * * /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1

nano -w /etc/snmp/snmpd.conf

com2sec local    public
com2sec local   public

group MyROGroup v1         local
group MyROGroup v2c        local
group MyROGroup usm        local

view all    included  .1                               80

access MyROGroup ""      any       noauth    exact  all    none   none

syslocation MyLocation
syscontact Me <>

/etc/init.d/snmpd start
rc-update add snmpd default

Should be all good!

This entry was posted in Computers and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *