Installation and Configuration of Zabbix

server20,redhat7.3 server
server1.rhedhat6.5 agent
iptables and selinux off

server20:

yum install -y
fping-3.10-1.el7.x86_64.rpm
iksemel-1.4-2.el7.centos.x86_64.rpm
php-bcmath-5.4.16-42.el7.x86_64.rpm
php-mbstring-5.4.16-42.el7.x86_64.rpm
zabbix-agent-3.4.6-1.el7.x86_64.rpm
zabbix-server-mysql-3.4.6-1.el7.x86_64.rpm
zabbix-web-3.4.6-1.el7.noarch.rpm
zabbix-web-mysql-3.4.6-1.el7.noarch.rpm

yum install mariadb-server mariadb php -y
systemctl start mariadb
mysql_secure_installation
mysql -p
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'hello';
ariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec

cd /usr/share/doc/zabbix-server-mysql-3.4.6/
zcat create.sql.gz | mysql -uzabbix -phello zabbix

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

vim /etc/php.ini 
878 date.timezone =Asia/Shanghai

systemctl start zabbix-server zabbix-agent httpd
 systemctl enable zabbix-server zabbix-agent httpd

Browser access: http://172.25.92.20/zabbix


server1(agent):

rpm -ivh zabbix-agent-3.4.6-1.el6.x86_64.rpm 
vim /etc/zabbix/zabbix_agentd.conf 
97 Server=172.25.92.20
138 ServerActive=172.25.92.20
149 Hostname=server1
/etc/init.d/zabbix-agent start

Manually add:

Add the checked host server1 on the browser side:


Successfully added:

Auto discovery:

Delete manually added server1
Enable automatic discovery rules:

Define automatically discovered actions:

Set automatically discovered actions and rules on (enable)
Then reopen the agent and server and the host will be automatically discovered

Automatic registration:

Delete automatically discovered server1 first:
Then turn off the automatically discovered rules and actions.
Select Auto Registration to create an action


Set auto registration on.

Restart agent and server.
Automatically register server1, as shown in Figure

Tags: Zabbix RPM MySQL MariaDB

Posted on Tue, 21 Apr 2020 13:39:19 -0400 by kef