Zabbix monitoring platform to build steps and related commands

First, build a LAMP environment, installation package-related zabbix
-Yum -y ××× tall http://repo.zabbix.com/zabbix/3.4/rhel/7/zabbix-release-3.4-el7.noarch.rpm
line installation zabbix official source software

-yum -y ××× tall zabbix-server- mysql zabbix-web-mysql zabbix-agent
directly installed through yum source

Second, most of the parameters have been adjusted file /etc/httpd/conf.d/zabbix.conf a good job, we need to change the time zone
-vim /etc/httpd/conf.d/zabbix.conf ------- enter and modify zabbix.conf file
will "php_value date.timezone xxxx / xxxx" changed to "php_value date.timezone Asia / Shanghai"

-systemctl restart httpd ------------ restart the web service

Third, prepare the initial database data
1) to establish a dedicated library and authorized users to zabbix
MySQL -u root ------- root user access to the database

create database zabbix character set utf8 collate utf8_bin; --- create a new library zabbix, support utf8 character sets

grant all on zabbix * to zabbix @ localhost identified by 'pwd @ 123';. -------- authorized users zabbix, password pwd @ 123, to allow access from the host

quit; ------------------- Exit
2) import the initial data
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -ppwd @ 123 zabbix

3) zabbix tell the server how to access database information
vim /etc/zabbix/zabbix_server.conf
DBPassword pwd = 123 @ // Note Deleting the # beginning of the line

Fourth, start the httpd service, zabbix-server service, zabbix-agent service
systemctl restart httpd zabbix-server zabbix- agent --------------- start the service

systemctl enable httpd zabbix-server zabbix-agent ------------ set to boot from the run

Fifth, visit the web interface, follow the prompts to install the settings
such as: http: // server configuration zabbix address /zabbix/setup.php

Sixth, the installation default administrator password is Admin zabbix

Common mistakes:
1) the initial page when accessing zabbix
page prompts -Time zone for PHP is not set ( configuration parameter "date.timezone").
The reason: date.timezone is not enabled (forgotten changed, or deleted in front of # no, complete change after not restart the httpd service)

2) page prompts to connect database failure
Details-Error connecting to database: Can not connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
reasons: mariadb service does not start

3) page prompts "Unknown database zabbix"
the Details-Error Connecting to Database: Unknown Database 'zabbix'
Cause: create a library called zabbix

4) pages Tip: Front details and zabbix database does not match the
Details-The frontend does not match Zabbix database.
The reason: zabbix library is empty (no import initial data library or import is unsuccessful)

5) Admin user login error page zabbix platform
-strtotime (): Invalid date.timezone value ' Asia / Shanhai', we selected the timezone 'UTC' for now
reason: the name of the time zone setting error

Guess you like

Origin blog.51cto.com/14310368/2409561