Difference between revisions of "CentOS 8.x Zabbix installation"
From Notes_Wiki
m |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x monitoring]] > [[CentOS 8.x Zabbix]] > [[CentOS 8.x Zabbix installation]] | [[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x monitoring|Monitoring]] > [[CentOS 8.x Zabbix|Zabbix]] > [[CentOS 8.x Zabbix installation | Installation]] | ||
To install Zabbix on centOS 8 use: | To install Zabbix on centOS 8 use: | ||
Line 91: | Line 91: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x monitoring]] > [[CentOS 8.x Zabbix]] > [[CentOS 8.x Zabbix installation]] | [[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x monitoring|Monitoring]] > [[CentOS 8.x Zabbix|Zabbix]] > [[CentOS 8.x Zabbix installation | Installation]] |
Latest revision as of 02:32, 8 May 2023
Home > CentOS > CentOS 8.x > Monitoring > Zabbix > Installation
To install Zabbix on centOS 8 use:
- Disable SELinux (setenforce 0, /etc/sysconfig/selinux: SELINUX=disabled)
- Install required web server with php and database
- dnf install -y httpd mariadb-server php php-cli php-common php-mbstring php-mysqlnd php-xml php-bcmath php-devel php-pear php-gd
- Edit php configuration as per Rocky 9.x Increase default PHP resources
- Optionally enable server concurrency as per Rocky 9.x Configure apache web server for concurrency
- Start and enable various services
- systemctl start httpd
- systemctl start mariadb
- systemctl enable httpd
- systemctl enable mariadb
- Lock MySQL installation using:
- mysql_secure_installation
- There is no existing mysql password, set new password and accept (Y) default for all other queries
- Create DB for zabbix using:
- Start mysql client
- mysql -u root -p
- Create user and database
- CREATE DATABASE zabbix CHARACTER SET utf8 collate utf8_bin;
- GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY '<secret-zabbix-db-password>';
- flush privileges;
- exit;
- Start mysql client
- Install libssh2
- yum -y install epel-release
- yum -y install libssh2
- Install Zabbix repository based on latest compatible version from http://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/
- dnf install -y https://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/zabbix-release-5.2-1.el8.noarch.rpm
- Install zabbix server and agent
- dnf install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-apache-conf
- Start and enable zabbix processes
- systemctl restart zabbix-server zabbix-agent httpd php-fpm
- systemctl enable zabbix-server zabbix-agent httpd php-fpm
- Initialize Zabbix DB
- cd /usr/share/doc/zabbix-server-mysql
- zcat create.sql.gz | mysql -u zabbix -p zabbix
-
- Enter <secret-zabbix-db-password> specified while creating zabbix user
- Edit /etc/zabbix/zabbix_server.conf and specify DBpassword
- DBPassword=<secret-zabbix-db-password>
-
- Enter <secret-zabbix-db-password> specified while creating zabbix user
- Configure timezone for Zabbix in PHP by editing /etc/php-fpm.d/zabbix.conf
- php_value[date.timezone] = Asia/Kolkata
- Restart various processes
- systemctl restart zabbix-server
- systemctl restart zabbix-agent
- systemctl restart php-fpm
- systemctl restart httpd
- systemctl restart mariadb
- Configure firewall rules for Zabbix
- firewall-cmd --permanent --add-service=http
- firewall-cmd --permanent --add-port=10050/tcp
- firewall-cmd --permanent --add-port=10051/tcp
- firewall-cmd --reload
- Access Zabbix UI at http://<server-fqdn-or-ip>/zabbix/
- Leave most settings default except DB-password <secret-zabbix-db-password> and desired Name for Zabbix server
- Login with Admin/zabbix
Refer:
Home > CentOS > CentOS 8.x > Monitoring > Zabbix > Installation