Zabbix is also a use of a more monitoring tool, the same needs apache+php support, but it is more than Nagios one MySQL, because it has data to be stored. Therefore, installing Zabbix must install MySQL.
Installing the Epel extension source
[email protected] ~]# Yum install-y epel-release
Installing the RPM package for the lamp environment
[[email protected] ~]# yum install-y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring
Installing the Zabbix service side
[email protected] ~]# Yum install-y zabbix20 zabbix20-agent zabbix20-server zabbix20-server-mysql zabbix20-web zabbix20 -web-mysql Net-snmp-devel
Start the service
[[Email protected] ~]# /etc/init.d/zabbix-server startstarting zabbix server: [ Determine][[email protected] ~]# /etc/init.d/zabbix-agent startstarting zabbix agent: [OK][[email protected] ~]# /etc/init.d/httpd start is starting httpd:httpd: could not reliably determine the server ' S fully qualified domain name, using 0.0.0.133 for ServerName [OK]
Modify the MySQL configuration file
[Email protected] ~]# VIM/ETC/MY.CNF
Modify or add the following content
[Mysql]default-character-set=utf8[mysqld]character_set_server=utf8
Start MySQL
[[email protected] ~]# /etc/init.d/mysqld startplease report any problems with the /usr/bin/mysqlbug script! [OK] starting mysqld: [OK]
Create a database, import data
[Email protected] ~]# mysql-uroot-e "CREATE Database Zabbix" [[email protected] ~]# Mysql-uroot--default-character-set =utf8 Zabbix </usr/share/zabbix-mysql/schema.sql[[email protected] ~]# mysql-uroot--default-character-set=utf8 Zabbix </usr/share/zabbix-mysql/images.sql[[email protected] ~]# mysql-uroot--default-character-set=utf8 Zabbix & Lt /usr/share/zabbix-mysql/data.sql[[email protected] ~]# mysql-uroot-e "Grant all on * * to ' zabbix ' @ ' localhost ' identifie D by ' Zabbix '; "
[[email protected] ~]# vim /etc/zabbix/zabbix_server.confdbuser=zabbixdbpassword=zabbix[[ email protected] ~]# /etc/init.d/zabbix-server restartshutting down zabbix server: [Failure]starting zabbix server: [Determine][[email protected] ~]# netstat -lnp|grep zabbixtcp 0 0 0.0.0.0:10050 0.0.0.0:* listen 1691/ zabbix_agentdtcp 0 0 0.0.0.0:10051 0.0.0.0 :* LISTEN 2078/zabbix_servertcp 0 0 :::10050 :::* LISTEN 1691/zabbix_agentdtcp 0 0 :::10051 :::* LISTEN 2078/zabbix_server
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 system ' s timezone settings", which prompts you to set the Vim/etc/php.ini Date.timezone= "Asia/shanghai", restart Apache after the refresh is gone, click Next.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/83/B1/wKiom1d6YZmhbi8sAAEaQMOgHrc357.png "style=" float: none; "title=" 3.1-1.png "alt=" Wkiom1d6yzmhbi8saaeaqmoghrc357.png "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/83/B0/wKioL1d6YaCQp-eeAAOyHrajhkk433.png "style=" float: none; "title=" 3.1-2.png "alt=" Wkiol1d6yacqp-eeaaoyhrajhkk433.png "/>
It will suggest that some parameters are inappropriate:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/B1/wKiom1d6YaSjHNZSAAE9AbFOECk682.png "style=" float: none; "title=" 3.1-3.png "alt=" Wkiom1d6yasjhnzsaae9abfoeck682.png "/>
Edit the configuration file/etc/php.ini, resolve the relevant error message, and then click Retry.
[[Email protected] ~]# vim /etc/php.inipost_max_size = 16mmax_execution_time = 300max_input_time = 300[[email protected] ~]# service httpd Restart Stop httpd: [OK] starting Httpd:httpd: could not reliably determine the server ' s fully qualified domain name, using 0.0.0.133 for ServerName [OK]
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/B1/wKiom1d6YaezHg3hAAEpUswH7xg707.png "style=" float: none; "title=" 3.1-4.png "alt=" Wkiom1d6yaezhg3haaepuswh7xg707.png "/>
Then enter the MySQL information, first Test, do not pass the need to debug, pass the next step.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/B0/wKioL1d6Ya7iwZIEAAKLdhIurpk263.png "style=" float: none; "title=" 3.1-5.png "alt=" Wkiol1d6ya7iwzieaakldhiurpk263.png "/>
The first two items remain the default, where Zabbix-server port can be viewed with Netstat-lnp|grep Zabbix, name can be customized, I write as 127.0.0.1, below is the next to finish.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/B1/wKiom1d6YbCTX9NAAADldJQk7hE944.png "style=" float: none; "title=" 3.1-6.png "alt=" Wkiom1d6ybctx9naaadldjqk7he944.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/83/B0/wKioL1d6YbGiJG-WAAECGsu7exs425.png "style=" float: none; "title=" 3.1-7.png "alt=" Wkiol1d6ybgijg-waaecgsu7exs425.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/83/B0/wKioL1d6YbTAIDSYAADQ4e3D3p4897.png "style=" float: none; "title=" 3.1-8.png "alt=" Wkiol1d6ybtaidsyaadq4e3d3p4897.png "/>
Enter the login screen below, the default administrator account is admin, password is Zabbix.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/B1/wKiom1d6YbeimUPnAAEjIrnRVQo831.png "style=" float: none; "title=" 3.1-9.png "alt=" Wkiom1d6ybeimupnaaejirnrvqo831.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/83/B0/wKioL1d6Yb6iX-5rAAFgBwCVKi4685.png "style=" float: none; "title=" 3.1-10.png "alt=" Wkiol1d6yb6ix-5raafgbwcvki4685.png "/>
This article is from the "Learn Notes for students" blog, please make sure to keep this source http://sanyisheng.blog.51cto.com/11154168/1795730
3.1 Zabbix service-side installation