In this tutorial, we will be covering how to install Cacti on a server running Ubuntu 16.04 LTS.
Cacti is supported on any type of virtualization platform (OpenVZ/XEN/KVM), so you can run
your monitoring server on a Low End VPS!
Step 1: It’s always good practice to first make sure everything on your Ubuntu system is up to
date.
sudo apt-get update
Step 2: Install LAMP (Linux, Apache, MariaDB, PHP) server.
Please keep in mind that Cacti only supports MySQL 5.6, whereas the current version in
the Ubuntu’s default repository is MySQL 5.7. In order to install this older version of
MySQL, follow the below steps:
nano /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu trusty universe
apt-get update
Now install the following packages for Cacti setup on your Ubuntu server with the help of
given below command:
apt-get install apache2 mysql-server-5.6 php libapache2-mod-php -y
Start the web server and MySQL server. Set them to automatically start up on server
boot:
systemctl start apache2.service
systemctl enable apache2.service
systemctl start mysql.service
systemctl enable mysql.service
Step 3: Installing the Cacti packages.
Install SNMP and SNMP and RRDtools:
apt-get install snmp snmpd rrdtool -y
Now use the following command to install Cacti:
apt-get install cacti cacti-spine -y
During the installation process you will be prompted to configure Cacti with few options to select
from available options. Choose the web server that you wish to use. I would recommend
Apache, which is what we will be using in this particular tutorial.
Next it will ask to configure the Cacti database, select Yes.
Once the installation process is complete, you will have to restart all services to reflect
the changes made:
systemctl restart apache2.service
systemctl restart mysql.service
systemctl restart snmpd.service
Step 4: Accessing cacti.
Cacti will be accessible on port 80 by default, this can be changed within your web server
configuration. As installation is now successful, you may proceed to navigate to
http://server-ip/cacti or http://server-hostname/cacti and complete the required the steps to finish
the installation. (replace server-ip with your server IP, or server-hostname to your server
hostname if you have set up a hostname that resolves back to your server IP)
Congrats! You have successfully installed Cacti. If you have any questions or comments,
comment below!
Special thanks to Julian Jin from AlphaRacks for sponsoring this tutorial.
- [CYBER MONDAY] VirMach VPS Huge deals as low as $4/year! - November 27, 2017
- [CYBER MONDAY] HudsonValleyHost – $4.99/mo 5GB OpenVZ (normally $20/mo) and 40% OFF select items! - November 27, 2017
- [CYBER MONDAY] YourLastHost – Shared Hosting Specials! - November 27, 2017
A small description on what is cacti would be great. Wouldn’t hurt..i guess.
Open source network monitoring: https://en.wikipedia.org/wiki/Cacti_(software)
Cacti is very old school at this point – in terms of what is current, for lots of information on Linux only hosts use netdata. If you need to archive this information look into the time series databases (netdata supports Prometheus). If you don’t need the granularity that netdata provides and/or you want to query other devices look into collectd on the Linux servers feeding something like influxdb (or the entire TICK stack) or Prometheus, with Prometheus or Grafana as the display.
Is it only me or does anyone else also thinks cacti is really old now? I mean it was launched in 2001 and its 2017 there are better options available as of the moment…. anyway that was my thought on this..
Still being actively maintained and updated to this day! They just released an update a few days ago even.
Julian
what is the best monitoring tool right now ?
Zabbix … Nagios ?
Thanks
Nagios out of the box doesn’t do what cacti does.
I personally prefer Zabbix.
Zabbix is pretty great tool for monitoring. Anyways, thanks for sharing.