RedHat / CentOS Install and Configure Cacti Network Graphing Tool

https://‮al.www‬utturi.com
RedHat / CentOS Install and Configure Cacti Network Graphing Tool

To install and configure Cacti, a network graphing tool, on Red Hat Enterprise Linux (RHEL) or CentOS, follow these steps:

  1. Install the required packages. Cacti requires a web server, PHP, and a database server. If you do not already have these packages installed, you can install them using the following command:
sudo yum install httpd php mariadb-server
  1. Start and enable the web server and database server. Use the following commands to start the web server and database server, and configure them to start automatically at boot:
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb
  1. Create a database for Cacti. Use the following commands to log into the MariaDB database server and create a database and user for Cacti:
sudo mysql -u root
CREATE DATABASE cacti;
GRANT ALL ON cacti.* TO 'cactiuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Replace password with a strong password of your choice.

  1. Install Cacti. Download the latest version of Cacti from the official website (https://www.cacti.net/downloads/), and extract the files to the web server's document root (usually /var/www/html/).

  2. Configure Cacti. Open your web browser and navigate to http://localhost/cacti/install/, and follow the prompts to complete the installation. During the installation process, you will be asked to provide the database details you created in step 3 (database name, username, and password).

  3. Configure the Cacti cron job. Cacti uses a cron job to poll the devices on your network and update the graphs. To configure the cron job, open the crontab file for the Apache user (usually www-data) using the following command:

sudo crontab -u www-data -e

Then, add the following line to the end of the file to run the Cacti poller every 5 minutes:

*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

Save and exit the crontab file.

After completing these steps, Cacti should be installed and configured on your system. You can log into the Cacti web interface using the username and password you specified during the installation process.

Created Time:2017-10-30 14:27:15  Author:lautturi