Difference between revisions of "CentOS 8.x Zabbix installation"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Zabbix installation">CentOS 8.x Zabbix|Zabbix</yambe:breadcrumb> =CentOS 8.x Zabbix installation= To install Zabbix on centOS 8 use: # Disable SELinux...") |
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]] | |||
To install Zabbix on centOS 8 use: | To install Zabbix on centOS 8 use: | ||
Line 99: | Line 98: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x monitoring]] > [[CentOS 8.x Zabbix]] > [[CentOS 8.x Zabbix installation]] |
Revision as of 17:22, 15 May 2022
Home > CentOS > CentOS 8.x > CentOS 8.x monitoring > CentOS 8.x Zabbix > CentOS 8.x 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 following php configuration values:
- memory_limit 256M
- upload_max_filesize 16M
- post_max_size 16M
- max_execution_time 300
- max_input_time 300
- max_input_vars 10000
- date.timezone = Asia/Kolkata
- Start and enable various services
- <pre>
- systemctl start httpd
- systemctl start mariadb
- systemctl enable httpd
- systemctl enable mariadb
- <pre>
- 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 rpm -Uvh 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 > CentOS 8.x monitoring > CentOS 8.x Zabbix > CentOS 8.x Zabbix installation