系统:CentOS7.0
全部使用yum安装方式
1、安装zabbix的yum源
# yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
2、安装zabbix各组件
# yum install -y zabbix-agent zabbix-get zabbix-java-gateway zabbix-server-mysql zabbix-web zabbix-web-mysql zabbix-sender
3、安装mysql服务
# yum install mariadb-server mariadb
4、启动mysql服务
# systemctl start mariadb.service
5、新建zabbix在mysql中的用户和权限
mysql> create database mysql;
mysql> grant all privileges on zabbix.* to zabbix@‘192.168.%‘ identified by ‘123.com‘ with grant option;
mysql> flush privileges;
6、导入mysql数据
# cd /usr/share/doc/zabbix-server-mysql-3.0.0
# zcat create.sql.gz | mysql -uzabbix -p123.com -h192.168.1.119 zabbix
7、配置mysql环境
# vim /etc/zabbix/zabbix_server.conf
# DBHost=192.168.1.119
# DBName=zabbix
# DBUser=zabbix
# DBPassword=zabbix
8、启动zabbix-server
# systemctl start zabbix-server
9、配置zabbix的php环境
# vim /etc/httpd/conf.d/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
10、启动httpd
# systemctl start httpd
之前部署的时候提示时区问题,在
# vim /etc/php.ini
date.timezone = Asia/Shanghai
系统默认是没有中文语言支持的,需要修改一个参数:
vim include/locales.inc.php zh_CN‘ => array(‘name‘ => _(‘Chinese (zh_CN)‘), ‘display‘ => true),
false,请改为true
解决中文乱码问题:
复制windows下字体例如微软雅黑msyh到zabbix服务器的/ZABBIX_WEB/zabbix/fonts下
修改zabbix的web端/include/defines.inc.php
define(‘ZBX_FONT_NAME‘, ‘msyh‘)
define(‘ZBC_GRAPH_FONT_NAME‘, ‘msyh‘)
整个安装部署就完成了
访问:
具体请参照官档:https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages
本文出自 “IT小菜” 博客,请务必保留此出处http://3777119.blog.51cto.com/3767119/1835774
原文地址:http://3777119.blog.51cto.com/3767119/1835774