Preparation of Knowledge:
Zabbix3.x compared to the previous 2.0 interface has changed a lot, but the installation and deployment process is basically the same as the 2.x.
1. zabbix2.x Installation Illustration Tutorial
Http://www.osyunwei.com/archives/7984.html
2.CentOS 7.0 compile and install nginx1.6.0+mysql5.6.19+php5.5.14
Http://www.osyunwei.com/archives/7891.html
3. Zabbix Package Download
Zabbix-3.0.1.tar.gz
Http://heanet.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.1/zabbix-3.0.1.tar.gz
Upload zabbix-3.0.1.tar.gz to the server/USR/LOCAL/SRC directory below
Installation deployment:
Please refer to the zabbix2.x installation illustration tutorial
First, create, import Zabbix database
CD/USR/LOCAL/SRC #进入软件包下载目录
Tar zabbix-3.0.1.tar.gz #解压
Cd/usr/local/src/zabbix-3.0.1/database/mysql #进入mysql数据库创建脚本目录
LS #列出文件, you can see that there are Schema.sql, Images.sql, data.sql three of files
Mysql-u root-p #输入密码, enter the MySQL console
Create database Zabbix character set UTF8; #创建数据库zabbix, and the database encoding uses UTF8
Insert into Mysql.user (Host,user,password) VALUES (' localhost ', ' Zabbix ', Password (' 123456 ')); #新建账户zabbix, password 123456
Flush privileges; #刷新系统授权表
Grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' 123456 ' with GRANT option; #允许账户zabbix能从本机连接到数据库zabbix
Flush privileges; #再次刷新系统授权表
Use Zabbix #进入数据库
Source/usr/local/src/zabbix-3.0.1/database/mysql/schema.sql #导入脚本文件到zabbix数据库
Source/usr/local/src/zabbix-3.0.1/database/mysql/images.sql #导入脚本文件到zabbix数据库
Source/usr/local/src/zabbix-3.0.1/database/mysql/data.sql #导入脚本文件到zabbix数据库
Note: Please import in the order above, otherwise an error will occur.
Exit #退出
or so Import
Mysql-uzabbix-p123456-hlocalhost Zabbix </usr/local/src/zabbix-3.0.1/database/mysql/schema.sql
Mysql-uzabbix-p123456-hlocalhost Zabbix </usr/local/src/zabbix-3.0.1/database/mysql/images.sql
Mysql-uzabbix-p123456-hlocalhost Zabbix </usr/local/src/zabbix-3.0.1/database/mysql/data.sql
Cd/usr/lib64/mysql #32位系统为/usr/lib/mysql, note that the system version may not be the same as the file version, this is 16.0.0
Ln-s libmysqlclient.so.16.0.0 libmysqlclient.so #添加软连接
Ln-s libmysqlclient_r.so.16.0.0 libmysqlclient_r.so #添加软连接
Second, installation Zabbix
1. Add Users:
Groupadd Zabbix #创建用户组zabbix
Useradd zabbix-g zabbix-s/bin/false #创建用户zabbix, and add user Zabbix to user group Zabbix
2. Install the dependent package #CentOS使用yum命令安装
Yum Install Net-snmp-devel Curl Curl-devel mysql-devel
Note: If the above package is installed when you install the Web environment lamp or LNMP, this step can be ignored
3, Installation Zabbix
Compiling and installing the Libiconv Library
Download page for package http://www.gnu.org/software/libiconv/
$./configure--prefix=/usr/local
$ make
$ make Install
2. In the/usr/local/lib/directory, copy the required library file libcharset.so.1, libiconv.so.2.
Ln-s/usr/local/lib/libiconv.so.2/usr/lib/libiconv.so.2 #添加软连接
/sbin/ldconfig #使配置立即生效
cd/usr/local/src/zabbix-3.0.1 #进入安装目录
./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 #安装
Ln-s/usr/local/zabbix/sbin/*/usr/local/sbin/ #添加系统软连接
Ln-s/usr/local/zabbix/bin/*/usr/local/bin/ #添加系统软连接
Description: Find/-name mysql_config lookup location, if not mysql_config, need to install Yum install Mysql-devel
4. Add the port corresponding to the Zabbix service
Vi/etc/services #编辑, add the following code at the end
# Zabbix
Zabbix-agent 10050/tcp # Zabbix Agent
Zabbix-agent 10050/UDP # Zabbix Agent
Zabbix-trapper 10051/tcp # Zabbix Trapper
Zabbix-trapper 10051/UDP # Zabbix Trapper
: wq! #保存退出
5. Modify the Zabbix configuration file
Cd/usr/local/zabbix/etc
Vi/usr/local/zabbix/etc/zabbix_server.conf
Dbname=zabbix #数据库名称
Dbuser=zabbix #数据库用户名
dbpassword=123456 #数据库密码
Listenip=localhost #数据库ip地址
Alertscriptspath=/usr/local/zabbix/share/zabbix/alertscripts #zabbix运行脚本存放目录
: wq! #保存退出
Vi/usr/local/zabbix/etc/zabbix_agentd.conf
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
Unsafeuserparameters=1 #启用自定义key
: wq! #保存退出
6. Add Boot Script
Cp/usr/local/src/zabbix-3.0.1/misc/init.d/fedora/core/zabbix_server/etc/rc.d/init.d/zabbix_server #服务端
Cp/usr/local/src/zabbix-3.0.1/misc/init.d/fedora/core/zabbix_agentd/etc/rc.d/init.d/zabbix_agentd #客户端
chmod +x/etc/rc.d/init.d/zabbix_server #添加脚本执行权限
chmod +x/etc/rc.d/init.d/zabbix_agentd #添加脚本执行权限
Chkconfig zabbix_server on #添加开机启动
Chkconfig zabbix_agentd on #添加开机启动
7. Modify the Zabbix installation directory in the Zabbix boot script
Vi/etc/rc.d/init.d/zabbix_server #编辑服务端配置文件
basedir=/usr/local/zabbix/ #zabbix安装目录
: wq! #保存退出
Vi/etc/rc.d/init.d/zabbix_agentd #编辑客户端配置文件
basedir=/usr/local/zabbix/ #zabbix安装目录
: wq! #保存退出
Third, configure the Web site
cd/usr/local/src/zabbix-3.0.1
Cp-r/usr/local/src/zabbix-3.0.1/frontends/php/usr/local/nginx/html/zabbix
Chown Www.www-R/usr/local/nginx/html/zabbix
[Email protected] mysql]#/usr/local/zabbix/sbin/zabbix_server
/usr/local/zabbix/sbin/zabbix_server:error while loading shared libraries:
Libmysqlclient.so.18:cannot open Shared object file:no such file or directory
[Email protected] mysql]# ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib64/
# If the 32-bit system needs to be connected to/usr/lib/under 64 bits put to lib64
Note:/usr/local/nginx/html for nginx default site Directory www for nginx running account
Service zabbix_server start #启动zabbix服务端
Service Zabbix_agentd start #启动zabbix客户端
Iv. modifying PHP configuration file parameters
1, Vi/etc/php.ini #编辑修改
Post_max_size =16m
Max_execution_time =300
Max_input_time =300
: wq! #保存退出
2, vi/usr/local/php/etc/php-fpm.conf #编辑修改
Request_terminate_timeout = 300
: wq! #保存退出
Service php-fpm Reload #重启php-fpm
V. Installation of the Web
Open in Browser:
Here are some of the installation
Next Step
System operation and maintenance www.osyunwei.com warm reminder: qihang01 original Content © Copyright, reproduced please indicate the source and the original link
Check the system environment settings, must all be OK, in order to continue
Next Step
Configuring MySQL Database Information
Database:mysql
Database Host:localhost
Database port:3306
Database Name:zabbix
User:zabbix
password:123456
Next Step
Next Step
Next Step
Finish installation Complete
Account: admin
Password: Zabbix
Sign in Login
As shown
Modify the Web interface to Chinese
1, modify the system configuration file, so that the Web page support Simplified Chinese display
vi/usr/local/nginx/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:/usr/local/nginx/html/zabbix/fonts
To back up the default font file: Dejavussans.ttf-bak
Modify the Msyh.ttf name called Dejavussans.ttf
Finally, modify the configuration information to change the default language to Chinese
Language:chinese (ZH_CN) #简体中文
At this point, the zabbix3.x installation illustration tutorial is complete.
» This article link: http://www.osyunwei.com/archives/9401.html» subscribe to this site: http://www.osyunwei.com/feed» reprint Please specify the Source: System Operation» zabbix3.x Installation Illustration Tutorial
zabbix3.x Installation Illustration Tutorial