centos7下面yum安装zabbix3
1、安装zabbix的yum源
# yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
或者 rpm -ivh 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、为mysql创建 root用户及密码
mysqladmin -u root password 111111
mysql -uroot -p
创建zabbix数据库
create database zabbix
6、新建zabbix在mysql中的用户和权限
mysql> grant all privileges on zabbix.* to zabbix@‘localhost‘ identified by ‘111111‘ with grant option;
mysql> flush privileges;
7、导入mysql数据
cd /usr/share/doc/zabbix-server-mysql-3.0.0 #这里不一定是zabbix-server-mysql-3.0.0版本
zcat create.sql.gz | mysql -uzabbix -p111111 -h192.168.0.108 zabbix
8、配置mysql环境
# vim /etc/zabbix/zabbix_server.conf
DBHost=192.168.0.108
DBName=zabbix
DBUser=zabbix
DBPassword=111111
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
yum install -y httpd
systemctl start httpd
之前部署的时候提示时区问题,在
# vim /etc/php.ini
date.timezone = Asia/Shanghai
修改selinux
vim /etc/selinux/config
#SELINUX=enforcing
SELINUX=disabled
把防火墙关了
chkconfig iptables off
系统默认是没有中文语言支持的,需要修改一个参数:
/usr/share/zabbix/include/locales.inc.php
vim include/locales.inc.php zh_CN‘ => array(‘name‘ => _(‘Chinese (zh_CN)‘), ‘display‘ => true),
false,请改为true
访问地址为 http://192.168.0.108/zabbix
具体请参照官档:https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages
本文出自 “梁小明的博客” 博客,请务必保留此出处http://7038006.blog.51cto.com/7028006/1837120
原文地址:http://7038006.blog.51cto.com/7028006/1837120