De Wiki inetshell
Saltar a: navegación, buscar

Instalación de Zabbix Server[editar]

CentOS 7[editar]

Installation on a new server :
First Server steps:
yum update -y
yum upgrade -y
yum install wget epel-release php-mbstring yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

and then :
yum install php-mbstring php-bcmath

yum install mod_ssl

# add this to .bashrc :
vi .bashrc


# disable selinux:
vi /etc/selinux/config
change SELINUX=enforcing to SELINUX=disabled

#then run on CLI and run:
setenforce 0

# installing Zabbix server:
rpm -ivh

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway mariadb-server

#start MariaDb:
systemctl enable mariadb
systemctl start mariadb

#make SQL secure (optional)


#Set the below parameters in the PHP config file (/etc/php.ini )

vi /etc/php.ini

change this values:
[CODE]max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = America/Mexico_City

Se omitio esto para logserver01
#firewall settings:
yum install firewalld
firewall-cmd --permanent --add-port=10050/tcp
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=22/tcp
firewall-cmd --reload
systemctl restart firewalld

# Now start services:

systemctl start zabbix-server
systemctl enable zabbix-server
systemctl enable httpd
systemctl restart httpd

# to avoid future DB issues (DB growing too fast)we will set innodb per table:

#Backup mysql:

mysqldump --all-databases -p > mysqlall.sql

#Shutdown mysql

service mariadb stop

# Add the following lines to /etc/my.cnf.d/server.conf


Whatever your set for innodb_buffer_pool_size, make sure innodb_log_file_size is 25% of innodb_buffer_pool_size.

#Delete ibdata1, ib_logfile0 and ib_logfile1 (see update below before deleting!)

rm -rf /var/lib/mysql/ib*

#Restart mysql

service mariadb restart

#now we will set zabbix DB:

mysql -p
>> create database zabbixdb;
>> grant all privileges on zabbixdb.* to za[email protected] identified by 'PASSWORD';
>> flush privileges;

#building zabbixdb:
cd /usr/share/doc/zabbix-server-mysql-3.4.2/
gunzip create.sql.gz
mysql -u root -p zabbixdb < create.sql

# now we will set zabbix server DB Parameters at zabbix_server.conf:

vi /etc/zabbix/zabbix_server.conf

  1. restart server:
 systemctl restart zabbix-server
  1. enabling Zabbix agent and installing Zabbix_get:
 systemctl enable zabbix-agent
 systemctl start zabbix-agent
  1. wget
  1. rpm -Uvh zabbix-get-3.2.4-2.el7.x86_64.rpm
 yum install zabbix-get

after this been done go to it will reload zabbix first settings page just follow its orders and make sure all DB settings there is correct and all packages is marked as green OK.

Login with : user: admin password: zabbix

Good Luck!


  1. installing Zabbix server:
 rpm -ivh
 yum install zabbix-agent 
vi /etc/zabbix/zabbix_agentd.conf


systemctl enable zabbix-agent
systemctl start zabbix-agent

Habilitar Zabbix con SNMP[editar]

 yum install net-snmp net-snmp-utils