Zabbix installation: Distribution setup
On Zabbix core server:
Step1: Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-latest-6.0.el8.noarch.rpm
dnf clean all
Step2:Install Zabbix server, frontend, agent
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-selinux-policy zabbix-agent
Step3: Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
DBHost= DBserver_ip
DBName=
DBUser=
DBPassword=
DBPort=3306
Step4: Start Zabbix server and agent processes
systemctl restart zabbix-server zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-agent httpd php-fpm
On Zabbix Database Server:
Step1: Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-latest-6.0.el8.noarch.rpm
dnf clean all
Step3: Install the mysql server
yum install mysql-server
systemctl restart mysqld
Step4: Create initial database
mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@Zabbix_core_ip identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@zabbix_core_ip;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
Step5:Import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Step6: Disable log_bin_trust_function_creators option after importing database schema.
mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
On Zabbix Proxy Server
Step1: Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-latest-6.0.el8.noarch.rpm
dnf clean all
Step2: Install Zabbix proxy
dnf install zabbix-proxy-mysql zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
Step3: Create initial database
mysql -uroot -p
password
mysql> create database zabbix_proxy character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix_proxy.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
Step4: Import initial schema and data
cat /usr/share/zabbix-sql-scripts/mysql/proxy.sql | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix_proxy
Disable log_bin_trust_function_creators option after importing database schema.
mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
Step5: Configure the database and Zabbix core server details in Zabbix proxy conf file:
Edit file /etc/zabbix/zabbix_proxy.conf
Server=zabbix_core_ip
Hostname=zabbix proxy --------> It should be same as you configured in Zabbix(proxy details)
DBPassword=password
Now you can access the UI
Zabbix_core_server_ip/zabbix
Note: Required Port:10050,10051,3306 should be enable in firewall and selinux should be disabled.
Comments
Post a Comment