• zabixx安装


    server端部署

    IP:192.168.88.42

    环境检查

    安装(使用yum安装)

    #安装zabbix源、aliyun YUM源
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
    #安装zabbix 
    yum install -y zabbix-server-mysql zabbix-web-mysql
    
    #安装启动 mariadb数据库
    yum install -y  mariadb-server
    systemctl start mariadb.service
    
    #创建数据库
    mysql -e 'create database zabbix character set utf8 collate utf8_bin;'
    mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";'
    #导入数据
    zcat /usr/share/doc/zabbix-server-mysql-3.0.25/create.sql.gz |mysql -uzabbix -pzabbix zabbix
    #配置zabbixserver连接mysql
    sed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf
    
    #添加时区
    sed -i.ori '18a php_value date.timezone  Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf
    #解决中文乱码
    yum -y install wqy-microhei-fonts
    cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
    #写入开机自启动
    chmod +x /etc/rc.d/rc.local
    cat >>/etc/rc.d/rc.local<<EOF
    systemctl start mariadb.service
    systemctl start httpd
    systemctl start zabbix-server
    EOF
    客户端快速部署
    客户端IP:192.168.88.41
    客户端环境

    #安装zabbix源、aliyun YUM源
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
    #安装zabbix客户端
    yum install zabbix-agent -y
    sed -i.ori 's#Server=127.0.0.1#Server=192.168.88.41#' /etc/zabbix/zabbix_agentd.conf
    systemctl start  zabbix-agent.service
    #写入开机自启动
    chmod +x /etc/rc.d/rc.local
    cat >>/etc/rc.d/rc.local<<EOF
    systemctl start  zabbix-agent.service
    EOF
    至此服务端和客户端安装完毕,服务端检查连通性
    服务端安装zabbix-get检测工具
    yum install zabbix-get
    进行测试
    zabbix_get -s 192.168.88.41 -p 10050 -k "system.cpu.load[all,avg1]"
    测试结果

    WEB界面操作

    浏览器访问http://192.168.88.42/zabbix/setup.php

    在检测信息时,可查看具体的报错信息进行不同的解决

    选择mysql数据库,填入相应配置

    填入名字,下一步

    点下一步

    点完成

    配置账户和密码

    进去后如下图所示

    Centos6安装部署客户端

    #安装zabbix源、aliyu nYUM源
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
    rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
    
    yum clean all
    yum clean all
    #安装zabbix客户端
    yum install zabbix-agent -y
    sed -i.ori 's#Server=127.0.0.1#Server=192.168.88.51#' /etc/zabbix/zabbix_agentd.conf
    /etc/init.d/zabbix-agent start
    
    #写入开机自启动
    chmod +x /etc/rc.d/rc.local
    cat >>/etc/rc.d/rc.local<<EOF
    /etc/init.d/zabbix-agent start
    EOF
    
    


     


  • 相关阅读:
    Windows 中 SQLite3 使用(1) -- 配置
    vs中qt的QIcon图标图片加载不上的问题
    VS中QT资源文件qrc加载失败(Q_INIT_RESOURCE)qInitResources_出错
    c++前置声明的一点总结
    Windows 如何在cmd命令行中查看、修改、删除与添加环境变量
    在DLL对话框中截获鼠标按下的消息
    c++跨动态库DLL的内存分配与释放问题
    C++中placement new操作符(经典)
    起底多线程同步锁(iOS)
    AutoLayout框架Masonry使用心得
  • 原文地址:https://www.cnblogs.com/zhong12322/p/10449470.html
Copyright © 2020-2023  润新知