linux 安装 zabbix6.2

  1. 选择您Zabbix服务器的平台

     

     

     

    all and configure Zabbix for your platform
  2. a. Install Zabbix repository
    # rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-3.el8.noarch.rpm
    # dnf clean all
    b. Switch DNF module version for PHP
    # dnf module switch-to php:7.4
    c. 安装Zabbix server,Web前端,agent
    # dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
    d. 创建初始数据库

    Make sure you have database server up and running.

    在数据库主机上运行以下代码。

    # mysql -uroot -p
    password
    mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
    mysql> create user zabbix@localhost identified by 'password';
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    mysql> set global log_bin_trust_function_creators = 1;
    mysql> quit;

    导入初始架构和数据,系统将提示您输入新创建的密码。

    # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

    Disable log_bin_trust_function_creators option after importing database schema.

    # mysql -uroot -p
    password
    mysql> set global log_bin_trust_function_creators = 0;
    mysql> quit;
    e. 为Zabbix server配置数据库

    编辑配置文件 /etc/zabbix/zabbix_server.conf

    DBPassword=password
    f. 启动Zabbix server和agent进程

    启动Zabbix server和agent进程,并为它们设置开机自启:

    # systemctl restart zabbix-server zabbix-agent httpd php-fpm
    # systemctl enable zabbix-server zabbix-agent httpd php-fpm
    g. Open Zabbix UI web page

    The default URL for Zabbix UI when using Apache web server is http://host/zabbix

    浏览器访问,输入ip/zabbix,默认的账号密码是:Admin/zabbix,按步骤Next就行

posted @ 2023-02-11 14:25  chenbrosh-jackwang  阅读(125)  评论(0编辑  收藏  举报