Skip to content

Zabbix server 5

Sivaldo Martins edited this page Apr 14, 2021 · 3 revisions

Zabbix Server 5.0

Debian - Repositorios

https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/

* Debian 10.0
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1%2Bbuster_all.deb

Install Zabbix server, frontend, DB

* MySQL
apt install mariadb-server
* Zabbix/Apache
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-get zabbix-sender zabbix-cli
* Zabbix/Ngix
apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-get zabbix-sender zabbix-cli

* Apache/PostgreSQL
apt install zabbix-server-pgsql zabbix-frontend-php php7.3-pgsql zabbix-apache-conf
* Ngix/PostgreSQL
apt install zabbix-server-pgsql zabbix-frontend-php php7.3-pgsql zabbix-nginx-conf

Create initial database

Root password mysql
service mysql stop
mysqld_safe --skip-grant-tables &
mysql
UPDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root';
FLUSH PRIVILEGES; exit;
mysqladmin -u root -p shutdown
service mysql start 
Mysql
mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;

zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
PostgreSQL
su - postgres
 createuser --pwprompt zabbix
 createdb -O zabbix zabbix
 
 zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | psql -U zabbix zabbix

Configure the database for Zabbix server

vim /etc/zabbix/zabbix_server.conf
DBPassword=zabbix

Configure PHP for Zabbix frontend

*Apache
vim /etc/apache2/conf-available/zabbix.conf
php_value date.timezone America/Sao_Paulo

*Ngix
(descomentar)
vim /etc/zabbix/nginx.conf
# listen 80;
# server_name example.com;
vim /etc/zabbix/php-fpm.conf
;php_value[date.timezone] = America/Sao_Paulo

Start Zabbix server

*Zabbix/Apache
systemctl restart zabbix-server apache2
systemctl enable zabbix-server apache2

*Zabbix/Ngix
systemctl restart zabbix-server nginx php7.3-fpm
systemctl enable zabbix-server nginx php7.3-fpm

CentOS - Repositorios

https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/

* CentOS 8.0
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf clean all

Install Zabbix server, frontend, agent

* Apache/MySQL
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf

* Apache/PostgreSQL
dnf install zabbix-server-pgsql zabbix-web-pgsql 

Create initial database (falha)

* MySQL
mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

* PostgreSQL
postgres createuser --pwprompt zabbix
postgres createdb -O zabbix zabbix
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix

Configure the database for Zabbix server

vim /etc/zabbix/zabbix_server.conf
DBPassword=password

Configure PHP for Zabbix frontend

vim /etc/php-fpm.d/zabbix.conf
php_value date.timezone America/Sao_Paulo

Start Zabbix server

systemctl restart zabbix-server httpd php-fpm
systemctl enable zabbix-server httpd php-fpm

Clone this wiki locally