Environment:
Zabbix server: 192.168.1.1
MySQL Server: 192.168.1.2
Web server: 192.168.1.3
I. zabbix compilation and Installation
1. Install the server and agent at the same time, and add the database to MySQL DATA. You can use a configuration command similar to the following:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp > --with-libcurl
2. If only the server is installed and data can be put into the MySQL database, you can use a configuration command similar to the following:
./configure --enable-server --with-mysql --with-net-snmp
3. If only the proxy is installed and data can be put into MySQL, you can use a configuration command similar to the following:
./configure --profix=/usr --enable-proxy --with-net-snmp --with-mysql --with-ssh2
4. If you only install the agent, you can use a configuration command similar to the following:
./configure --enable-agent
5. Use make & make install to install
Ii. MySQL Server Configuration
1. Create Database zabbix on the MySQL server
CREATE DATABESE zabbix;
2. Authorize a user to allow zabbix server to access the database
mysql> GRANT ALL ON zabbix.* TO ‘username‘@‘192.168.1.1‘ IDENTIFY BY ‘password‘; mysql> FLUSH PRIVILEGES;
3. Import zabbix-server-mysql schema. SQL, images. SQL, and data. SQL of zabix server to the database zabbix.
You can use rpm-QL zabbix-server-MYSQL to view the file path;
mysql -uusername -ppassword -h192.168.1.2 zabbix < > /usr/share/doc/zabbix-server-mysql-*.*.*/create/schema.sql mysql -uusername -ppassword -h192.168.1.2 zabbix < > /usr/share/doc/zabbix-server-mysql-*.*.*/create/images.sql mysql -uusername -ppassword -h192.168.1.2 zabbix < > /usr/share/doc/zabbix-server-mysql-*.*.*/create/data.sql
3. zabbix configuration zabbix_server.conf
Vim/etc/zabbix/zabbix_server.conf test the default value here.
Note: zabbix_server.conf detailed configuration see: http://beijgh.blog.51cto.com/8272564/1547105
4. Start and view the monitoring process
1. Start Service zabbix-Server start.
2. SS tnphosphatase
Note: zabbix-server listens to port 10051 by default.
5. Configure web files
1. After httpd is installed, zabbix will automatically survive the configuration file zabbix. conf under/etc/httpd/CONF. d /.
2. Vim/etc/PHP. ini
Date. timezone = Asia/Shanghai # configure the default time zone of PHP
3. Service httpd start HTTPd service
4. Access 192.168.1.1/zabbix on the client to install zabbix.
Configure Database Type MySQL Database Host 192.168.1.2 database port default database name zabbix User Username Password click test to pass next
5. After the client configuration is complete, you can log on to the zabbix Web Management page.
6. Add host 192.168.1.3
1. Install zabbix-agent on 192.168.1.3
2. configuration/etc/zabbix/zabbix-agentd.conf
Server = 192.168.1.1 points to zabbix_server
3. Service zabbix-Agent start zabbix-agent service default port 10050
4. On the zabbix Client
Configuration --> hosts --> Create host name 192.168.1.3 visible name web-server groups/New Host group define a group or create a new group of Agent interfaces 192.168.1.3 DNS name this option can be port with either Interface 10050 other configurations may not be performed, you can also use add to add
7. Define monitoring items
1. Configuration --> hosts --> items --> Create item
For more information about zabbix operations, see zabbix user manual.
This article from the "drop not Acacia tears throw red beans" blog, please be sure to keep this source http://beijgh.blog.51cto.com/8272564/1547120
Zabbix deployment for monitoring