blob: ef28e6efaabd91d58fcd28d4807d57b5f3d2f55f (
plain)
1 INSTALL:
2
3 1. Create the MySQL database:
4
5 shell> mysqladmin --user=root create cacti
6
7 2. Import the default cacti database:
8
9 shell> mysql cacti < cacti.sql
10
11 3. Optional: Create a MySQL username and password for Cacti.
12
13 shell> mysql --user=root mysql
14 mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
15 mysql> flush privileges;
16
17 4. Edit include/config.php and specify the MySQL user, password and
18 database for your Cacti configuration.
19
20 $database_default = "cacti";
21 $database_hostname = "localhost";
22 $database_username = "cactiuser";
23 $database_password = "somepassword";
24
25 5. Add a line to your /etc/crontab file similar to:
26
27 */5 * * * * cactiuser php /var/www/htdocs/cacti/poller.php > /dev/null 2>&1
28
29 Replace /var/www/htdocs/cacti/ with your full Cacti path.
30
31 6. Point your web browser to:
32
33 http://your-server/cacti/
34
35 Log in the with a username/password of admin. You will be required to
36 change this password immediately. Make sure to fill in all of the path
37 variables carefully and correctly on the following screen.
38
39 POST-INSTALL
40 #!/bin/sh
41
42 # change according your root password for mysql
43 pw=password
44
45 mysqladmin --user=root --password=$pw --force drop cacti
46 mysqladmin --user=root --password=$pw create cacti
47 mysql --user=root --password=$pw cacti < /var/www/htdocs/cacti/cacti.sql
48
49 echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '${pw}'" | mysql --user=root --password=$pw cacti
50 echo "flush privileges" | mysql --user=root --password=$pw cacti
51
52 sed -i -e "s|\$database_password = \"cacti\";|\$database_password = \"${pw}\";|g" /var/www/htdocs/cacti/include/config.php
|