February 16, 2010

FreeBSD - Cacti

FreeBSD#  cd /usr/ports/
FreeBSD#  make search name="cacti"
Port:   cacti-0.8.7e
Path:   /usr/ports/net-mgmt/cacti
Info:   Web-driven graphing interface for RRDTool
Maint:  sem@FreeBSD.org
B-deps: mysql-client-5.0.86

FreeBSD# cd /usr/ports/net-mgmt/cacti
FreeBSD# make && make install && make clean

FreeBSD# mysql --user=root --password=RooT_ПАРОЛЬ --execute="CREATE DATABASE cacti"

FreeBSD# mysql --user=root --password=RooT_ПАРОЛЬ --execute="GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;"

FreeBSD# mysql --user=root --password=RooT_ПАРОЛЬ --execute="SET PASSWORD FOR 'cactiuser'@'localhost'=PASSWORD('cacti')"

FreeBSD# mysql --user=cactiuser --password=cacti --database=cacti < /usr/local/share/cacti/cacti.sql

FreeBSD# ee /etc/crontab
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1

FreeBSD# ee /usr/local/etc/apache22/Includes/cacti.conf

    Alias /cacti/ "/usr/local/share/cacti/"

    <(delete this) Directory "/usr/local/share/cacti">
        Options Indexes FollowSymlinks MultiViews
        AllowOverride AuthConfig
        Order deny,allow
        Allow from all
    <
(delete this)/Directory> 

FreeBSD# snmpwalk -c NAME_OF_COMMUNITY -v 1 localhost .

No comments:

Post a Comment