How to Install and Setup Cacti on Ubuntu 16.04

UbuntuNetworkserver

Cacti is a Network monitoring device that creates personalized graphs of server efficiency. It is accessed and managed via an online entrance-finish. This article explains on – How to install and set up cacti on Ubuntu.

Prerequisites

  • LAMP
  • SNMP, SNMPD and RRDtools

To install LAMP, add the following repository as shown below –

$ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'

To update the packages, using the following command –

$ sudo apt-get update

To install LAMP, use the following command –

$ sudo apt-get install apache2 mysql-server-5.6 php libapache2-mod-php

The sample output should be like this –

Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php is already the newest version (1:7.0+35ubuntu6).
php is already the newest version (1:7.0+35ubuntu6).
apache2 is already the newest version (2.4.18-2ubuntu3.1).
The following packages were automatically installed and are no longer required:
   libevent-core-2.0-5 linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
   linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
   linux-signed-image-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
   libdbd-mysql-perl libdbi-perl libmysqlclient20 libterm-readkey-perl
   mysql-client-5.6 mysql-client-core-5.6 mysql-server-core-5.6
Suggested packages:
   libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx tinyca
The following packages will be REMOVED:
........................................................................

While installing, it will ask to set up MySQL server root password as shown below –

To install SNMP, SNMPD and RRDtools, use the following command –

$ sudo apt-get install snmp snmpd rrdtool

The sample output should be like this –

Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   libaio1 libdbd-mysql-perl libdbi-perl libevent-core-2.0-5 libmysqlclient20
   libterm-readkey-perl linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
   linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
   linux-signed-image-4.4.0-31-generic mysql-client-5.6 mysql-client-core-5.6
   mysql-server-core-5.6
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
   libdbi1 librrd4
Suggested packages:
   librrds-perl snmptrapd
The following NEW packages will be installed:
   libdbi1 librrd4 rrdtool snmp snmpd
0 upgraded, 5 newly installed, 0 to remove and 19 not upgraded.
7 not fully installed or removed.
Need to get 775 kB of archives.
After this operation, 2,464 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libdbi1 amd64 0.9.0-4 [27.8 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 librrd4 amd64 1.5.5-4 [180 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 snmp amd64 5.7.3+dfsg-1ubuntu4 [154 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 snmpd amd64 5.7.3+dfsg-1ubuntu4 [57.1 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 rrdtool amd64 1.5.5-4 [356 kB]
.....................................................................................

To install Cacti, use the following command –

$sudo apt-get install snmpd cacti cacti-spine

While installing process, it will ask you to set up the webserver as shown in the below screenshot.

Select Apache2 and click on ok button by clicking the enter key. To configure database configuration, it will promote a screen as shown below.

By clicking on the Yes button, it will ask you a database password as shown below.

Enter your previous database password as given while installing LAMP and click on ok button.Now open your favorite browser and type the following URL as shown below.

http://localhost/cacti/install/

The sample output should be like this.

Click on the Next button, continue with the cacti installation.The following step should be as shown below

If you are a new installer, click on next button or else change the configuration and click on next button.The next following step should be as shown below.

In the above step, it contains the information about file paths.Now click on finish button. The next following step should be as shown below.

Now enter the default username and password as shown below

User name :admin
Password: admin

Now click on the login button, then it will ask to change the password as shown below –

Now enter a new password and click on the save button. The following is the screenshot which ould appear as the next step which looks like the below –

To create a graph, click on new graphs button as shown below –

Select choices according to the requirements and click on create button.

In this article, we have learnt – How to Install and Setup Cacti on Ubuntu 16.04, we will come up with more Linux based tricks and tips. Keep reading!.

raja
Published on 23-Jan-2020 11:05:17
Advertisements