zoukankan      html  css  js  c++  java
  • zabbix4.0部署

    1、环境检查

    cat /etc/redhat-release centos linux release 7.4.1708 uname -r getenforce systemctl status firewalld.service

    2、设置解析,自建yum源(可选) /etc/hosts

    #!/bin/bash #clsn #设置解析 注意:网络条件较好时,可以不用自建yum源 # echo '10.0.0.1 mirrors.aliyuncs.com mirrors.aliyun.com repo.zabbix.com'
    

    3、安装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 -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm

    4、安装zabbix

    yum install -y zabbix-server-mysql zabbix-web-mysql

    5、安装mariadb或mysql数据库(仅可创建一个)

    yum install -y mariadb-server systemctl start mariadb.service //启动

    6、创建数据库

    mysql> create database zabbix character set utf8 collate utf8_bin;

    7、创建zabbix用户并授权

    mysql> create user 'zabbix'@'192.168.191.%' identified by '111111'; mysql> grant all privileges on zabbix.* to 'zabbix'@'192.168.191.%' with grant option; mysql> flush privileges;

    8.导入zabbix压缩包内带的create文件(注意版本号和用户名密码是否正确)

    zcat /usr/share/doc/zabbix-server-mysql-3.0.28/create.sql.gz|mysql -uroot -p111111 zabbix

    9、配置zabbix(/etc/zabbix/zabbix_server.conf)

    DBHost=localhost //数据库地址 DBName=zabbix //数据库名称 DBUser=zbxuser //数据库登录用户 DBPassword=1111111 //数据库登录密码 DBPort=3306 //端口

    10、配置时区(/etc/httpd/conf.d/zabbix.conf) 18行添加

    php_value data.timezone Asia/Shanghai

    11、解决中文乱码(可选)

    yum -y install wqy-microhei-fonts cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf

    12、启动服务

    systemctl start zabbix-server systemctl start httpd

     

     

     

     

     

     

     

     

     

     

     

     

     

  • 相关阅读:
    MySQL数据库服务器的架设
    Ubuntu 16.04 LTS软件包管理基本操作
    2个 List<T>进行数据合并
    创建 cachingConfiguration 的配置节处理程序时出错: 未能加载文件或
    【转】.gitignore失效的解决办法
    【转】码农提高工作效率
    【转】从零开始编写自己的C#框架(7)——需求分析
    C#获取文件的绝对路径
    【转】类中如何引用server.MapPath()
    c# 运行时替换某文件源代码(将XML 转换成 某个枚举并写入源文件)
  • 原文地址:https://www.cnblogs.com/itstone/p/11766115.html
Copyright © 2011-2022 走看看