Download Extract the distribution tarball
Suse:/opt # wget http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
Suse:/opt # tar zxvf cacti-0.8.6j.tar.gz
2.
Create the MySQL database:
Suse:/opt # mysqladmin --user=root create cacti
3.
Import the default cacti database:
Suse:/opt/cacti-0.8.6j # mysql cacti < user="root"> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cacti';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quite
5.
Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
Suse:/opt/cacti-0.8.6j # vi include/config.php
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
$database_port = "3306";
6.
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.
Suse:/opt # mv cacti-0.8.6j /srv/www/htdocs/cacti
Suse:/opt # useradd cactiuser -d /srv/www/htdocs/cacti
7.
Add a line to your /etc/crontab file similar to:
Suse:/srv/www/htdocs/cacti # vi /etc/crontab
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1
8.
Point your web browser to:
http://10.100.113.138/cacti/index.php
9.
Install cacti patches
Access to http://www.cacti.net/download_patches.php
Be sure that you are in your Cacti directory when you execute these commands.
wget http://www.cacti.net/downloads/patches/0.8.6j/ping_php_version4_snmpgetnext.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/tree_console_missing_hosts.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/thumbnail_graphs_not_working.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/graph_debug_lockup_fix.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/snmpwalk_fix.patch
patch -p1 -N <> 10.
Install cactid
Download Cacti.tar.gz
Suse:/srv/www/htdocs/cacti # wget http://www.cacti.net/downloads/cactid/cacti-cactid-0.8.6i.tar.gz
Suse:/srv/www/htdocs/cacti # tar zxvf cacti-cactid-0.8.6i.tar.gz
Suse:/srv/www/htdocs/cacti # cd cacti-cactid-0.8.6i/
Suse:/srv/www/htdocs/cacti/cacti-cactid-0.8.6i # ./configure
encounter a error:
configure: error: cannot find SNMP headers. Use --with-snmp to specify non-default path.
It seems OpenSuse does not have SNMP headers within installtation DVD. Install cactid latter.
This article is referring Installation Guide for Unix/Linux from cacti.net
我在执行step2时出错,请问如何解决?
回复删除-bash: user=root: No such file or directory