首页 > 代码库 > zabbix安装(2.4)
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
系统环境
[root@zabbix-server ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
[root@zabbix-server ~]# setenforce 0
[root@zabbix-server ~]# /etc/init.d/iptables stop
安装zabbix
[root@zabbix-server ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm 该步将会自动创建yum源
[root@zabbix-server ~]# yum install zabbix-server-mysql zabbix-web-mysql -y
[root@zabbix-server ~]# yum install zabbix-agent -y
注:yum安装会将httpd和php做为依赖装好,且自动写好/etc/httpd/conf.d/zabbix.conf 文件
更改zabbix时区
[root@zabbix-server ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
[root@zabbix-server ~]# /etc/init.d/httpd restart
下载并配置数据库
[root@zabbix-server ~]# yum install -y mysql-server mysql
[root@zabbix-server ~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
[root@zabbix-server ~]# vim /etc/my.cnf
character-set-server = utf8
init-connect = ‘SET NAMES utf8‘
collation-server = utf8_general_ci
[root@zabbix-server ~]# /etc/init.d/mysqld restart
创建数据zabbix数据库并授权用户
[root@zabbix-server ~]# mysql
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘;
导入数据库文件
[root@zabbix-server ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/
[root@zabbix-server create]# mysql -uroot zabbix < schema.sql
[root@zabbix-server create]# mysql -uroot zabbix < images.sql
[root@zabbix-server create]# mysql -uroot zabbix < data.sql
配置zabbix-server
[root@zabbix-server ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@zabbix-server ~]# /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)