Zabbix3.0监控软件环境部署

仅仅是安装zabbix3.0罢了

Posted by     BY   杨晓明 on September 10, 2017

一、服务端安装

1.环境准备

安装epel源

wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

安装zabbix3.0的官方yum源

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

2.yum安装zabbix以及数据库

yum install  httpd zabbix-web zabbix-server-mysql zabbix-web-mysql  zabbix-agent  mariadb mariadb-server

3.修改一些配置

(1).数据库操作

create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@'localhost' identified by 'zabbix';
flush privileges;

(3).导入数据文件

cd /usr/share/doc/zabbix-server-mysql-3.0.10
zcat create.sql.gz |mysql -uzabbix -pzabbix zabbix

(3).修改php配置文件

egrep -n "^post_max_size|^max_execution_time|^max_input_time|^date.timezone" /etc/php.ini
sed -i 's#max_execution_time = 30#max_execution_time = 300#;s#max_input_time = 60#max_input_time = 300#;s#post_max_size = 8M#post_max_size = 16M#;910a date.timezone = Asia/Shanghai' /etc/php.ini

(4).修改zabbix_server配置文件

sed -i '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf

(5).复制网页文件到apache站点目录下

cp -R /usr/share/zabbix/ /var/www/html/

(6).文件授权

chmod -R 755 /etc/zabbix/web
chown -R apache.apache /etc/zabbix/web 

4.启动

systemctl start httpd.service
systemctl start zabbix-server.service

5.网页安装

现在使用浏览器访问你的IP/zabbix进行网页安装!

  1. 6.登录

    默认账号为:Admin
    默认密码为:zabbix

    二、客户端安装

    1.配置zabbix源

    安装epel源

    wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
    

    安装zabbix3.0的官方yum源

    rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
    

    2.下载客户端

    yum install zabbix-agent
    

    3.配置指向的服务端

    sed -i 's#Server=127.0.0.1#Server=172.16.1.61#' /etc/zabbix/zabbix_agentd.conf
    

    4.启动

    systemctl start zabbix-agent.service