zabbix安装(2.4)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zabbix安装(2.4)相关的知识,希望对你有一定的参考价值。
相关链接
zabbix官网:https://www.zabbix.com/
zabbix软件下载:https://www.zabbix.com/download
Zabbix 文档:https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages
系统环境
[[email protected] ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
[[email protected] ~]# setenforce 0
[[email protected] ~]# /etc/init.d/iptables stop
安装zabbix
[[email protected] ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm 该步将会自动创建yum源
[[email protected] ~]# yum install zabbix-server-mysql zabbix-web-mysql -y
[[email protected] ~]# yum install zabbix-agent -y
注:yum安装会将httpd和php做为依赖装好,且自动写好/etc/httpd/conf.d/zabbix.conf 文件
更改zabbix时区
[[email protected] ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
[[email protected] ~]# /etc/init.d/httpd restart
下载并配置数据库
[[email protected] ~]# yum install -y mysql-server mysql
[[email protected] ~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
[[email protected] ~]# vim /etc/my.cnf
character-set-server = utf8
init-connect = ‘SET NAMES utf8‘
collation-server = utf8_general_ci
[[email protected] ~]# /etc/init.d/mysqld restart
创建数据zabbix数据库并授权用户
[[email protected] ~]# mysql
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
导入数据库文件
[[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/
[[email protected] create]# mysql -uroot zabbix < schema.sql
[[email protected] create]# mysql -uroot zabbix < images.sql
[[email protected] create]# mysql -uroot zabbix < data.sql
配置zabbix-server
[[email protected] ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[[email protected] ~]# /etc/init.d/zabbix-server start
进入网页配置
http://192.168.10.129/zabbix/setup.php
密码是zabbix
本文出自 “feng” 博客,请务必保留此出处http://fengxiaoli.blog.51cto.com/12104465/1954649
以上是关于zabbix安装(2.4)的主要内容,如果未能解决你的问题,请参考以下文章