su -
apt update
apt upgrade
apt install apache2 apache2-utils vim wget
a2enmod rewrite
vim /etc/apache2/sites-enabled/000-default.conf
#...
DocumentRoot /var/www/html
#...
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
</Directory>
systemctl restart apache2
sed -i 's/ServerTokens OS/ServerTokens Prod/' /etc/apache2/conf-available/security.conf
sed -i 's/ServerSignature On/ServerSignature Off/' /etc/apache2/conf-available/security.conf
apt install mariadb-server mariadb-client
mariadb -u root
USE mysql;
UPDATE user SET password=PASSWORD('SENHA.db.ROOT') WHERE User='root';
UPDATE user SET plugin="mysql_native_password";
FLUSH PRIVILEGES;
quit;
apt install libapache2-mod-php php php-mysql php-cli php-pear php-gmp php-gd php-bcmath php-mbstring php-curl php-xml php-zip
systemctl restart apache2
php --version
cd /tmp
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
dpkg -i zabbix-release_5.0-1+buster_all.deb
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+bullseye_all.deb
dpkg -i zabbix-release_5.0-1+bullseye_all.deb
apt update
apt upgrade
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
mariadb -u root -p
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'SUA_SENHA';
grant all privileges on zabbix.* to zabbix@localhost;
quit;
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mariadb -uzabbix -p zabbix
vim /etc/zabbix/zabbix_server.conf
#...
DBPassword=SUA_SENHA
#...
vim /etc/zabbix/apache.conf
<IfModule mod_php7.c>
php_value max_execution_time 300
php_value memory_limit 512M
php_value post_max_size 48M
php_value upload_max_filesize 24M
php_value max_input_time 300
php_value max_input_vars 10000
php_value always_populate_raw_post_data -1
php_value date.timezone America/Sao_Paulo
# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
Alias /zabbix /usr/share/zabbix
</IfModule>
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
<IfModule mod_php5.c>
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value max_input_vars 10000
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Rig
</IfModule>
<IfModule mod_php7.c>
php_value max_execution_time 300
php_value memory_limit 512M
php_value post_max_size 48M
php_value upload_max_filesize 24M
php_value max_input_time 300
php_value max_input_vars 10000
php_value always_populate_raw_post_data -1
php_value date.timezone America/Bahia
</IfModule>
</Directory>
<Directory "/usr/share/zabbix/conf">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/app">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/include">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/local">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
systemctl enable zabbix-server zabbix-agent
systemctl restart zabbix-server zabbix-agent apache2
Passo-a-passo como criar um servidor WEB Apache + PHP + MariaDB + phpMyAdmin no Debian 10 Buster “LAMP”
Show archive.org snapshot
Instalação do Zabbix 5 + notificações pelo Telegram nativo + Grafana 7 + Debian 10 Buster
Show archive.org snapshot
Posted by L3UNIX to L3UNIX's deck (2021-06-06 18:26)