* docs: [1.2.x] refresh the manual front page The front page opened with version notes before saying what Cacti is, used headings as sentences in the credits, and its table of contents listed seven sections while the page has ten. Open with a short description and a getting-started sequence, link the website and forums, give the credits real headings, and list every section in the table of contents in page order. Record Jeff Pasnak under In Memoriam with a link to the 1.2.31 release announcement. Correct label typos and wrap long entries with reference links. Existing section anchors are unchanged, and every page is still linked. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] fix typos, unrendered headings and forum links A check of every page linked from the front page found misspellings in eleven pages, three Mactrack headings written without a space after the hashes, which render as plain text, and two forum links still using http. Correct the spellings, add the missing space so the headings render, and point the forum links at https, where they already redirect. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] align the plugin pages with the plugin READMEs The supported plugins list and the Syslog and Mactrack pages had drifted from the README and INFO files in the plugin repositories. Update the descriptions that the READMEs contradict: Monitor's Thold requirement, the Router Configs transfer methods, the ReportIt release and Cacti versions, the WMI collection methods and its development status, and NUT support in Apcupsd. Add the Syslog requirements, the upgrade procedure, the dedicated database settings and the remote collector settings, and correct the database grant and a misplaced code fence. Add the Mactrack requirements and a short section on history partitioning and ignored ports that links to the README. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] correct grammar, spelling and broken Markdown A read of every page linked from the front page found grammar and spelling errors throughout, and Markdown that does not render as intended. Correct grammar, spelling, punctuation and product-name capitalization in 95 pages without changing headings, code blocks, link targets or the meaning of the text. Repair the Markdown defects: a code fence in the SSH tunnel how-to that never closed, malformed bold markers in the user management and device defaults pages, a release notes table with no blank line before it, split rows in the tree sorting table, and LDAP list items missing their markers. Correct three interface labels quoted with typos. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] correct statements that differ from the 1.2.x source Reviewers of the linked pages flagged statements that looked wrong. Each was compared with the Cacti 1.2.x source at 1523aa04b, and only those the source or the page itself settles are changed. Correct interface labels and option names (Index Count Changed, Permissive, Not Selected, Utilities, the BCC description, the gear icon for plugin install), the default Maximum Value of U for a new data source item, the sysDescr object name, the PHP floor wording in the requirements table, the Mactrack wildcard character and the snmptrapd -On option. Repair cross-references, example values that disagree with their commands, two table captions, a split list and several sentences with missing words. Statements the source does not settle are left as written. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
14 KiB
General Installing Instructions
Use only the supported operating systems and maintained dependencies compatible with this Cacti branch.
Install the packages required by the selected operating system and verify that the configured web server, PHP handler, and database start at boot.
Required Packages for Most Operating Systems
Depending on your operating system and PHP version, certain packages are required for Cacti. The largest variable in these requirements comes with regard to PHP and MySQL/MariaDB.
Installation requirements include the packages below. The installation of these packages will vary by operating system.
Base OS
-
Apache, IIS, or nginx
-
net-snmp, net-snmp-utils
-
rrdtool
-
help2man (for Spine)
-
dos2unix (for Spine)
-
development packages (gcc, automake, autoconf, libtool, either mysql-devel or mariadb-devel, net-snmp-devel, help2man)
(for Spine)
Database
Use MySQL or MariaDB and check the installed version and configuration with the Cacti 1.2.31 installer. The release's historical compatibility values and version-dependent tuning checks are described in Requirements. MySQL 5.7 and MariaDB 10.2 are not upper-version limits established by those checks. Passing a configuration check does not certify every database version.
-
mysql
-
mysql-server
-
libmysqlclient
or
-
mariadb
-
mariadb-server
-
libmariadbclient
PHP Modules
The installation of these modules varies by OS. Use the php -m command to
verify that they are installed.
-
ctype
-
date
-
filter
-
posix (Unix only)
-
pcntl (Unix only)
-
com_dotnet (Windows only)
-
session
-
sockets
-
PDO
-
pdo_mysql
-
xml
-
simplexml
-
ldap
-
mbstring
-
pcre
-
json
-
openssl
-
gd
-
gmp
-
hash
-
intl
-
spl
-
standard
-
zlib
PHP Optional Modules
The following modules are optional, but preferred to be installed.
-
snmp
-
gettext
Systems using PHP-FPM
After changing PHP configuration, test and restart the actual FPM service.
Service names can be versioned, for example on Debian and Ubuntu. Check the
installed unit rather than assuming that php-fpm is the service name. Confirm
its socket path and permissions match the web-server handler.
FreeBSD
Use the FreeBSD Handbook to choose binary packages or ports and follow the installed package's notes. Inspect the offered Cacti version, PHP dependencies, database service, web integration, and configuration paths before installing. Do not assume a package contains a development revision.
For binary packages, review the proposed transaction first:
pkg install -n cacti
pkg install cacti
Install optional Spine separately if required. Do not mix ports and binary packages without reviewing dependency and build-option compatibility. Package dependencies alone do not configure the database or web server.
FreeBSD commonly installs third-party software under /usr/local. Adapt Linux
examples such as /etc/php.ini and /usr/bin/spine to the actual installed
paths. Grant ICMP privileges only when required by the selected collector and
package; do not apply a blanket setuid command to an unverified binary. Use
Upgrading Under FreeBSD for an existing
installation.
Configure PHP
Verify that the modules are installed and configured correctly. There are several ways to do so - consult PHP configuration instructions for a complete description.
It is imperative that you set the date.timezone in your /etc/php.ini, or
/etc/phpX/apache/php.ini and /etc/phpX/cli/php.ini files. Failure to do so
will result in errors after the install is complete.
Most other PHP configuration is done automatically by the base OS, so there is no need to discuss that here.
Configure the Webserver (Apache)
Use the distribution's Apache/PHP integration, selecting either its PHP-FPM handler or a compatible Apache PHP module. Do not configure both handlers for the same files. The Enterprise Linux LAMP guide and Ubuntu/Debian guide provide examples.
Verify Apache's configuration before reloading. Restrict access during setup,
use HTTPS, and ensure that PHP requests execute rather than expose source. Keep
Cacti's shipped .htaccess restrictions active, or reproduce them in the
server configuration if overrides are disabled. nginx and IIS need their own
restrictions; they do not interpret Apache .htaccess files.
Configure MySQL/MariaDB
Initialize and secure the database using the procedure for the installed MySQL or MariaDB package. Use the administrator authentication method configured by that package; some Unix packages use local socket authentication. Store credentials securely and do not put passwords directly on shell command lines.
You must also load timezone information into the database. This is required for
various plugin use. Later, you will be required to grant access to the
time_zone_name table during the final installation steps.
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Since Cacti 1.x is supporting internationalization (i18n), it is important that the default character set for MySQL/MariaDB be i18n compatible. The Cacti installer will make specific recommendations on MySQL/MariaDB settings. Follow those as applicable for your OS.
Galera clustering: There are several tables which are set to use the MEMORY storage engine which do not get replicated among nodes, which can cause problems. If you configure Cacti to only connect to one node of your cluster and are not load balancing this does not apply to you.
If you are running multiple nodes in a load-balanced environment where you connect to a VIP, you should remove all but one node from rotation during Cacti installation or update. After the installation/update, log in to your MySQL server and execute the following commands to update those tables to use the InnoDB engine:
MariaDB [(none)]> use cacti;
MariaDB [cacti]>> ALTER TABLE `automation_ips` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `automation_processes` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `data_source_stats_hourly_cache` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `data_source_stats_hourly_last` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `poller_output` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `poller_output_boost_processes` ENGINE=InnoDB;
MariaDB [cacti]>> ALTER TABLE `processes` ENGINE=InnoDB;
Before restoring database load balancing, verify the table-engine changes, replication state and successful polling on the configured topology. A fixed number of polling cycles is not proof that the cluster is ready.
Install and Configure Cacti
These are fresh source-install examples for Cacti 1.2.31. Package-managed
installations should use the maintainer's procedure instead. For an existing
installation, follow Upgrading Cacti. The examples use
/var/www/html/cacti; adjust that path and the service accounts for your OS.
Use administrator privileges for software installation and permission changes.
Extract the source and create the database
Extract the intended release into the installation directory. Do not run these commands over an existing deployment:
tar -xzf cacti-1.2.31.tar.gz
mv cacti-1.2.31 /var/www/html/cacti
The installation root should now contain cacti.sql, poller.php and
include/config.php.dist, rather than another nested release directory.
Connect with a database administrator account:
mysql --user=root --password
Create the database and a dedicated application account. Replace the password placeholder before running this SQL, and use the same secret in the Cacti configuration. The database account is separate from the operating-system account that runs the poller.
CREATE DATABASE cacti CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'cactiuser'@'localhost'
IDENTIFIED BY 'REPLACE_WITH_UNIQUE_DATABASE_PASSWORD';
GRANT ALL PRIVILEGES ON cacti.* TO 'cactiuser'@'localhost';
GRANT SELECT ON mysql.time_zone_name TO 'cactiuser'@'localhost';
EXIT;
Use an authorized database administrator to grant access. Do not edit
mysql.tables_priv as a substitute for an authorized GRANT operation. Ensure
the server's timezone tables are populated using the procedure for the
installed MySQL or MariaDB server; granting access does not populate them.
Import the schema into the new database using the appropriate client:
mysql --user=root --password --default-character-set=utf8mb4 cacti \
< /var/www/html/cacti/cacti.sql
The --password option prompts for the password. Use mariadb in place of
mysql where appropriate for the installed server.
Configure access and complete installation
Copy the supplied configuration example:
cp /var/www/html/cacti/include/config.php.dist \
/var/www/html/cacti/include/config.php
Edit the copied file to match the account created above:
$database_type = 'mysql';
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cactiuser';
$database_password = 'REPLACE_WITH_UNIQUE_DATABASE_PASSWORD';
$database_port = '3306';
$url_path = '/cacti/';
Identify the actual web and poller service accounts. Give them the required read/execute access to application files and external tools, and write access to the runtime paths they use, including RRD, log and cache paths. They need not be the same account. Do not assume a database username is also a local OS account or make the whole application tree writable.
During installation and package imports, grant the performing identity the additional access required by the installer, including query/script resources and the location used to initialize the CSRF secret. Remove temporary setup permissions afterward. Preserve read access to the generated secret; do not create an empty secret file. See the platform-specific installation guides for their account and permission examples.
Restrict installer access to the administrator and use HTTPS or a protected
local connection before entering credentials. A freshly imported 1.2.31 schema
uses application username admin and initial password admin. Open the
configured Cacti URL, sign in and choose a unique administrator password when
prompted. These are separate from the database credentials. Complete the
installer's dependency, database, path and permission checks before allowing
general access.
Schedule collection after installation
Use either cron or cactid.service, not both. The following examples assume an
existing local user and group named cacti with the required polling
permissions; replace them with the actual service identity for your system. Do
not start polling before completing the web installer.
For a system cron file such as /etc/cron.d/cacti, use an absolute PHP CLI
path and include the OS username:
*/5 * * * * cacti /usr/bin/php /var/www/html/cacti/poller.php >/dev/null 2>&1
The five-minute launch interval must match Cron/Daemon Interval under the
poller settings. This is separate from individual data-source polling
intervals. The redirection above works with /bin/sh; &> is Bash-specific.
The supplied systemd unit uses Type=forking. Confirm that the selected PHP
CLI provides pcntl_fork before using it; otherwise use cron or install the
appropriate PCNTL support. For the example CLI path, this should report
bool(true):
/usr/bin/php -r 'var_dump(function_exists("pcntl_fork"));'
For systemd, copy the supplied unit and edit the installed copy:
cp /var/www/html/cacti/service/cactid.service \
/etc/systemd/system/cactid.service
Replace the unit's existing User, Group, ExecStart and EnvironmentFile
settings with values for the actual deployment, retaining its other settings.
For example:
User=cacti
Group=cacti
ExecStart=/usr/bin/php /var/www/html/cacti/cactid.php
EnvironmentFile=-/etc/default/cactid
The - allows the optional environment file to be absent. Disable the
Cacti-specific cron entry before enabling the daemon, then load the edited
unit:
systemctl daemon-reload
systemctl enable cactid.service
systemctl start cactid.service
systemctl status cactid.service
The unit manages the local daemon; it does not establish high availability. Verify scheduler execution, collector status, logs and recent graph data under the configured account.
(Optional) Install and Configure Spine
Spine is a very fast data collection engine, written in C. It is an optional replacement for cmd.php. If you decide to use it, you will have to install it explicitly. It does not come with Cacti itself.
The easiest way is to install Spine using rpm or ports. You will find packages for Spine at the main Cacti site or from your distribution.
To compile Spine, download it to any location of your liking. Then, issue the following commands from the downloaded directory:
./bootstrap
After bootstrap succeeds, follow the release's build instructions to
configure, compile and install Spine.
Assuming you've managed to install Spine correctly, you will have to configure
it. Use the installed spine.conf.dist as the example, and configure the
actual Spine configuration path in Cacti. Use the same database account and
secret as the Cacti configuration, and restrict file access to the poller
account and administrators.
DB_Host localhost
DB_Database cacti
DB_User cactiuser
DB_Pass REPLACE_WITH_UNIQUE_DATABASE_PASSWORD
DB_Port 3306
Considerations when using Proxies in front of Cacti (Cacti 1.2.23+)
A header allowlist does not authenticate a proxy. Trust forwarded client-IP
headers only when a trusted proxy replaces those headers and untrusted clients
cannot bypass it to reach Cacti directly. Leave forwarding disabled otherwise.
In include/config.php, select only the headers your proxy sets. For a
deployment using X-Forwarded-For, the setting is:
$proxy_headers = ['X-Forwarded-For'];
Copyright (c) 2004-2026 The Cacti Group