zoukankan      html  css  js  c++  java
  • centos7安装zabbix(yum-lamp)

    安装要求https://www.zabbix.com/documentation/3.4/zh/manual/installation/requirements
    官网文档https://www.zabbix.com/documentation/3.4/zh/manual/installation

    添加Zabbix存储库
    [root@localhost ~]#rpm -ivh  http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
    
    启用yum仓库
    [root@localhost ~]#yum-config-manager --enable rhel-7-server-optional-rpms
    
    使用Mysql数据库安装Zabbix server、WEB前端的示例
    [root@localhost ~]#yum -y install zabbix-server-mysql zabbix-web-mysql
    
    安装zabbix server端,agent客户端
    [root@localhost ~]#yum -y install zabbix-server zabbix-agent
    
    安装mysql(mariadb)
    [root@localhost ~]#yum -y install mairadb mariadb-server
    [root@localhost ~]#systemctl start mariadb
    [root@localhost ~]#mysql -u root -p
    MariaDB > create database zabbix character set utf8;
    MariaDB > grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix' with grant option;
    MariaDB > flush privileges;
    MariaDB > quit;
    
    导入初始架构(Schema)和数据
    [root@localhost ~]#cd /usr/share/doc/zabbix-server-mysql-3.4.15
    [root@localhost ~]#zcat create.sql.gz | mysql -uzabbix -p zabbix
    
    在zabbix_server.conf中编辑数据库配置
    [root@localhost ~]#vim /etc/zabbix/zabbix_server.conf
    LogFile=/var/log/zabbix/zabbix_server.log
    LogFileSize=0
    PidFile=/var/run/zabbix/zabbix_server.pid
    SocketDir=/var/run/zabbix
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix
    SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
    Timeout=4
    AlertScriptsPath=/usr/lib/zabbix/alertscripts
    ExternalScripts=/usr/lib/zabbix/externalscripts
    LogSlowQueries=3000
    
    修改zabbix时区
    [root@localhost ~]#vim /etc/httpd/conf.d/zabbix.conf
    #取消注释“date.timezone”设置为亚洲上海时区
    php_value date.timezone Asia/Shanghai
    
    启动Zabbix
    [root@localhost ~]#systemctl start httpd
    [root@localhost ~]#systemctl start zabbix-server 
    [root@localhost ~]#systemctl start zabbix-agent
    
    访问zabbix
    Zabbix前端可以在浏览器中通过 http://ip/zabbix 进行访问。
    默认的用户名/密码为 Admin/zabbix。
    
    解决中文乱码
    在本地Windows电脑上拷贝一份字体(C:WindowsFonts)上传到服务器/usr/share/zabbix/fonts 目录下
    上传的字体后缀名修改为:.ttf 然后把zabbix默认的字体graphfont.ttf 修改为你上传的字体:
    
    sed -i 's@graphfont@xxx@g' /usr/share/zabbic/include/defines.inc.php
    
  • 相关阅读:
    04_数字信号滤波Matlab代码_常见操作
    03_FIR滤波器的设计
    CH340 USB to TTL connect to STM32F207 TTL UART
    linux内核中如果内存越界破坏了semphore同样会导致RCU STALL
    Build自己的kernel header
    事实证明,PHY Identify在外部电路异常情况下也是会发生变化的。
    vim配置参考
    技术经典图书(附电子版下载地址)
    转:linux内核源代码分析方法
    定期保存2017-04-19
  • 原文地址:https://www.cnblogs.com/51fly/p/11942311.html
Copyright © 2011-2022 走看看