Skip to content

Instantly share code, notes, and snippets.

@isaqueprofeta
Last active May 22, 2020 21:16
Show Gist options
  • Save isaqueprofeta/c484d35378a7f66edf8f05904ec3f51a to your computer and use it in GitHub Desktop.
Save isaqueprofeta/c484d35378a7f66edf8f05904ec3f51a to your computer and use it in GitHub Desktop.
Zabbix stupid simple install

Install Zabbix with PgSQL, stupid mode (all modules on one machine and disable security of S.O) in CentOS7:

SO:

$ vi /etc/selinux/config 

Edit replacing:

SELINUX=disabled
$ systemctl stop firewalld && systemctl disable firewalld
$ reboot

BD:

$ sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
$ yum install postgresql11 postgresql11-server
$ /usr/pgsql-11/bin/postgresql-11-setup initdb
$ vi /var/lib/pgsql/11/data/pg_hba.conf

Edit replacing:

host all all 127.0.0.1/32 md5
host all all ::1/128 md5
$ systemctl enable postgresql-11 && systemctl start postgresql-11
$ sudo -u postgres createuser --pwprompt zabbix # Type the password
$ sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix

Zabbix Server:

$ yum-config-manager --enable rhel-7-server-optional-rpms
$ rpm -ivh http://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-server-pgsql-5.0.0-1.el7.x86_64.rpm
$ zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix
$ vi /etc/zabbix/zabbix_server.conf 

Edit replacing/uncomenting:

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
$ systemctl enable zabbix-server && systemctl start zabbix-server

Zabbix Frontend:

$ yum install zabbix-web-pgsql
$ vi /etc/httpd/conf.d/zabbix.conf 

Edit replacing/uncomenting:

php_value date.timezone America/Sao_Paulo
$ systemctl enable httpd && systemctl start httpd

Zabbix Agent for this server:

$ yum install zabbix-agent
$ vim /etc/zabbix/zabbix_agentd.conf

Edit replacing/uncomenting:

Server=localhost
ServerActive=localhost
$ systemctl enable zabbix-agent && systemctl start zabbix-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment