nouveau fichier : ap32-mon/README.md
nouveau fichier : ap32-mon/zabbix.sh
This commit is contained in:
parent
f52f945ad8
commit
094c0b33aa
2
ap32-mon/README.md
Normal file
2
ap32-mon/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# sdis29-2
|
||||
|
18
ap32-mon/zabbix.sh
Normal file
18
ap32-mon/zabbix.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user