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

                                                                         zabbix4.0.21部署

                                                                    

    http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/

    下载  

    配置

    启动


                                                                                   

                                         下载

    安装源

    cat <<EOF > /etc/yum.repos.d/zabbix.repo 
    [zabbix]
    name=Zabbix Official Repository - $basearch
    baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.2/rhel/7/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
     
    [zabbix-non-supported]
    name=Zabbix Official Repository non-supported - $basearch 
    baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
    gpgcheck=1
    EOF
     
    添加gpgkey
    curl https://mirrors.aliyun.com/zabbix/RPM-GPG-KEY-ZABBIX-A14FE591
    -o /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
     
    curl https://mirrors.aliyun.com/zabbix/RPM-GPG-KEY-ZABBIX
    -o /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
     添加之后即可使用
    yum makecache -y

    或者:

    安装zabbix服务端,和客户端,mariadb数据库
     yum install -y zabbix-server-mysql zabbix-web-mysql
       zabbix-agent mariadb-server

                                                       配置

    启动数据库开机自启
    systemctl start   mariadb.service 
    systemctl enable  mariadb.service 
    创建zabbix库并授权zabbix用户
    create database zabbix character set utf8 collate utf8_bin;
    grant all privileges on zabbix.* to zabbix@localhost identified by  'zabbix';
    进入目录,导入表
    cd /usr/share/doc/zabbix-server-mysql-4.0.5 
     zcat create.sql.gz |mysql -uzabbix  zabbix

    # 修改zabbix配置文件
    sed -i 's## DBPassword=#DBPassword=redhat#g' /etc/zabbix/zabbix_server.conf
    # 根据具体配置修改配置文件,当前为一台server,大多为默认,(示例参数配置)
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix


    配置PHP时区:
    # 配置Apache与Php配置
    sed -i 's## php_value date.timezone Europe/Riga#php_value date.timezone Asia/Shanghai#g' /etc/httpd/conf.d/zabbix.conf
     

                                                     启  动

    启动zabbix相关服务:
    systemctl start zabbix-server && systemctl enable  zabbix-server
    systemctl start httpd && systemctl enable httpd
     
    额外补充~
    修改zabbix web界面字体 
     cd /etc/alternatives/

    cd   /usr/share/fonts/dejavu
    mv DejaVuSans.ttf DejaVuSans.ttf.bak
    电脑  C:WindowsFonts拉出来一个字体并上传替换掉

    mv msyh.ttc  DejaVuSans.ttf
    刷新zabbix web页面即可


  • 相关阅读:
    LR: Voxel Map for Visual SLAM
    LR A Simplified Active Calibration Algorithm for Focal Length Estimation
    # LiteratureReview LeGO-LOAM
    Literature Review: Road is Enough
    vue使用SockJS实现webSocket通信
    flex布局常用样式
    vue 关于render渲染函数的使用
    vue单页面应用打开新窗口显示跳转页面的方法
    vuex项目框架
    动态form表单,数据编辑部分数据编辑输入视图不更新问题
  • 原文地址:https://www.cnblogs.com/zongliang-ya/p/a318252e0e78744eae73fdfe11180575.html
Copyright © 2011-2022 走看看