summaryrefslogtreecommitdiff
path: root/net-mgmt/cacti88/files/pkg-message.in
blob: 0a16e3c5fca8758676c1b2eb6f56c3292840786f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
=======================================================================
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:

1. Create the MySQL database, a cacti user, and initialize:
   a) CREATE DATABASE cacti;
   b) Create a mysql user/password for cacti:
      CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password';
      FLUSH PRIVILEGES;
   c) Add GRANTS:
      GRANT ALL ON cacti.* TO 'cacti'@'localhost';
      FLUSH PRIVILEGES;
   d) Import the default cacti database:
      mysql --database=cacti -ucacti -p < %%PREFIX%%/%%CACTIDIR%%/cacti.sql

 NOTE:
   * Cacti does not LOCK TABLES.

2. Edit %%PREFIX%%/%%CACTIDIR%%/include/config.php from the template
   config.php.orig.

   PHP requires the time zone to be explicitly set rather that rely on
   the system time zone, otherwise poller complains. I added the
   following line to my config.php:

   date_default_timezone_set('America/Los_Angeles');

3. Add the following line to cron for %%CACTIUSER%%:
*/5 * * * * %%LOCALBASE%%/bin/php %%PREFIX%%/%%CACTIDIR%%/poller.php > /dev/null 2>&1

4. Example Apache 2.4 configuration:

   LoadModule php5_module  libexec/apache22/libphp5.so

   <FilesMatch "\.php$">
       SetHandler application/x-httpd-php
   </FilesMatch>
   <FilesMatch "\.phps$">
       SetHandler application/x-httpd-php-source
   </FilesMatch>

   DirectoryIndex index.php

   DocumentRoot "/usr/local/share/cacti"

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

   <Directory "/usr/local/share/cacti">
      Require all granted
      AllowOverride None
      Order Allow,deny
      Allow from all
   </Directory>

5. Open a Cacti login page in your web browser and login with
   admin/admin.

If you update cacti, open a login page and an updating process will
start automatically.

NOTEs as of 10Aug2014:

1) Cacti now better supports hier(7)

   a) Cacti log files are now found under /var/log/cacti where you can
      manage them using newsyslog.
   b) Cacti RRD files are now found under /var/db/cacti/rra.

   If you have an existing Cacti installation these paths are also
   found in Cacti's SQL database and MUST be updated. These two SQL
   commands should do the trick:

   UPDATE settings SET value='/var/log/cacti/log' \
     WHERE name='path_cactilog';

   UPDATE poller_item SET rrd_path=\
     REPLACE(rrd_path,'/usr/local/share/cacti/rra','/var/db/cacti/rra') \
     WHERE rrd_path REGEXP '^/usr/local/share/cacti/rra';

2) The PERL paths in the Cacti PERL scripts have been updated to
   /usr/local/bin.

Other Erratas:
Mount linprocfs in /compat/linux/proc will alow most scripts to work.

=======================================================================