adplus-dvertising
4.7 C
Amsterdam

How To Install Pandora FMS Monitoring Tool On Ubuntu 20.04

- Advertisement -

In this guide you’ll learn that how to install Pandora FMS Monitoring Tool on Ubuntu 20.04. Pandora FMS(Flexible Monitoring System) is a monitoring tool that can be used for servers,networks,apps & virtual infrastructure. It is the simple, scalable & easy tool for complex & larger organizations. Pandora uses various protocols like HTTP, TCP, UDP,SNMP to collect informations. With the help of this tool you can monitor the status & performance of Web Servers, database servers, apps, routers & many other network devices.

Step 1: Update Your System

First of all update your system to have the latest packages installed.

sudo apt update -y
sudo apt upgrade -y

Server IP = 51.222.106.194
Server  Hostname =  pandora.osradar.com

And hit the given command to install the required dependencies.

sudo apt install snmp snmpd libnet-telnet-perl libgeo-ip-perl libtime-format-perl libxml-simple-perl libxml-twig-perl libdbi-perl libnetaddr-ip-perl libhtml-parser-perl xprobe2 nmap libmail-sendmail-perl traceroute libio-socket-inet6-perl libhtml-tree-perl libsnmp-perl snmp-mibs-downloader libio-socket-multicast-perl libsnmp-perl libjson-perl -y

Once the update finished, reboot your system.


Step 2: Install LAMP Server On Ubuntu 20.04

Fire the following command to install apache, mariaDB, PHP & the other necessary dependencies.

sudo apt install apache2 mariadb-server php php-common php-gmp php-curl php-mbstring php-xmlrpc php-mysql php-gd php-bcmath php-xml php-cli php-zip php-pear php-zip php-sqlite3 php-snmp php-db graphviz php-curl php-ldap dbconfig-common unzip git -y

After finishing the installation, edit the php.ini file.

And do the following changes.

memory_limit = 256M
 upload_max_filesize = 100M
 max_execution_time = 360
 max_input_vars = 2000
 date.timezone = Karachi/Asia

Step 3: Configure MariaDB Server On Ubuntu 20.04

Hit the below command to configure MariaDB server on Ubuntu 20.04.

sudo mysql_secure_installation

Provide the answers to asked questions.

Restart Mariadb daemon

systemctl restart mariadb

And login to the MariaDB by typing

mysql -u root -p

Enter the root password configured above to login to MariaDB. And type the below command to enable the mysql_native_password plugin.

USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Now create a new database with the following details.

CREATE DATABASE pandora;
 GRANT ALL PRIVILEGES ON pandora.* to pandora@'localhost' IDENTIFIED BY 'pandora';
 FLUSH PRIVILEGES;
 EXIT;

And edit the /etc/mysql/my.cnf file & declare the sql_mode.

sudo nano /etc/mysql/my.cnf

Then add the below data.

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

Save & exit the file.

Then restart MariaDB server.

sudo systemctl restart mariadb

Step 4: Download Pandora FMS On Ubuntu 20.04

Switch to the /var/www/html/ directory by typing

cd /var/www/html/

And then clone the latest version of Pandora by hitting.

sudo git clone https://github.com/pandorafms/pandorafms.git

Then type the following commands to set the proper permissions to the downloaded directory.

sudo chown -R www-data:www-data /var/www/html/pandorafms
sudo chown -R www-data:www-data /var/www/html/pandorafms/pandora_console/
sudo chmod -R 775 /var/www/html/pandorafms/pandora_console/

Next, edit the Pandora config file by typing

sudo nano /var/www/html/pandorafms/pandora_console/include/config.inc.php

Then uncomment & change the given lines as per your requirements.

// Default values
  $config["dbname"]="pandora";
  $config["dbuser"]="pandora";
  $config["dbpass"]="pandora";
  $config["dbhost"]="localhost";
 // This is used for reporting, please add "/" character at the end
 // $config["homedir"]="/var/www/pandora_console/";
 // $config["homeurl"]="/pandora_console/";
  $config["auth"]["scheme"] = "mysql";

And then save & exit the file.

Step 5: Configure Apache for Pandora FMS

Now, create a new virtual host config file for apache to configure it with Pandora FMS.

sudo nano /etc/apache2/sites-available/pandora.conf

Then add the below lines into the file.

<VirtualHost *:80>
 ServerAdmin admin@example.com
 ServerName localhost
 DocumentRoot /var/www/html/pandorafms/pandora_console
<Directory /var/www/html/pandorafms/pandora_console>
 AllowOverride All
 </Directory>
 ErrorLog /var/log/apache2/error.log
 CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Finally save & exit the file. And enable the config file by

sudo a2ensite pandora

Then restart the Apache.

sudo systemctl restart apache2

Step 6: Access Pandora FMS On Ubuntu 20.04

Type http://IP or http://hostname in your browser in order to access Pandora. You’ll see the Pandora web installation wizard.

Press “Next”. A new page will be open.

Accept License.

Verify that all requirements are met and press “Next.

Provide DB details & click :Next“.

As it’ll change the pass of Pandora DB user. Hit the below command to declare your origonal password.

sudo nano /var/www/html/pandorafms/pandora_console/include/config.php

And change the “$config[“dbpass”]” with your origonal pass.

// Begin of automatic config file
$config["dbtype"] = "mysql"; //DB type (mysql, postgresql…in future others)
$config["mysqli"] = true;
$config["dbname"]="pandora";
$config["dbuser"]="pandora";
$config["dbpass"]="pandora";
$config["dbhost"]="localhost";

Fianlly save & exit the file.

Run the below command in termianl to remove the install.php file.

sudo rm -rf /var/www/html/pandorafms/pandora_console/install.php

Adn press “Click here to access to your Pandora FMS console” on web interface to access Pandora dashboard.

user:admin
pass:pandora

Provide default details to login & you’ll be redirected to the Pandora FMS dashboard.

Step 7: Secure Pandora FMS with Let’s Encrypt

As for security reasons it is recommended to use SSL. We’ll use Let’s Encrypt SSL for this purposes to access Pandora securely. Run the given command to get certbot certificates.

sudo apt install python3-certbot-apache -y

After installing certbot, type the below command to get SSL for your domain.

certbot --apache -d pandora.osradar.com

And then provide the asked details.

Now, you can access Pandora via HTTPS.

So, this is how you can install Pandora FMS On Ubuntu 20.04

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Donate to Osradar

Latest article