LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

How​ ​to​ ​Install​ ​Cacti​ ​Monitoring​ ​on​ ​Ubuntu​ ​16.04​ ​LTS

lowendtutorial

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.  

9 Comments

  1. A small description on what is cacti would be great. Wouldn’t hurt..i guess.

    November 20, 2017 @ 3:02 pm | Reply
  2. Chris E:

    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.

    November 21, 2017 @ 5:57 am | Reply
  3. 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..

    November 21, 2017 @ 2:15 pm | Reply
    • Still being actively maintained and updated to this day! They just released an update a few days ago even.

      Julian

      November 23, 2017 @ 12:28 am | Reply
  4. Bob:

    what is the best monitoring tool right now ?
    Zabbix … Nagios ?
    Thanks

    November 21, 2017 @ 10:23 pm | Reply
  5. I personally prefer Zabbix.

    November 23, 2017 @ 3:01 am | Reply
  6. Zabbix is pretty great tool for monitoring. Anyways, thanks for sharing.

    November 23, 2017 @ 7:31 am | Reply

Leave a Reply

Some notes on commenting on LowEndBox:

  • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
  • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
  • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

Your email address will not be published. Required fields are marked *