How To Install Zabbix 5.0 On Debian 10 Server8 min read
In this tutorial how to install Zabbix 5.0 on Debian 10 server. Debian and Zabbix both are open source. So you can use on your production server for network monitoring. Zabbix written by php, mysql language.
#################################### Server IP : 10.66.11.8 Disk : 25 GB RAM : 1GB vCPU : 2 Operating System: Debian 10 Web Server : Apache Database : MariaDB PHP : 7.2 Must or upper ####################################
Step #01: Check server version & ip address.
root@Zabbix-Srv:~# lsb_release -a && ip r
Must be server update & upgrade current version.
root@Zabbix-Srv:~# apt update && apt upgrade -y
Check hosts file as like below.
root@Zabbix-Srv:~# cat /etc/hosts
127.0.0.1 localhost
10.66.11.8 Zabbix-Srv.technologyrss.local Zabbix-Srv
And also hostname file as like below.
root@Zabbix-Srv:~# cat /etc/hostname
Zabbix-Srv
Step #02: Download Zabbix repo 5.0 buster for Debian 10.
root@Zabbix-Srv:~# wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
Add this repo on server.
root@Zabbix-Srv:~# dpkg -i zabbix-release_5.0-1+buster_all.deb
Then update this repo using run below command.
root@Zabbix-Srv:~# apt update
Now install zabbix package using below command.
root@Zabbix-Srv:~# apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
Step #03: Setup Mysql database with grant privileges.
Login MariaDB terminal using below command. MariaDB default root password is blank. so you can access MariaDB terminal without root password.
root@Zabbix-Srv:~# mysql -uroot -p
If you want to setup root password so use below command.
root@Zabbix-Srv:~# mysql_secure_installation
Follow below steps for reset root password.
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): //Press Enter Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
Then run below command for create database, user & user password.
MariaDB [(none)]> create database zabbix_db character set utf8 collate utf8_bin; MariaDB [(none)]> create user zabbix_user@localhost identified by 'passw0rd@123'; MariaDB [(none)]> grant all privileges on zabbix_db.* to zabbix_user@localhost; MariaDB [(none)]> flush privileges; MariaDB [(none)]> exit
Now import default Zabbix database using below command.
root@Zabbix-Srv:~# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix_user -p zabbix_db
Then type zabbix_user password and wait at least 2-3 min.
Step #04: Add Zabbix database info into configuration file.
Open below configuration file using any editor.
root@Zabbix-Srv:~# nano /etc/zabbix/zabbix_server.conf
Ensure database name, database user and database password.
DBName=zabbix_db DBUser=zabbix_user DBPassword=passw0rd@123
Open another apache configuration file for add time zone. This is very important.
root@Zabbix-Srv:~# nano /etc/zabbix/apache.conf
Remove # from below line and add your time zone. My time zone is Asia/Dhaka
php_value date.timezone Asia/Dhaka
Remove # from below line and add your time zone. My time zone is Asia/Dhaka
Now restart all service using below command.
root@Zabbix-Srv:~# systemctl restart zabbix-server zabbix-agent apache2 root@Zabbix-Srv:~# systemctl enable zabbix-server zabbix-agent apache2
Successfully installation done! Now access web url (Server ip address) and complete web installation process.
http://10.66.11.8/zabbix
Now click Next step
If all is OK then click Next step
Now input Database name, User and Password then click Next step.
Now login using default user name and password.
Username : Admin [Must be use 'A']
Password : zabbix
Then goto Zabbix 5.0 dashboard like as below.
If you see any error so please see my YouTube channel for more details.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!