Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Last active August 28, 2018 19:31
Show Gist options
  • Save douglascrp/2ad888111af36bc727c4c926c6b27b73 to your computer and use it in GitHub Desktop.
Save douglascrp/2ad888111af36bc727c4c926c6b27b73 to your computer and use it in GitHub Desktop.
Zabbix
sudo apt-get update
sudo apt-get install apache2
sudo apache2ctl configtest
Se aparecer:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Editar /etc/apache2/apache2.conf
adicionar
ServerName server_domain_or_IP
sudo apache2ctl configtest
Syntax OK
sudo systemctl restart apache2
sudo ufw app list
Output
Available applications:
Apache
Apache Full
Apache Secure
OpenSSH
sudo ufw allow in "Apache Full"
sudo apt-get install curl
sudo apt-get install postgresql
service postgresql start
sudo -u postgres psql postgres
\password postgres
\q
sudo vim /etc/postgresql/10/main/pg_hba.conf
host all all 127.0.0.1/32 password
service postgresql restart
sudo -u postgres createuser -D -A -P zabbix
sudo -u postgres createdb -O zabbix zabbix
sudo apt-get install php libapache2-mod-php php-mcrypt php-pgsql
sudo vim /etc/apache2/mods-enabled/dir.conf
Mover "index.php" para a primeira posição
sudo systemctl restart apache2
sudo vim /var/www/html/info.php
<?php
phpinfo();
?>
http://your_server_IP_address/info.php
sudo rm /var/www/html/info.php
wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+bionic_all.deb
dpkg -i zabbix-release_3.4-1+bionic_all.deb
apt update
apt install zabbix-server-pgsql zabbix-frontend-php php-pgsql zabbix-agent
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix
sudo vim /etc/zabbix/zabbix_server.conf
DBPassword=password
sudo vim /etc/zabbix/apache.conf
php_value date.timezone America/Sao_Paulo
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
http://server_ip_or_name/zabbix
Configurar
Acessar com Admin / zabbix
Alterar a senha
Referências
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
https://www.zabbix.com/download?zabbix=3.4&os_distribution=ubuntu&os_version=bionic&db=PostgreSQL
https://computingforgeeks.com/install-zabbix-server-ubuntu-18-04/
https://computingforgeeks.com/how-to-install-and-configure-zabbix-agent-on-ubuntu-18-04/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment