Instalación Zabbix 4.0

From Zabbix-ES
Jump to navigation Jump to search

Instalación de zbxmon01

zbxmon01

# rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
# yum-config-manager --enable rhel-7-server-optional-rpms
# yum install zabbix-server-pgsql -y
# yum install zabbix-web-pgsql -y
# yum install zabbix-agent -y
# yum install zabbix-get -y
# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
# yum install postgresql10 -y 
# yum install postgresql10-server -y
# /usr/pgsql-10/bin/postgresql-10-setup initdb  --- /usr/pgsql-10/bin/initdb -D /tmp/pg -E UTF-8 --data-checksum
# systemctl enable postgresql-10
# systemctl start postgresql-10
# systemctl enable zabbix-server
# systemctl enable zabbix-agent

# su - postgres
# psql -c "alter user postgres with password '*******'"
# createuser --pwprompt zabbix
Enter password for new role: *******
Enter it again: *******

# createdb -O zabbix -E Unicode -T template0 zabbix

# zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | /usr/pgsql-10/bin/psql -U zabbix zabbix -W
Enter password for user zabbix: *******

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=*******

# cat /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=3
DebugLevel=0
Server=192.168.1.10,127.0.0.1
ListenPort=10050
StartAgents=5
ServerActive=192.168.1.10,127.0.0.1
HostMetadata=ffa439cf12ddsadgdfgjkfe0c77cea42c3f69
RefreshActiveChecks=60
Timeout=30
Include=/etc/zabbix/zabbix_agentd.d/*.conf

# vi /etc/php.ini
date.timezone = "Europe/Madrid"

# cat /var/www/html/index.html 
<html>
<head>
<title>Zabbix Server</title>
<meta http-equiv="refresh" content="0; URL=http://zbxmon01.midominio.com/zabbix">
<meta name="keywords" content="automatic redirection">
</head>
<body>
</body>
</html>
# systemctl restart httpd
# systemctl restart zabbix-server

Acceder: http://zbxmon01.midominio.com