Zabbix快速部署:
官方安装说明:
源码包安装:http://it1693.blog.51cto.com/2342744/1609794
设置yum源
Zabbix 2.4 for RHEL6:
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Zabbix 2.4 for RHEL7
#rpm –ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
安装Zabbix包
Zabbix服务器的示例为mysql数据库和web前端。
1、首先安装LAMP环境,可使用yum的快速安装方法
2、安装Zabbix
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender
创建Zabbix数据、并授权zabbix用户
Mysql> mysql –uroot –c
Mysql>CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
Mysql>grant all privileges on zabbix.* to ‘zabbix‘@‘%‘ identified by ‘12345‘;
Mysql>flush privileges;
初始化zabbix数据库
# cd /usr/share/doc/zabbix-server-mysql-2.4.6/create
mysql -uroot zabbix < schema.sql
mysql -uroot zabbix < images.sql
mysql -uroot zabbix < data.sql
修改zabbix-server配置文件:
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=12345
修改PHP配置文件:
# vi /etc/php.ini
date.timezone = Asia/Shanghai #设置时区
以下是官方推荐设置:
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
启动zabbix
/etc/init.d/zabbix-server start
/etc/init.d/mysqld start
/etc/init.d/httpd start
/etc/init.d/zabbix-agent start
添加开机启动并关闭防火墙:
[[email protected]_3 ~]# chkconfig |egrep ‘httpd|mysqld|zabbix*|iptables‘
httpd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
iptables 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
mysqld 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
zabbix-agent 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
zabbix-server 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[[email protected]_3 ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled
Quickstart
浏览器访问:
http://10.0.0.63/zabbix/setup.php
1 Login and configuring user
This is the Zabbix “Welcome” screen. Enter the user name Admin with password zabbix to log in as a Zabbix superuser.