Zabbix installation Detailed

Source: Internet
Author: User
Tags snmp

Installation deployment Abbix Distributed Monitoring System
First, Zabbix the main control side installs the deployment
1, installation Zabbix
[Email protected] ~]# yum-y install gcc mysql-server mysql-devel libcurl-devel net-snmp-devel php php-gd php-xml Php-mys QL php-mbstring Php-bcmath httpd
[Email protected] ~]# RPM-IVH php-bcmath-5.3.3-22.el6.x86_64.rpm--nodeps
[Email protected] ~]# RPM-IVH php-mbstring-5.3.3-22.el6.x86_64.rpm--nodeps
[Email protected] ~]# useradd-u Zabbix
[Email protected] ~]# TAR-ZXVF zabbix-2.2.6.tar.gz-c/usr/src/
[Email protected] ~]# cd/usr/src/zabbix-2.2.6/
[Email protected] ~]#/configure--prefix=/usr/local/zabbix--enable-server--enable-agent--WITH-NET-SNMP-- With-libcurl--enable-proxy--with-mysql=/usr/bin/mysql_config && make && make install
[Email protected] ~]# ln-s/usr/local/zabbix/sbin/*/usr/local/sbin/
[Email protected] ~]# ln-s/usr/local/zabbix/bin/*/usr/local/bin/
[Email protected] ~]# vim/etc/services
Add to:
Zabbix-agent 10050/tcp Zabbix Agent
Zabbix-agent 10050/UDP Zabbix Agent
Zabbix-trapper 10051/tcp Zabbix Trapper
Zabbix-trapper 10051/udp Zabbix Trapper
[Email protected] ~]# vim/usr/local/zabbix/etc/zabbix_server.conf
Modify:
Dbname=zabbix//Database name
Dbuser=zabbix//Database user name
dbpassword= 123.com//Database Password
listenip=127.0.0.1//Database IP address
Alertscriptspath=/usr/local/zabbix/share/zabbix/alertscripts
[Email protected] ~]# vim/usr/local/zabbix/etc/zabbix_agentd.conf
Modify:
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
Unsafeuserparameters=1
[Email protected] ~]# cp/usr/src/zabbix-2.2.6/misc/init.d/fedora/core/zabbix_agentd/etc/init.d/
[Email protected] ~]# cp/usr/src/zabbix-2.2.6/misc/init.d/fedora/core/zabbix_server/etc/init.d/
[Email protected] ~]# Vim/etc/init.d/zabbix_server
Modify:
basedir=/usr/local/zabbix/
Vim/etc/init.d/zabbix_agentd
Modify:
basedir=/usr/local/zabbix/
[Email protected] ~]# chmod +x/etc/init.d/zabbix_agentd
[Email protected] ~]# chmod +x/etc/init.d/zabbix_server
[[email protected] ~]#/etc/init.d/zabbix_agentd start
[[email protected] ~]#/etc/init.d/zabbix_server start
[Email protected] ~]# chkconfig--add zabbix_agentd
[Email protected] ~]# chkconfig zabbix_server on
[Email protected] ~]# chkconfig--add zabbix_server
[Email protected] ~]# chkconfig zabbix_agentd on
2. Configure MySQL
[Email protected] ~]# service mysqld restart
[Email protected] ~]# chkconfig--add mysqld
[Email protected] ~]# chkconfig mysqld on
[Email protected] ~]# mysqladmin-u root password ' 123.com '
[Email protected] ~]# mysql-u root-p123.com
To create a library:
Mysql>create database Zabbix default character set UTF8;
Mysql>grant all privileges in zabbix.* to [e-mail protected] identified by ' 123.com ';
[Email protected] ~]# mysql-u zabbix-p Zabbix </usr/src/zabbix-2.2.6/database/mysql/schema.sql
[Email protected] ~]# mysql-u zabbix-p Zabbix </usr/src/zabbix-2.2.6/database/mysql/images.sql
[Email protected] ~]# mysql-u zabbix-p Zabbix </usr/src/zabbix-2.2.6/database/mysql/data.sql
[Email protected] ~]# mysql-u root-p123.com
3. Configure PHP and HTTPD
[Email protected] ~]# Vim/etc/php.ini
Modify:
Max_execution_time = 300
Max_input_time = 300
Post_max_size = 16M
Date.timezone = Asia/shanghai
[Email protected] ~]# vim/etc/httpd/conf/httpd.conf
Modify:
DirectoryIndex index.php index.html Index.html.var
[Email protected] ~]# cp-r/usr/src/zabbix-2.2.6/frontends/php//var/www/html/zabbix
[Email protected] ~]# chown-r apache:apache/var/www/html/zabbix/
[Email protected] ~]# service httpd restart
[Email protected] ~]# chkconfig--add httpd
[Email protected] ~]# chkconfig httpd on
Verify:
Firefox Http://localhost/zabbix &
Second, the Zabbix was installed by the end of the deployment
[Email protected] ~]# hostname www.benet.com
[Email protected] ~]# useradd-u Zabbix
[Email protected] ~]# TAR-ZXVF zabbix-2.2.6.tar.gz-c/usr/src/
[Email protected] ~]# cd/usr/src/zabbix-2.2.6/
[[email protected] ~]#./configure--prefix=/usr/local/zabbix--enable-agent//Only agent functions are configured on the client.
[[email protected] ~]# make && make install
[Email protected] ~]# ln-s/usr/local/zabbix/sbin/*/usr/local/sbin/
[Email protected] ~]# ln-s/usr/local/zabbix/bin/*/usr/local/bin/
[Email protected] ~]# vim/usr/local/zabbix/etc/zabbix_agentd.conf
Modify:
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d///Note: Remove Lnclude comments and modify the path
Unsafeuserparameters=1//"0" to "1", enable the custom key
server=192.168.1.1//master server IP (IP for Zabbix server)
serveractive=192.168.1.1//master server IP (IP for Zabbix server)
hostname=www.benet.com//Managed End host name (host name of the managed side)
[Email protected] ~]# vim/etc/services
Add to:
Zabbix-agent 10050/tcp Zabbix Agent
Zabbix-agent 10050/UDP Zabbix Agent
Zabbix-trapper 10051/tcp Zabbix Trapper
Zabbix-trapper 10051/udp Zabbix Trapper
[Email protected] ~]# cp/usr/src/zabbix-2.2.6/misc/init.d/fedora/core/zabbix_agentd/etc/rc.d/init.d/zabbix_ Agentd
[Email protected] ~]# chmod +x/etc/rc.d/init.d/zabbix_agentd
[Email protected] ~]# VIM/ETC/RC.D/INIT.D/ZABBIX_AGENTD
Modify:
Basedir=/usr/local/zabbix//Modify the installation path to Zabbix
[Email protected] ~]#/etc/rc.d/init.d/zabbix_agentd restart
[Email protected] ~]# chkconfig--add zabbix_agentd
[Email protected] ~]# chkconfig zabbix_agentd on
Third, verify:
Open in Browser: http://localhost/zabbix/setup.php
Check the system environment settings, must all be OK, in order to continue
Next
Configuring MySQL Database Information
Database:mysql
Database host:127.0.0.1
Database port:use Default Port
Database Name:zabbix
User:zabbix
Password:zabbix
Test connection #测试数据库连接是否正常, indicating that OK is passed
Next
Next Default
Next
Finish installation Complete
Viii. change Zabbix default language to Simplified Chinese, replace the system default Chinese font on the monitor image
1, modify the system configuration file, so that the Web page support Simplified Chinese display
[Email protected] ~]# vim/var/www/html/zabbix/include/locales.inc.php #编辑修改
' ZH_CN ' = = Array (' name ' = = (' Chinese (zh_cn) '), ' display ' = False),
Revision changed to
' ZH_CN ' = = Array (' name ' = = (' Chinese (zh_cn) '), ' display ' = True),
: wq! #保存退出
2, replace the system default font #默认字体不支持中文 on the monitor image, if not replaced, the image will show garbled
A Chinese font file is copied in the C:\Windows\Fonts directory in the Windows system, such as Msyh.ttf
Upload the font file Msyh.ttf to the Fonts folder in the Zabbix site root directory
Example:/var/www/html/zabbix/fonts
To back up the default font file: Dejavussans.ttf-bak
Modify the Msyh.ttf name called Dejavussans.ttf
3. Open in the browser:
Http://127.0.0.1/zabbix
Note: Turn off SELinux, otherwise you will get an error.
Account: admin
Password: Zabbix
Sign in Login
As shown
Click Profile
As shown
Language:chinese (ZH_CN) #简体中文
Point Save Save
Exit the site and log back in as shown
The default interface is already displayed in Chinese

Zabbix installation Detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.