Zabbix is another use of a more monitoring tool, also need apache+php support, but it is more than Nagios a MySQL, because it has data to be stored. Therefore, to install Zabbix, you must install MySQL. Before installing the Zabbix, you also need to install the Epel extension source, because CentOS comes with a Yum source that is not Zabbix.
Note: Zabbix can also be used with LNMP, but in the Yum installation Zabbix the configuration file is generated to the Apache directory by default.
Installing the extension source
Installing Zabbix requires the use of an extension source
yum install -y epel-release
yum install -y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring
- Installing the Zabbix service side
yum install zabbix20 zabbix20-agent zabbix20-server zabbix20-server-mysql zabbix20-web zabbix20-web-mysql net-snmp-devel
Software installation is complete, before starting to do some configuration
- MySQL configuration file section
vim /etc/my.cnf
# 修改或增加如下内容
[mysql]
default-character-set = utf8
[mysqld]
character_set_server = utf8
Start the MySQL service
/etc/init.d/mysqld start
mysql -uroot -e "create database zabbix"
#增加zabbix用户
mysql -u root -e "grant all on *.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘"
#导入数据
mysql -uroot --default-character-set=utf8 zabbix < /usr/share/zabbix-mysql/schema.sql
-
mysql - uroot Span class= "pun" >-- default - character - set = utf8 Zabbix < /usr/ share / zabbix - mysql / images sql
mysql -uroot --default-character-set=utf8 zabbix < /usr/share/zabbix-mysql/data.sql
- Configure the admin login password for Zabbix
vim /etc/zabbix/zabbix_server.conf
# 配置 DBUser, DBPassword,后面登录会用到。
-
/etc/ init d / zabbix - server start
-
/ etc / Init d / zabbix - agent start
-
/ etc / Init d / httpd start
- Web Installation Zabbix
The browser accesses the Http://ip/zabbix, and by default there is a warning message such as "It's not safe to rely on the systems timezone settings", which requires/etc/php.ini settings Date.timez One= "Asia/shanghai"
1th step, Next 2nd step.
Next it will suggest that some parameters are inappropriate and need to be/etc/php.ini by editing the configuration file to resolve the relevant error message
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7D/5D/wKiom1bmsduSiCF6AAD7AbpKbug310.jpg "alt=" 36020160314175145616.jpg "" height= "380" >
3rd Step
Fill in the relevant information, Database port is 0, the default use of 3306 port
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7D/5B/wKioL1bmsmfwjoCWAADDpx3D8NI449.jpg "alt=" 36020160314175551782.jpg "" height= "381" >
4th step
Fill out Zabbix Server related information
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7D/5D/wKiom1bmsd7Bp2bxAACkHvJUz3M574.jpg "alt=" 36020160314175810413.jpg "" height= "380" >
5th step
Retry then enter MySQL related information. First of all to test, if you do not pass, you need to debug, after the test pass, click Next after you can preview the configuration information
6th step
Final finish, finish.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7D/5D/wKiom1bmsd_Sew8dAACVOOyqPW0845.jpg "alt=" 36020160314175848406.jpg "" height= "386" >
The default administrator account is admin, password is Zabbix, the above is already configured.
Problem:
The new Zabbix database login address is localhost, but input localhost is not available when the Zabbix Web page is installed, then enter 127.0.0.1.
Analysis:
Using localhost that means using the socket might not be the same location as your MySQL socket.
From for notes (Wiz)
Zabbix Service-side installation