install Debian4 and then start to install cacti
shell> apt-get install apache2
shell> apt-get install php4
shell> apt-get install mysql
shell> apt-get install snmpd snmp
shell> apt-get install php4-mysql
shell> apt-get install php4-snmp
shell> apt-get install php4-cli
shell> apt-get install rrdtool
shell> mysqladmin --user=root password "somepassword"
shell> mysqladmin --user=root --password reload
shell> wget cacti-latest-version.tar.gz "you can find it on www.cacti.net"
shell> tar -zxvf cacti-latest-version.tar.gz
shell> mv cacti /usr/local/cacti
shell> mysqladmin --user=root create cacti -p "Enter your mysql root password"
change your directory to cacti directory
shell> cd /usr/local/cacti
shell> mysql cacti < cacti.sql -p "Enter your mysql root password"
change your webserver config to listen .php files
Add index.php to the list of files that will be served as directory indexes.
Example:
vim /etc/apache2/conf.d/cacti.conf
Alias /cacti /usr/local/cacti
<DirectoryMatch /usr/local/cacti>
Options +FollowSymLinks
AllowOverride None
order allow,deny
allow from all
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag short_open_tag On
php_flag register_globals Off
php_flag register_argc_argv On
php_flag track_vars On
# this setting is necessary for some locales
php_value mbstring.func_overload 0
php_value include_path .
DirectoryIndex index.php
</IfModule>
</DirectoryMatch>


shell> mysql --user=root mysql -p "Enter your mysql root password"
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
mysql> exit
Edit <cacti-path> include/config.php
shell> vim /usr/local/cacti/include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipass";

shell> chown -R www-data rra/ log/
Edit crontab and add
*/5 * * * * cactiuser php /usr/local/cacti/poller.php > /dev/null 2>&1
shell> crontab -e
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Now you can browse cacti page and start to configure your cacti(username admin password admin)
have fun!







موضوعات مشابه: