Hello Everyone
I recently installed Zabbix Network Monitoring Application in my company. It is a great and free tool to monitor the status of the various Network Devices in your infrastructure.
Pre-requisite- Ubuntu LinuxĀ
Here’s the step by step
1. Visit- https://www.zabbix.com/download
Select the options appropriate for your OS. I selected below and once these are selected you will see a step by step things to do.
2.Ā Install and Configure Zabbix
a. Install Zabbix Repository
Open terminal and enter below commands. If you face permission issue type sudo before the command and give password. You can also type sudo -I, this will enable root access and then you wonāt have to type sudo before admin commands
# wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-2%2Bubuntu22.04_all.deb
# dpkg -i zabbix-release_6.2-2+ubuntu22.04_all.debĀ
# apt update
b. Ā Install Zabbix Server,
Frontend and Agent (we are installing everything on the same server)
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
c. Create Initial Database
# mysql -uroot -p
<type the password as>password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user [email protected] identified by ‘password’;
mysql> grant all privileges on zabbix.* to [email protected];
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;Ā Ā
Import Initial Schema and Data. You will be prompted to enter the password created on “mysql -uroot -p” above
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uzabbix -p zabbix
This command will take time to execute, so wait for it to run and only then go for the next step.
Disable log_bin_trust_function_creators option after importing database schema.
# mysql -uroot -p
<type the password as>password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
d. Configure the database for Zabbix serverĀ
Edit file /etc/zabbix/zabbix_server.conf by typing below commands
#nano /etc/zabbix/zabbix_server.conf
Scroll down to line DBPassword=
password and uncomment it- Ctrl+X to save it
e. Start Zabbix server and agent processes
# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2
Start using Zabbix by opening the browser and type http://ip address/Zabbix. This will open the initial
Zabbix setup. Once this is done, login to Zabbix by entering below credentials
Username- Admin, Password- password
Useful MySQL commands for troubleshooting
Description |
Command |
To login (from unix shell) use -h only if needed. |
[mysql |
Create |
create |
List |
show |
Switch |
use [db |
To see |
show |
To see |
describe |
To |
drop |
To |
drop |
Show |
SELECT |
Returns |
show |
Show list of users | SELECT |
Delete |
|
Delete |
|
Useful Links
https://www.zabbix.com/download
https://phoenixnap.com/kb/remove-delete-mysql-user
http://g2pc1.bu.edu/~qzpeng/manual/MySQL%20Commands.htm
One thought on “Complete Steps to Install and Configure Zabbix on Ubuntu”