Zabbix is an open-source software developed and supported by Zabbix SIA, that monitors numerous parameters of a network and the health and integrity of servers, virtual machines, applications, services, databases, websites, the cloud and more.
Zabbix allows users to configure e-mail-based alerts for any event, excellent reporting and data visualization features based on the stored data.
All Zabbix reports and statistics, configuration parameters, network status, server health, etc. can be assessed from any location through a web-based frontend.
This guide will describe the steps to install Zabbix and its basic configuration.
Step 1 - Install Apache web server, PHP and MySQL database
Install the Apache2 service.
# apt-get install apache2 -y
![zabbix1](https://www.layerstack.com/img/docs/resources/zabbix1.png)
Install MySQL database.
# apt-get install mysql-server -y
![zabbix2](https://www.layerstack.com/img/docs/resources/zabbix2.png)
Install PHP.
# apt-get install php php-pear php-cgi php-common libapache2-mod-php php-mbstring php-net-socket php-gd php-xml-util php-mysql php-bcmath -y
![zabbix3](https://www.layerstack.com/img/docs/resources/zabbix3.png)
Step 2 - Download and Install Zabbix 6.2 in Ubuntu 22
Download the Zabbix Repository
in Ubuntu using wget.
# wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-2%2Bubuntu22.04_all.deb
![zabbix4](https://www.layerstack.com/img/docs/resources/zabbix4.png)
Install the repository using dpkg tool
.
# dpkg -i zabbix-release_6.2-2+ubuntu22.04_all.deb
![zabbix5](https://www.layerstack.com/img/docs/resources/zabbix5.png)
Fetch the latest version of the package list.
# apt-get update
![zabbix6](https://www.layerstack.com/img/docs/resources/zabbix6.png)
Install Zabbix Server, Frontend and Agent.
# apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent -y
![zabbix7](https://www.layerstack.com/img/docs/resources/zabbix7.png)
Step 3 - Database configuration
Enter MySQL using the below command.
# mysql
Run the following on your database host.
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
![zabbix8](https://www.layerstack.com/img/docs/resources/zabbix8.png)
On the Zabbix server host imports theinitial schema
and data.
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Enter password when prompted:
![zabbix9](https://www.layerstack.com/img/docs/resources/zabbix9.png)
Disable the log_bin_trust_function_creators
option after importing the database schema.
# mysql
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
![zabbix10](https://www.layerstack.com/img/docs/resources/zabbix10.png)
Step 4 - Configure the Zabbix server and start the server processes
Edit Zabbix configuration file /etc/zabbix/zabbix_server.conf
.
# vi /etc/zabbix/zabbix_server.conf
![zabbix11](https://www.layerstack.com/img/docs/resources/zabbix11.png)
Uncomment DBPassword
and enter the Zabbix database password:
DBPassword=password
![zabbix12](https://www.layerstack.com/img/docs/resources/zabbix12.png)
Start the Zabbix server
and agent processes, and make it start at system boot. Follow the below-given commands.
# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2
![zabbix13](https://www.layerstack.com/img/docs/resources/zabbix13.png)
Install language packs
for Zabbix.
# apt-get install language-pack-en
![zabbix14](https://www.layerstack.com/img/docs/resources/zabbix14.png)
Step 5 - Set up Zabbix monitoring tool
Use the web browser and go to http://IPaddress/zabbix/setup.php, 111.111.111.111 is an example.
http://111.111.111.111/zabbix/setup.php
![zabbix15](https://www.layerstack.com/img/docs/resources/zabbix15.png)
Click Next step
and continue to the next page.
This page shows the prerequisites that are installed and verified.
![zabbix16](https://www.layerstack.com/img/docs/resources/zabbix16.png)
Click Next step
and continue to the next page.
Here you have to enter your MySQL-Zabbix database password.
![zabbix17](https://www.layerstack.com/img/docs/resources/zabbix17.png)
Click Next step
and continue to the next page.
Set your time zone, default theme, etc.
![zabbix18](https://www.layerstack.com/img/docs/resources/zabbix18.png)
Click Next step
and continue to the next page.
Pre-installtion summary. Check all the configuration parameters.
![zabbix19](https://www.layerstack.com/img/docs/resources/zabbix19.png)
After the installation process completes, a congratulations message will appear.
![zabbix20](https://www.layerstack.com/img/docs/resources/zabbix20.png)
Click Finish
.
Log in to Zabbix using http://111.111.111.111/zabbix/.
Default Username: Admin
Default Password: zabbix
Sign in using the above-mentioned credentials:
![zabbix21](https://www.layerstack.com/img/docs/resources/zabbix21.png)
See Zabbix dashboard
.
![zabbix22](https://www.layerstack.com/img/docs/resources/zabbix22.png)
To change the Zabbix frontend admin account password, navigate to Administration
-> Users
–> and click on Admin
.
![zabbix23](https://www.layerstack.com/img/docs/resources/zabbix23.png)
Click on the Change password
button and add your new password.
![zabbix24](https://www.layerstack.com/img/docs/resources/zabbix24.png)
Click on the bottom Update
button in order to save the admin account’s new password.
Related Tutorials