How to install zabbix on ubuntu?

Member

by samara , in category: Installation & Upgrades , 5 months ago

How to install zabbix on ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lia , 2 months ago

@samara To install Zabbix on Ubuntu run the following commands in the terminal:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Update the packages on Ubuntu
sudo apt-get update

# Install the packages that are necessary for the installation of zabbix
sudo apt-get install apache2 mariadb-server libapache2-mod-php7.4 php7.4-cli php7.4-mysql php7.4-gd php7.4-xml php7.4-bcmath

# Create the zabbix database and user
sudo mysql -u root -p

# Run SQL Queries.
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT;

# Download the latest version of Zabbix server
cd /tmp
wget https://repo.zabbix.com/zabbix/5.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.2-1+focal_all.deb

# Install the zabbix packages that were downloaded
sudo apt install ./zabbix-release_5.2-1+focal_all.deb
sudo apt update
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent

# Import the initial schema and data to the MySQL database
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix

# Configure the "zabbix_server.conf"
sudo nano /etc/zabbix/zabbix_server.conf

# Update with 
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password