Install Pandora FMS in Ubuntu 16.04 | 18.04

Install Pandora FMS Tool in Ubuntu 16.04 18.04

This post shows users and new students that how to Install Pandora FMS Tool in Ubuntu 16.04 | 18.04. If your are going to Install Pandora FMS Tool in Ubuntu then this post is ideal for you.

Pandora FMS is a flexible monitoring software for monitoring computer infrastructure(Network). It is open source and supports Windows, Linux and other operating systems.

For  more details about Pandora FMS, please visit its official Website.

Please follow below steps to start installing Pandora FMS Tool on Ubuntu :

Step 1: Install Apache2 HTTP Server

Run the below commands for install Apache2 HTTP on Ubuntu server

sudo apt update
sudo apt install apache2

Now use the below commands to stop, start and enable Apache2 service

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

For check if Apache2 HTTP server is installed or not, simply open your browser and type server IP or hostname.

If browser show result similar like below then Apache2 is installed and working properly.

http://localhost

install apache2 ubuntu

Step 2: Install MariaDB Database Server

Run the below commands for install MariaDB.

sudo apt install mariadb-server mariadb-client

Now use the below commands to stop, start and enable MariaDB service.

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

After above steps, run the below commands to secure MariaDB server

sudo mysql_secure_installation

After run above commands, answer the below questions.

  • Enter current password for root (enter for none): Just press the Enter
  • Set root password? [Y/n]: Y
  • New password: Enter password
  • Re-enter new password: Repeat password
  • Remove anonymous users? [Y/n]: Y
  • Disallow root login remotely? [Y/n]: Y
  • Remove test database and access to it? [Y/n]:  Y
  • Reload privilege tables now? [Y/n]:  Y

Now Restart the MariaDB server

For check if MariaDB is installed or Not, run the below commands to logon MariaDB server

sudo systemctl status mariadb.service

You will see similar result like below:

mariadb.service - MariaDB 10.1.44 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-03-05 12:14:17 CST; 1min 15s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 16048 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 27 (limit: 4666)
   CGroup: /system.slice/mariadb.service
           └─16048 /usr/sbin/mysqld

Mar 05 12:14:17 ubuntu1804 /etc/mysql/debian-start[16081]: information_schema
Mar 05 12:14:17 ubuntu1804 /etc/mysql/debian-start[16081]: mysql
Mar 05 12:14:17 ubuntu1804 /etc/mysql/debian-start[16081]: performance_schema

Now you will need MariaDB root account for setup Pandora FMS Tool.

sudo mysql -u root -p
USE mysql; 
UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Save it and exit.

FLUSH PRIVILEGES;
EXIT;

For install PHP 7.2-FPM, you will need to get it from third-party repositories.

Run the below commands to add third party repository

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Now update and upgrade it to PHP 7.2-FPM

sudo apt update

Run the below commands for installing PHP 7.2-FPM and its related modules.

sudo apt install php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-bcmath php7.2-xml php7.2-cli php7.2-zip php-php-gettext php-pear php7.2-zip php7.2-sqlite3 php7.2-snmp php-db graphviz php7.2-curl php7.2-ldap dbconfig-common

 Now, run the below commands for open PHP config file.

sudo nano /etc/php/7.2/apache2/php.ini

Changes the following below lines in the config file and save it.

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
max_input_vars = 1500
date.timezone = America/Chicago

Save the config file and close it.

Step 4: Install Perl and Supported Packages

For install SNMP and Perl packages for supporting Pandora FMS, Run the below commands:

sudo apt install snmp snmpd libnet-telnet-perl libgeo-ip-perl geoip-database-extra 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

Step 5: Install FMS with Console

Use and run the below commands to download Pandora FMS packages

cd /tmp
wget https://sourceforge.net/projects/pandora/files/Tools%20and%20dependencies%20%28All%20versions%29/DEB%20Debian%2C%20Ubuntu/wmi-client_0112-1_amd64.deb
wget https://sourceforge.net/projects/pandora/files/Pandora%20FMS%207.0NG/743/Debian_Ubuntu/pandorafms.console_7.0NG.743.deb
wget https://sourceforge.net/projects/pandora/files/Pandora%20FMS%207.0NG/743/Debian_Ubuntu/pandorafms.server_7.0NG.743.deb

