Advertising:

Instalación de Zabbix Server sobre Ubuntu

From Zabbix-ES
Revision as of 21:23, 6 February 2021 by Unknown user (talk) (Created page with "==URLs de Interés== https://www.zabbix.com/la/download https://www.postgresql.org/download/ ==Instalación de PostgreSQL== '''- Como Usuario root''' sudo sh -c 'echo "d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

URLs de Interés

https://www.zabbix.com/la/download
https://www.postgresql.org/download/

Instalación de PostgreSQL

- Como Usuario root
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql-12

# Vamos a Deshabilitar el inicio del cluster de Postgres
sudo -i
# vi /etc/postgresql/12/main/start.conf
disabled

# systemctl daemon-reload

- Como Usuario Postgres
sudo su - postgres
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/zabbix -E UTF-8 --data-checksum

- Como Usuario root
sudo vi /etc/systemd/system/postgresql-12.service 
[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)

[Service]
Type=notify
User=postgres
ExecStart=/usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/zabbix
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0
OOMScoreAdjust=-900

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload 
sudo systemctl enable --now postgresql
sudo vi /var/lib/postgresql/12/zabbix/pg_hba.conf

Instalación de Zabbix Server

# wget https://repo.zabbix.com/zabbix/5.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.2-1+ubuntu20.04_all.deb
# dpkg -i zabbix-release_5.2-1+ubuntu20.04_all.deb
# apt update

# apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-nginx-conf zabbix-agent

# sudo -u postgres createuser --pwprompt zabbix
# sudo -u postgres createdb -O zabbix zabbix

# zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix

# vi /etc/zabbix/zabbix_server.conf
DBPassword=password

# vi /etc/zabbix/nginx.conf
listen          80;
server_name     10.0.100.100;

# systemctl restart zabbix-server zabbix-agent nginx php7.4-fpm
# systemctl enable zabbix-server zabbix-agent nginx php7.4-fpm

http://10.0.100.100