Install and Configure Cacti
- Extract
the distribution tarball.
shell>
tar xzvf cacti-version.tar.gz
- Create
the MySQL database:
shell>
mysqladmin --user=root create cacti
- Import
the default cacti database:
shell>
mysql cacti < cacti.sql
- Optional:
Create a MySQL username and password for Cacti.
5.
shell> mysql --user=root mysql
6.
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED
BY 'somepassword';
mysql>
flush privileges;
- Edit include/config.php and specify the database
type, name, host, user and password for your Cacti configuration.
8.
$database_type = "mysql";
9.
$database_default = "cacti";
10.
$database_hostname = "localhost";
11.
$database_username = "cactiuser";
$database_password
= "cacti";
- 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.
shell>
chown -R cactiuser rra/ log/
(Enter a valid username
for cactiuser, this user will also be used in the next step for
data gathering.)
- Add
a line to your /etc/crontab file similar to:
*/5
* * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Replace cactiuser with
the valid user specified in the previous step.
Replace /var/www/html/cacti/ with your full
Cacti path.
- Point
your web browser to:
No comments:
Post a Comment