• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

Monitoring Server: Install Zabbix on an Ubuntu 16.04 Server

August 5, 2020 by Martin6


 

Monitoring Server – What is Zabbix

Zabbix is an enterprise-class open source distributed monitoring server solution. The software monitors different parameters of a network and the integrity of a server, and also allows the configuration of email based alerts for any event. Zabbix offers reporting and data visualization features based on the data stored in a database (MySQL, for example). Every metric collected by the software is accessible through a web-based interface.

Zabbix is released under the terms of the GNU General Public License version 2 (GPLv2), totally free of cost.

In this tutorial we will install Zabbix on an Ubuntu 16.04 server running MySQL, Apache and PHP.

Install the Zabbix Server

First, we’ll need to install a few PHP modules required by Zabbix:

# apt-get install php7.0-bcmath php7.0-xml php7.0-mbstring

The Zabbix package available in the Ubuntu repositories is outdated. Use the official Zabbix repository to install the latest stable version.

Install the repository package by executing the following commands:

$ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
# dpkg -i zabbix-release_3.2-1+xenial_all.deb

Then update the apt packages source:

# apt-get update

Now it’s possible to install Zabbix Server with MySQL support and the PHP front-end. Execute the command:

# apt-get install zabbix-server-mysql zabbix-frontend-php

Install the Zabbix agent:

# apt-get install zabbix-agent

Zabbix is now installed. The next step is to configure a database for storing its data.

Configure MySQL for Zabbix

We need to create a new MySQL database, in which Zabbix will store the collected data.

Start the MySQL shell:

$ mysql -uroot -p

Next:

mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON zabbix.* TO [email protected] IDENTIFIED BY 'usr_strong_pwd';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> EXIT;
Bye

Next, import the initial schema and data.

# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix

Enter the password for the zabbix user created in the MySQL shell.

Next, we need to edit the Zabbix Server configuration file, which is /etc/zabbix/zabbis_server.conf:

# $EDITOR /etc/zabbix/zabbix_server.conf

Search the DBPassword section of the file:

### Option: DBPassword                           
#       Database password. Ignored for SQLite.   
#       Comment this line if no password is used.
#                                                
# Mandatory: no                                  
# Default:                                       
# DBPassword=

Uncomment the DBPassword= line and edit by adding the password created in MySQL:

DBPassword=usr_strong_pwd

Next, look for the DBHost= line and uncomment it.

Save and exit.

Configure PHP

We need to configure PHP for working with Zabbix. During the installation process, the installer created a configuration file in /etc/zabbix, named apache.conf. Open this file:

# $EDITOR /etc/zabbix/apache.conf

Here, right now, it’s necessary only to uncomment the date.timezone setting and set the correct timezone:


<IfModule mod_php7.c>
    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300
    php_value always_populate_raw_post_data -1
    php_value date.timezone Europe/Rome
</IfModule>

Save and exit.

At this point, restart Apache and start the Zabbix Server service, enabling it for starting at boot time:

# systemctl restart apache2
# systemctl start zabbix-server
# systemctl enable zabbix-server

Check the Zabbix status with systemctl:

# systemctl status zabbix-server

This command should output:

â zabbix-server.service - Zabbix Server
 Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor pr
 Active: active (running) ...

At this point, the server-side part of Zabbix has been correctly installed and configured.

Configure Zabbix Web Fronted

As mentioned in the introduction, Zabbix has a web-based front-end which we’ll use for visualizing collected data. However, this interface has to be configured.

With a web browser, go to URL http://localhost/zabbix.

Zabbix monitoring server Frontend Setup

Click on Next step

snapshot2

Be sure that all the values are Ok, and then click on Next step again.

Zabbix MySQL configurationInsert the MySQL zabbix user password, and then click on Next step.
Zabbix server details

Click on Next step, and the installer will show the following page with all the configuration parameters. Check again to ensure that everything is correct..

Zabbix pre-installation detailsZabbix installation finished
Click Next step to proceed to the final screen.

Click finish to complete the front-end installation. The default user name is Admin with zabbix as the password.

Getting Started with the Zabbix Server

Zabbix login interface

After logging in with the above mentioned credentials, we will see the Zabbix dashboard:
zabbix dashboard
Go on Administration -> Users for an overview about enabled accounts
Zabbix users
Create a new account by clicking on Create user
Zabbix User Creation
Click on Add in the Groups section and select one group

snapshot11
Save the new user credentials, and it will appear in the Administration -> Users panel.
Note that in Zabbix access rights to hosts are assigned to user groups, not individual users.

Conclusion

This concludes the tutorial for the Zabbix Server installation. Now, the monitoring infrastructure is ready to do its job and collect data about servers that need to be added in the Zabbix configuration.

The post Monitoring Server: Install Zabbix on an Ubuntu 16.04 Server appeared first on Unixmen.

Related posts:

  1. Install Moodle eLearning Platform on Debian 9
  2. Using MySQL with Basic SQL Commands
  3. Create an Online Social Network with Elgg on Debian 9
  4. How to Install Zen Cart on Debian 9
  5. How to Install Cacti SNMP Monitoring Tool on Debian 9
  6. How to Install MySQL 5.7 on Linux CentOS and Ubuntu
  7. How to Install Magento 2.1 on CentOS 7
  8. How to Install LibreNMS Monitoring Tool with Nginx on CentOS 7
  9. How to configure remote and secure connections for MySQL on Ubuntu 16.04 VPS
  10. How to Install MySQL in Ubuntu Linux

Filed Under: Uncategorized

Primary Sidebar

Trending

  • How to fix Windows Update Error 80244019
  • Windows 10 Update keeps failing with error 0x8007001f – 0x20006
  • How To Change Netflix Download Location In Windows 10
  • Troubleshoot Outlook “Not implemented” Unable to Send Email Error
  • How do I enable or disable Alt Gr key on Windows 10 keyboard
  • How To Install Android App APK on Samsung Tizen OS Device
  • 3 Ways To Open PST File Without Office Outlook In Windows 10
  • FIX: Windows Update error 0x800f0986
  • How to Retrieve Deleted Messages on Snapchat
  • Latest Samsung Galaxy Note 20 leak is a spec dump revealing key features
  • Install Android 7.0 Nougat ROM on Galaxy Core 2 SM-G355H
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • Websites to Watch Movies Online – 10+ Best Websites Without SignUp/Downloading
  • How to Backup SMS Messages on Your Android Smartphone
  • How to delete a blank page at the end of a Microsoft Word document
  • Fix: The Disc Image File Is Corrupted Error In Windows 10
  • Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  • Samsung Galaxy Z Fold 3 could be scheduled for June 2021, with S Pen support

Footer

Tags

Amazon amazon prime amazon prime video Apple Application software epic games Galaxy Note 20 Galaxy S22 Plus Galaxy S22 Ultra Google Sheets headphones Huawei icloud Instagram instant gaming ip address iPhone iphone 12 iphone 13 iphone 13 pro max macOS Microsoft Microsoft Edge Mobile app office 365 outlook Pixel 6 Samsung Galaxy Samsung Galaxy Book 2 Pro 360 Samsung Galaxy Tab S8 Smartphone speedtest speed test teams tiktok Twitter vpn WhatsApp whatsapp web Windows 10 Windows 11 Changes Windows 11 Release Windows 11 Update Windows Subsystem For Android Windows 11 Xiaomi

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org