About Zabbix

Zabbix is a free and open source network monitoring Software tool which is used to monitor and track the availability and performance of your IT infrastracture: servers, network devices and other IT assets.

In this article we will install Zabbix 3.4 on Ubuntu 16.04 LTS, in order to use Zabbix it’s required a Web Server (Apache), database server(Mysql, Mariadb, Postgresql …) and PHP to work.

Environment:

Hostname = zabbix.yallalabs.com

IP Address = 192.168.1.200

OS = Ubuntu 16.04 LTS

– Before we begin, note that I have installed lamp stack, if you didn’t install it take a look at this tuttorial : How To Install LAMP Stack (Linux, Apache, MySQL, PHP 7) On Ubuntu 16.04









Step 1 – Install Zabbix Server with MySQL

– Before starting the installation we need to download the zabbix repository using this commands:

– Now use the below command to install Zabbix and necessary packages

Step 2 – Edit PHP timezone

– Open the file /etc/zabbix/apache.conf created by Zabbix with your favourite editer

– It’s necessary to uncomment the “date.timezone” setting and set the right timezone.

php_value date.timezone Europe/Rome

– Open the file php.ini, uncomment the “date.timezone” setting and set the right timezone

– Save the file and don’t forget to reload the apache2 service using the below command

[email protected]:/etc/zabbix# systemctl reload apache2







Step 3 – Edit create and import initial zabbix database and user

– First we need to create zabbix database (zabbixdb) and create a zabbix user (zabbixuser).

[email protected]:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database zabbixdb character set utf8 collate utf8_bin; Query OK, 1 row affected (0.08 sec) mysql> grant all privileges on zabbixdb .* to [email protected] Password '; Query OK, 0 rows affected, 1 warning (0.06 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye [email protected]:~#

– After creating the zabbix database and user we need to import the zabbix initial database using the below commands

– Now we need to edit database configuration in in zabbix_server.conf file

– Specify the zabbix database name, zabbix user name and the password

DBHost= localhost DBName= zabbixdb DBUser= zabbixuser DBPassword= Password

– After importing the zabbix database we need to enable and start zabbix-server service and zabbix-agent service on boot using the bellow commands:





Step 5 – Configure Zabbix via Web console

– Navigate to http://ip_address/zabbix or http://host_name/zabbix



– Make sure that all software prerequisites are met.



– Enter details for connecting to the database. Zabbix database must already be created.



– Enter Zabbix server details.



– Review a summary of settings.



– Finish the installation.



– Now you’ll be redirected to the zabbix web console page. The default user name is Admin and the password is zabbix .







Last thing to do is to enable your server zabbix to be monitored: go to Configuration -> Hosts. Select the host (zabbix server) and click “Disabled”





We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!