zoukankan      html  css  js  c++  java
  • zabbix4.2 安装

    官网
    https://www.zabbix.com/cn/download

    a. 安装 数据库
    rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
    yum clean all
    新建或找一个已有mysql实例并启动
    mysqld_safe --defaults-file=/etc/my_3301.cnf &

    b. 安装Zabbix server,Web前端,agent
    yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

    c. 创建初始数据库
    create database zabbix character set utf8 collate utf8_bin;
    grant all privileges on zabbix.* to zabbix@localhost identified by 'rootroot';
    grant all privileges on zabbix.* to zabbix@127.0.0.1 identified by 'rootroot';
    grant all privileges on zabbix.* to zabbix@'192.168.56.101' identified by 'rootroot';
    quit;

    mysql -uzabbix -prootroot -P3301 -h127.0.0.1

    导入初始架构和数据,系统将提示您输入新创建的密码。注意使用root用户操作,其他用户可能没有读取文件的权限
    zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -prootroot -P3301 -h127.0.0.1 zabbix

    zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -prootroot -S /data/mysql_3301/mysql_3301.sock zabbix

    d. 为Zabbix server配置数据库
    vim /etc/zabbix/zabbix_server.conf
    DBPassword=rootroot
    DBPort=3301

    e. 为Zabbix前端配置PHP
    vim /etc/httpd/conf.d/zabbix.conf
    php_value date.timezone  Asia/Shanghai

    f. 启动Zabbix server和agent进程
    启动Zabbix server和agent进程,并为它们设置开机自启:
    systemctl restart zabbix-server zabbix-agent httpd
    systemctl enable zabbix-server zabbix-agent httpd

    现在您的Zabbix server已经安装完成并开始运行

    配置Zabbix前端
    连接到新安装的Zabbix前端: http://192.168.56.101/zabbix
    根据Zabbix文件里步骤操作: 安装前端(https://www.zabbix.com/documentation/4.2/manual/installation/install#installing_frontend)


    下一步连接mysql数据库怎么都不成功,试了一些网上的方法,在我的环境中,全部尝试失败,zabbix连接mysql有这么难吗;

    接下来,看安装成功的都是单独安装了php,还有的安装了nginx来运行php才成功的。

  • 相关阅读:
    python 测试日志的简单写法
    selenium web端滑动页面查找元素
    selenium之内嵌网页iframe切换
    selenium多窗口切换,及其关闭
    selenium 双击操作右击操作鼠标悬停
    selenium web元素定位合集
    三大浏览器的驱动地址
    app 怎么区分是原生
    django 处理图片上传
    django时区问题
  • 原文地址:https://www.cnblogs.com/perfei/p/10755774.html
Copyright © 2011-2022 走看看