Environment Readiness: Web Environment (APACHE,PHP,MYSQL)
Three are installed using Yum
Prepare yum Source, use Ali's source (Sina source installed Apache when there is a problem)
[Email protected]_master yum.repos.d]# wget-o/etc/yum.repos.d/centos-base.repo http://mirrors.aliyun.com/repo/ Centos-6.repo
Installing Php,apache,mysql
[[Email protected]_master yum.repos.d]# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php- XML [[email protected]_master yum.repos.d]# yum install mysql-server MySQL
The Web environment is ready
Set the MySQL password and create the Zabbix database
[[Email protected]_master ~]# mysql -urootwelcome to the mysql monitor . commands end with ; or \g.your mysql connection id is 3server version: 5.1.73 source distributioncopyright (c) 2000, 2013 , oracle and/or its affiliates. all rights reserved. oracle is a registered trademark of oracle corporation and/or Itsaffiliates. other names may be trademarks of their respectiveowners . type ' help; ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql> set password for ' root ' @ ' localhost ' =password (' 123456 '); query ok, 0 rows affected (0.00 sec) mysql> create database zabbix character set&Nbsp;utf8; query ok, 1 row affected (0.00 SEC)
Installing Zabbix with Yum
Get a third-party source first
RPM-IVH http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Start installation
[Email protected]_master yum.repos.d]# Yum Install zabbix-server-mysql zabbix-web-mysql
To view the path after its installation
[Email protected]_master create]# whereis Zabbixzabbix:/etc/zabbix/usr/lib/zabbix/usr/share/zabbix
Access to Zabbix Database information directory
[Email protected]_master create]# cd/usr/share/doc/zabbix-server-mysql-2.4.2/create[[email Protected]_master create]# ll Total dosage 2988-rw-r--r--. 1 root root 972744 November 19:25 data.sql-rw-r--r--. 1 root root 1978341 November 5 16:01 images.sql-rw-r--r--. 1 root root 104816 November 5 16:02 Schema.sql
Import the Zabbix database script into the database
To import in the following order, or you will get an error
[[Email Protected]_master create]# mysql-uroot-p123456 Zabbix < schema.sql[[email protected]_master create]# mysql-u root-p123456 Zabbix < Images.sql[[email protected]_master create]# mysql-uroot-p123456 Zabbix < Data.sql
Modify Zabbix profile Information
[[Email protected]_master create]# cd/etc/zabbix/[[email protected]_master zabbix]# ll total dosage 20drwxr-x---. 2 Apache Apache 4096 December 3 15:02 web-rw-r-----. 1 root Zabbix 13184 November 19:32 zabbix_server.conf[[email protected]_master zabbix]# CP zabbix_server.conf Zabbix_serve R.conf.bak20141203[[email Protected]_master zabbix]# Vim zabbix_server.confdbhost=localhostdbname=zabbixdbuser= Zabbixdbpassword=zabbix
Finally add the Zabbix site to Apache (direct Yum installation will automatically add the Zabbix configuration file directly)
Start the service
[[Email protected]_master conf.d]# service httpd start is starting &NBSP;HTTPD:HTTPD:&NBSP;APR _sockaddr_info_get () failed for puppet_masterhttpd: Could not reliably Determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName [Determine][[email protected]_master conf.d]# service zabbix-server startstarting zabbix server: [OK]
The rest is configured from the page
http://192.168.164.132/zabbix/setup.php
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/54/4E/wKioL1R-xLTQOOlrAAL3eZjEfmU763.jpg "title=" Qq20141203160336.png "alt=" Wkiol1r-xltqoolraal3ezjefmu763.jpg "/>
Subsequent records
Modify the php.ini file in the
Date.timezone = ' asia/chongqing '
Otherwise the page installation prompt does not have a time zone content and is changed to the Chongqing region.
This article is from the "Always_yunwei" blog, make sure to keep this source http://alwaysyunwei.blog.51cto.com/3224143/1585977
Full use of Yum to install Zabbix records