piatok 21. januára 2022

How to install zabbix on Centos 8?

 Zabbix is monitoring tool. Step by step installation of zabbix.




1. we need epel repository:


dnf install epel-release

2. update the system

dnf update -y

3. check and edit timezone

 rm -rf /etc/localtime
 
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
 
date

4. change selinux / or create SELINUX rule


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


5. apache and mariadb

#apache
dnf -y install @httpd
systemctl enable --now httpd

#mariadb
dnf module install mariadb
systemctl enable --now mariadb
mysql_secure_installation
mysql -u root -p


6.  install repository of zabbix and zabbix tools

dnf -y install https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent


7. import database zabbix


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

8. create db password to database

 vi /etc/zabbix/zabbix_server.conf


line 124 set password:  (please more secure like me)

  124  DBPassword=heslo

9. change php_value(date timezone: use your timezone)


 vi /etc/php-fpm.d/zabbix.conf


 php_value[date.timezone] = Europe/Berlin


10. restart zabbix, apache, mariadb, php-fpm and set firewalld (in my case, I have disabled firewalld - zabbix was for my testing not for prodction data)

systemctl enable zabbix-server zabbix-agent
systemctl stop firewalld
systemctl disable firewalld
systemctl restart httpd php-fpm
systemctl enable httpd php-fpm
vi /etc/php-fpm.d/zabbix.conf
systemctl restart httpd php-fpm

11. just click on the web environment

http://localhost/zabbix

(you can change localhost for your IP or domain name)




Žiadne komentáre:

Zverejnenie komentára