Zabbix Server 6.2 LTS nin Centos 8’e nasıl kurulacağı anlatacağım, Zabbix, açık kaynaklı bir sunucu ve ağ izleme aracıdır.
Selinux permissive moduna alın.
setenforce 0 && sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
MariaDB 10.5 kuralım,
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup sudo bash mariadb_repo_setup --mariadb-server-version=10.5 dnf makecache dnf module reset mariadb -y dnf install MariaDB-server MariaDB-client MariaDB-backup rpm -qi MariaDB-server systemctl start mariadb systemctl enable mariadb systemctl status mariadb firewall-cmd --add-service=mysql --permanent firewall-cmd --reload |
PHP 8 kuralım,
dnf upgrade dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf module enable php:remi-8.2 -y dnf module list php Çıktı dnf install php php-cli php-common php-fpm -v |
Zabbix RPM paketini yükleyin
rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-1.el8.noarch.rpm dnf clean all |
install Zabbix server, frontend, agent
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent |
MySQL root için varsayılan parolayı değiştirerek MySQL güvenliğini sağlayın:
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
Aşağıdakileri veritabanı bilgisayarınızda çalıştırın, (Şifreyi) kendinize göre düzenleyin.
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;
Şema verilerini içeriye aktarın, ve database için oluşturulan şifrenizi girmeniz istenir.
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix veya cd /usr/share/doc/zabbix-sql-scripts/mysql/ zcat server.sql.gz | mysql zabbix # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix # mysql -uroot -p |
Veritabanını konfigüre edin,
vim /etc/zabbix/zabbix_server.conf
DBPassword=password
Zabbix servisleri restart edin.
systemctl restart zabbix-server zabbix-agent httpd php-fpm |
Firewall yapılandırın,
firewall-cmd --add-service={http,https} --permanent firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent firewall-cmd --reload
Timezone ayarlayın.
vim /etc/php-fpm.d/zabbix.conf |
Servisi restart edin ve başlangıca ekleyin,
systemctl restart httpd php-fpm systemctl enable httpd php-fpm http://localhost-ip/zabbix/
install ZABBIX 6.2 LTS CentOS x86_64 Linux