Port details on branch 2025Q1 |
- cacti Web-driven graphing interface for RRDTool
- 1.2.28 net-mgmt =0 1.2.28Version of this port present on the latest quarterly branch.
- Maintainer: m.muenz@gmail.com
- Port Added: 2025-01-17 16:51:06
- Last Update: 2025-01-17 16:47:51
- Commit Hash: a3784b1
- Also Listed In: www
- License: GPLv2+
- WWW:
- https://www.cacti.net/
- Description:
- Cacti is a complete frontend to RRDTool, it stores all of the necessary
information to create graphs and populate them with data in a MySQL database.
The frontend is completely PHP driven. Along with being able to maintain
Graphs, Data Sources, and Round Robin Archives in a database, cacti handles
the data gathering. There is also SNMP support for those used to creating
traffic graphs with MRTG.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - Dependency lines:
-
- To install the port:
- cd /usr/ports/net-mgmt/cacti/ && make install clean
- To add the package, run one of these commands:
- pkg install net-mgmt/cacti
- pkg install cacti
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: cacti
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1737039609
SHA256 (cacti-1.2.28.tar.gz) = 4a095821a9435e1b9c8294e709365f67e59dd7696c3f3feffa9cd9ace1d8cea7
SIZE (cacti-1.2.28.tar.gz) = 46785888
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Runtime dependencies:
-
- rrdtool : databases/rrdtool
- php.h : lang/php83
- ctype.so : textproc/php83-ctype
- filter.so : security/php83-filter
- gd.so : graphics/php83-gd
- gettext.so : devel/php83-gettext
- gmp.so : math/php83-gmp
- intl.so : devel/php83-intl
- ldap.so : net/php83-ldap
- mbstring.so : converters/php83-mbstring
- pcntl.so : devel/php83-pcntl
- pdo.so : databases/php83-pdo
- pdo_mysql.so : databases/php83-pdo_mysql
- posix.so : sysutils/php83-posix
- session.so : www/php83-session
- simplexml.so : textproc/php83-simplexml
- sockets.so : net/php83-sockets
- snmp.so : net-mgmt/php83-snmp
- xml.so : textproc/php83-xml
- zlib.so : archivers/php83-zlib
- Library dependencies:
-
- libmysqlclient.so.21 : databases/mysql80-client
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- net-mgmt_cacti
- USES:
- cpe mysql php:web shebangfix
- pkg-message:
- For install:
- Cacti is now installed. If you install 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';
GRANT SELECT ON `mysql`.`time_zone_name` TO 'cacti'@'localhost';
FLUSH PRIVILEGES;
d) Import the default cacti database:
mysql --database=cacti -ucacti -p < /usr/local/share/cacti/cacti.sql
If you haven't already imported your MySQL timezone data, you need to do this:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
NOTE:
* Cacti does not LOCK TABLES.
2. Edit /usr/local/share/cacti/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 cacti:
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
4. Example Apache 2.4 configuration:
(This assumes that you have installed a working PHP Apache install, e.g. with mod_php)
<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 follow the install instructions.
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:
1) Mount linprocfs in /compat/linux/proc will allow most scripts to work.
2) This package does not install a MySQL server in case you wish to use an
external MySQL server. Install a package such as mysql57-server if you
require a local server.
- If upgrading from < 1.2.4:
- Starting with version 1.2.4 the option SNMPBIN is no longer required and has
therefore been removed.
Now you can enable PHP integrated support via the "$php_snmp_support" variable
in config.php
- Master Sites:
|