Install Zabbix Server 5.0 LTS on CentOS 8.

Zabbix Server depends on the following software applications:

  • MySQL database server
  • Apache web server
  • PHP with required extensions
  • For this installation I used this image CentOS-8.2.2004-x86_64-minimal

If you’re not a fan of SELinux, I recommend to you set it in Permissive mode.

setenforce 0 && sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config

Install and configure Zabbix server for your platform

a. Install Zabbix repository

# rpm -Uvh <https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm>
# dnf clean all

b. Install Zabbix server, frontend, agent

# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

Install MySQL Server on CentOS 8

Install MySQL Database Server

sudo dnf install mysql-server

Activate the MySQL service using the command below:

sudo systemctl start mysqld.service
sudo systemctl enable mysqld

Secure MySQL by changing the default password for MySQL root:

mysql_secure_installation
Enter current password for root (enter for none): Press the Enter
Set root password? [Y/n]: Y
New password: <Enter root DB password>
Re-enter new password: <Repeat root DB password>
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Once Database server is installed, you need to create a database for Zabbix user:

c. Create initial database

Run the following on your database host.

Don’t forget to change the password befor you copy this code.

mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

Import Zabbix Server database schema

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

d. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf

DBPassword=password

Configure PHP for Zabbix frontend

e. Configure PHP for Zabbix frontend

Edit file /etc/php-fpm.d/zabbix.conf, uncomment and set the right timezone for you.

; php_value[date.timezone] = Asia/Jerusalem

File Example:

php_value[max_execution_time] = 300
php_value[memory_limit] = 128M
php_value[post_max_size] = 16M
php_value[upload_max_filesize] = 2M
php_value[max_input_time] = 300
php_value[max_input_vars] = 10000
php_value[date.timezone] = Asia/Jerusalem

Configure firewall

firewall-cmd --add-service={http,https} --permanent
firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
firewall-cmd --reload

Start Zabbix server and agent processes

f. Start Zabbix server and agent processes

Start Zabbix server and agent processes and make it start at system boot.

systemctl restart zabbix-server zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-agent httpd php-fpm

Open Zabbix URL: http://<server_ip_or_name>/zabbix in your browser.

https://computingforgeeks.com/wp-content/uploads/2020/05/zabbix-5-web-1.png

Confirm that all pre-requisites are satisfied.

Configure DB settings

Finish installation

Configure Email notification’s

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.