Cacti is a free and open source network monitoring and graphing tool written in PHP. With the help of RRDtool (Round-Robin database tool), Cacti can be used to provide various useful features, including remote and local data collectors, graph templating, network discovery, device management automation, etc.

Install and configure Cacti: Install cacti from the zip distribution and install in the web root or your choice. RRDTool – Install from the Cacti website. Install it into the c: cacti directory. PHP 5.x – Install into the c: php folder. If you choose to install into c: Program Files php.

Prerequisites

  • A fresh Vultr CentOS 7 x64 server instance. Say its IP address is 203.0.113.1.
  • A sudo user.
  • The server instance has been updated to the latest stable status using the EPEL YUM repo.

Step 1: Setup an up to date LAMP stack

Before you can properly install and run Cacti, you need to setup a LAMP stack or an equivalent web operating environment.

The following will set up an up to date LAMP stack for Cacti, which consists of CentOS 7, Apache 2.4, MariaDB 10.2, and PHP 7.1. If you want to learn more details about the LAMP stack, or use another stack, please refer to other Vultr tutorials.

Step 2: Install other required dependencies

In addition to setting up a practical LAMP stack, you also need to install several dependencies for Cacti as follows.

Step 3: Prepare Cacti files and database

Download and decompress the Cacti 1.1 archive.

Move the Cacti files to a proper location, create the Cacti log file, and then grant proper permissions to them.

Import timezone info and Cacti data into the MariaDB database we setup earlier.

Setup Cacti parameters.

Use the vi editor to open the Cacti config file:

Make sure that the below parameters are using correct values.

Save and quit.

Setup a cron job for Cacti.

Populate the file with:

Save and quit.

Step 4: Setup an Apache virtual host for Cacti

In order to make Apache serve Cacti, you need to setup an Apache virtual host for Cacti as follows.

Note: Remember to modify the values of ServerAdmin, ServerName, and ServerAlias on your machine accordingly.

Restart Apache in order to put all your changes into effect.

How to install cacti on windows 10

Install Cacti On Windows Server 2016

Step 5: Update MariaDB settings

In order to provide better performance when using Cacti, you need to update several MariaDB settings with recommended values.

Backup the /etc/my.cnf file and then use the vi editor to open it:

Find the line [client-server], and append contents as shown.

Save and quit.

Restart MariaDB in order to put all your modifications into effect.

Step 6: Continue installing Cacti using the Cacti installation wizard in a web browser

Point your favorite web browser to http://203.0.113.1/cacti, and you will be brought into the Cacti Installation Wizard interface.

On the License Agreement page, check the Accept GPL License Agreement option, and then click the Next button.

On the Pre-installation Checks page, all requirements should be satisfied. Just click the Next button to move on.

On the Installation Type page, choose the New Primary Server option, and then click the Next button.

Installation

On the Critical Binary Locations and Versions page, ignore the Spine Binary File Location error since we did not install Spine at all. Just click the Next button to move on.

On the Directory Permission Checks page, make sure all specified directories are writable, and then click the Next button.

On the Template Setup page, check the Local Linux Machine option, and then click the Finish button to complete the installation and switch to the log in interface.

On the User Login interface, use the default username admin and the default password admin to log in.

After logging in, you will be asked to change the password immediately. Be sure to provide a strong password satisfying all prompted requirements.

That's all for installing and configuring Cacti. Later, you should setup RRDtool accordingly so that Cacti can obtain necessary data for graphing.