After downloading above package, run the below commands to install additional packages.

sudo dpkg -i pandorafms.console_7.0NG.743.deb pandorafms.server_7.0NG.743.deb
sudo apt-get -f install

After successful installing, you will see a message with configuration settings like below

Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it.
Setting up pandorafms-server (7.0NG.743) ...
Linking pandora_exec...
Creating common Pandora FMS directories
Giving proper permission to /var/spool/pandora
Creating setup directory in /etc/pandora
Enabling start-up pandora & tentacle server daemons
Synchronizing state of pandora_server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable pandora_server
Synchronizing state of tentacle_serverd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable tentacle_serverd
Create the Cron script to run hourly Pandora DB tool
Please, now, edit the /etc/pandora/pandora_server.conf and launch the Pandora Server with /etc/init.d/Pandora .
Setting up php (1:7.2+60ubuntu1) ...

Now browse to the server hostname or IP address followed by /pandora_console like shown below:

http://localhost/pandora_console/install.php

After the open above link, read all instruction and follow the wizard by click on Next Button.

install pandora FMA ubuntu

Next step is to verify that all requirements are installed and continue by click on Next Button.

Pandora FMS Ubuntu

After above steps type the root password you have created above. This will create a database called pandora and continue by click on Next Button.

installing Pandora FMS

Now run the below commands to remove the installer script.

sudo rm /var/www/html/pandora_console/install.php

Now login in Pandora FMS Tool with the below username and password :

username: admin
password: pandora

Installing Pandora FMA Ubuntu

Now, you need to edit the server config file before

Run the below commands for open the server config file.

sudo nano /etc/pandora/pandora_server.conf

Now edit highlighted line to match database credential. Use same of used during the installation wizard.

# This must be the same credentials used by your Pandora FMS Console
# but could be different if your console is not running in the same
# host than the server. Check your console setup in /include/config.php

# dbname: Database name (pandora by default)
dbname pandora
# dbuser:  Database user name (pandora by default)
dbuser root
# dbpass: Database password
dbpass root_password

# dbhost: Database hostname or IP address
dbhost 127.0.0.1
# dbport: Database port number
# Default value depends on the dbengine (mysql: 3306)
#dbport 3306

Save the server config file and exit it.

Now run the below commands to restart Pandora FMS service.

sudo systemctl restart pandora_server.service

For check Pandora FMS status, run the below commands:

sudo systemctl status pandora_server.service>

After run the command you will see similar lines like below lines :

pandora_server.service - Pandora FMS server daemon
   Loaded: loaded (/lib/systemd/system/pandora_server.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-03-06 13:56:10 CST; 3s ago
  Process: 10151 ExecStart=/usr/bin/pandora_server /etc/pandora/pandora_server.conf -D (code=exited, status=0/SUCCESS)
 Main PID: 10155 (pandora_server)
    Tasks: 14 (limit: 4666)
   CGroup: /system.slice/pandora_server.service
           └─10155 /usr/bin/perl /usr/bin/pandora_server /etc/pandora/pandora_server.conf -D

Mar 06 13:56:09 ubuntu1804 systemd[1]: Starting Pandora FMS server daemon...
Mar 06 13:56:10 ubuntu1804 pandora_server[10151]: Pandora FMS Server 7.0NG.743 Build 200129 Copyright (c) 2004-2020 Artica ST
Mar 06 13:56:10 ubuntu1804 pandora_server[10151]: This program is OpenSource, licensed under the terms of GPL License version 2.
Mar 06 13:56:10 ubuntu1804 pandora_server[10151]: You can download latest versions and documentation at official web page.
Mar 06 13:56:10 ubuntu1804 pandora_server[10151]:  [*] Backgrounding Pandora FMS Server process.
Mar 06 13:56:10 ubuntu1804 systemd[1]: Started Pandora FMS server daemon.

That’s all

If you find any error and issue in above steps , please use comment box below to report.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top