From 094c0b33aa40a07f67c53f497d0f8efabcf66ae8 Mon Sep 17 00:00:00 2001 From: Adam Alphonso Date: Thu, 7 Nov 2024 11:04:22 +0100 Subject: [PATCH] =?UTF-8?q?=09nouveau=20fichier=C2=A0:=20ap32-mon/README.m?= =?UTF-8?q?d=20=09nouveau=20fichier=C2=A0:=20ap32-mon/zabbix.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ap32-mon/README.md | 2 ++ ap32-mon/zabbix.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ap32-mon/README.md create mode 100644 ap32-mon/zabbix.sh diff --git a/ap32-mon/README.md b/ap32-mon/README.md new file mode 100644 index 0000000..15ae486 --- /dev/null +++ b/ap32-mon/README.md @@ -0,0 +1,2 @@ +# sdis29-2 + diff --git a/ap32-mon/zabbix.sh b/ap32-mon/zabbix.sh new file mode 100644 index 0000000..b3acc7c --- /dev/null +++ b/ap32-mon/zabbix.sh @@ -0,0 +1,18 @@ +#!/bin/bash +export http_proxy=http://10.121.38.1:8080 +export https_proxy=https://10.121.38.1:8080 +wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-2+debian12_all.deb +dpkg -i zabbix-release_7.0-2+debian12_all.deb +apt-get install -y apache2 mariadb-server +apt-get install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent +echo 'create database zabbix character set utf8mb4 collate utf8mb4_bin;' | mysql -u root +echo "create user zabbix@localhost identified by 'password';" | mysql -u root +echo 'grant all privileges on zabbix.* to zabbix@localhost;' | mysql -u root +echo 'set global log_bin_trust_function_creators = 1;' | mysql -u root +zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -u zabbix -ppassword zabbix +echo 'set global log_bin_trust_function_creators = 0;' | mysql -u root +sed -i 's/# DBPassword=/DBPassword=password/' /etc/zabbix/zabbix_server.conf +systemctl restart zabbix-server zabbix-agent apache2 +systemctl enable zabbix-server zabbix-agent apache2 +localectl set-locale LANG=en_US.UTF-8 +systemctl restart zabbix-server zabbix-agent apache2