Zabbix Server installation and deployment, zabbix server deployment
Deployment Environment
RHEL 1, 6.7
Zabbix-server 2.2.14
Install zabbix official source
# Wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
# Rpm-ivh zabbix-release-2.2-1.el6.noarch.rpm
Install zabbix-server
# Yum install zabbix-server-mysql zabbix-web-mysql
Dependency Installed: OpenIPMI-libs.x86_64 0:2.0.16-14.el6 apr.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 dejavu-fonts-common.noarch 0:2.33-1.el6 dejavu-sans-fonts.noarch 0:2.33-1.el6 fontpackages-filesystem.noarch 0:1.41-1.1.el6 fping.x86_64 0:2.4b2-16.el6 freetype.x86_64 0:2.3.11-17.el6 gnutls.x86_64 0:2.8.5-19.el6_7 httpd.x86_64 0:2.2.15-54.el6.centos httpd-tools.x86_64 0:2.2.15-54.el6.centos iksemel.x86_64 0:1.4-2.el6 libX11.x86_64 0:1.6.3-2.el6 libX11-common.noarch 0:1.6.3-2.el6 libXau.x86_64 0:1.0.6-4.el6 libXpm.x86_64 0:3.5.10-2.el6 libjpeg-turbo.x86_64 0:1.2.1-3.el6_5 libpng.x86_64 2:1.2.49-2.el6_7 libtool-ltdl.x86_64 0:2.2.6-15.5.el6 libxcb.x86_64 0:1.11-2.el6 lm_sensors-libs.x86_64 0:3.1.1-17.el6 mailcap.noarch 0:2.1.31-2.el6 net-snmp.x86_64 1:5.5-57.el6 net-snmp-libs.x86_64 1:5.5-57.el6 php.x86_64 0:5.3.3-48.el6_8 php-bcmath.x86_64 0:5.3.3-48.el6_8 php-cli.x86_64 0:5.3.3-48.el6_8 php-common.x86_64 0:5.3.3-48.el6_8 php-gd.x86_64 0:5.3.3-48.el6_8 php-mbstring.x86_64 0:5.3.3-48.el6_8 php-mysql.x86_64 0:5.3.3-48.el6_8 php-pdo.x86_64 0:5.3.3-48.el6_8 php-xml.x86_64 0:5.3.3-48.el6_8 unixODBC.x86_64 0:2.2.14-14.el6 zabbix-server.x86_64 0:2.2.14-1.el6 zabbix-web.noarch 0:2.2.14-1.el6
Php and httpd are automatically installed.
Install MySQL
MySQL 5.6.31 community edition is selected here
Modify the MySQL configuration file
# Vi/etc/my. cnf
character-set-server=utf8
It is mainly to modify the character set. Otherwise, garbled characters will occur when you switch to the Chinese environment on the WEB page.
Restart MySQL Service
# Service mysqld restart
Create and authorize zabbix Database
Mysql> create database zaibbix;
Mysql> grant all on zabbix. * to zabbix @ 'localhost' identified by 'zabbix ';
Mysql> flush privileges;
Import zabbix-server Database
# Cd/usr/share/doc/zabbix-server-mysql-2.2.14/create
# Mysql zabbix <schema. SQL
# Mysql zabbix <images. SQL
# Mysql zabbix <data. SQL
Note: To deploy zabbix-proxy, you only need to import schema. SQL.
Configure zabbix-server Parameters
# grep -Ev "^$|^#" /etc/zabbix/zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.logLogFileSize=0PidFile=/var/run/zabbix/zabbix_server.pidDBName=zabbixDBUser=zabbixDBPassword=zabbixDBSocket=/var/lib/mysql/mysql.sockSNMPTrapperFile=/var/log/snmptt/snmptt.logAlertScriptsPath=/usr/lib/zabbix/alertscriptsExternalScripts=/usr/lib/zabbix/externalscripts
In this case, you do not need to modify the parameters, such as the MySQL user name, password, port, and socket file.
Start zabbix-server Service
#/Etc/init. d/zabbix-server start
If the startup fails, locate the problem through/var/log/zabbix/zabbix_server.log.
Configure php Parameters
Related parameters have been configured in zabbix RPM. You only need to set the time zone.
# Vim/etc/httpd/conf. d/zabbix. conf
<Directory "/usr/share/zabbix"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all <IfModule mod_php5.c> php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Shanghai </IfModule></Directory>
In fact, these parameters can also be set in/etc/php. ini.
Start the httpd service
#/Etc/init. d/httpd start
Configure the WEB page
Open the browser and enter http: // ip/zabbix. In this example, 192.168.244.30/zabbix
Step 1
Step 2
If you are prompted that the parameter does not pass, you need to modify the php. ini configuration file and restart the httpd service.
Step 3
Click "Test connection" to Test whether the database can be connected.
Step 4
Step 5
Step 6
Enter the logon page
The default account is admin and the password is zabbix.