How to Install Cacti on Ubuntu 14

Try it in our public cloud & Get $5 Credit

Cacti is an RRDTool front-end that handles data collection and storage. With Cacti installed, you can retain network performance data and other metrics in a MySQL database for advanced querying and reporting. Cacti also handles data rotation, helping you to keep data long-term while continuing to access your most current data more quickly.

In addition to its own standard commands for performance monitoring, Cacti lets you integrate external scripts, calling them via cron and feeding their results into any plots it generates. As such, it is a great monitoring solution for both standard and custom metrics. This guide will set up Cacti on your Ubuntu 14.04 LTS server, giving you a solid monitoring solution based on a reliable server platform with years of remaining support available.

Getting Started

To complete this guide, you will need the following:
• 1 Remote server (Cloud Server or Dedicated Server) running Ubuntu 14.
• All commands should be run as the root user
• A LAMP stack using Apache and PHP


Let’s get started. Cacti requires that you have a few additional packages in order for it to run. We’ll begin by ensuring that Cacti’s dependencies are available.

apt-get install rrdtool snmp snmpd -y

Having done this, it’s now time to install Cacti itself.

apt-get install cacti cacti-spine -y

The installation process prompts you to answer a few questions. We’ll go through these below.

As you are running on a LAMP stack, Apache2 is your web server. Choose that when asked which server you are using.

You’ll also need a database. The Cacti installer can set this up for you, so answer Yes when it prompts you to configure the database.

The installer will need your MySQL root password to create the database, set up the schema, and add the necessary database user for Cacti to connect. Give it your root password in order for it to make the necessary changes.

You’ll also need to choose a MySQL password for the Cacti database. Be sure to pick a good password and to record it in a safe place. You likely won’t use this much, but changing it later if it is forgotten will be a pain.

Now you’ll want to start the snmpd service. This gives you a standard means of querying Cacti for the metrics it records.

/etc/init.d/snmpd start

To finish the installation, visit Cacti’s web-based installer. Find it at http://your_ip/cacti. The default credentials are as follows:

login: admin
password: admin

Be sure to change these upon logging in. If you do not, anyone who finds your Cacti installation can connect and compromise it.


You now have a flexible, extensible monitoring system tracking your server’s statistics. Monitoring is an important aspect of any reliable network infrastructure, so share this article with anyone you know who might benefit from the features your new Cacti installation provides. If you found this article helpful, feel free to share it with your friends and let us know in the comments below!