关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

centos 7安装 zabbix5 LTS LNMP

发布时间:2020-07-18 23:54:18
  1. # rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
    # yum clean all
    b. Install Zabbix server and agent
    # yum install zabbix-server-mysql zabbix-agent
    c. Install Zabbix frontend
    产品手册

    Enable Red Hat Software Collections

    # yum install centos-release-scl

    编辑配置文件 /etc/yum.repos.d/zabbix.repo and enable zabbix-frontend repository.

    [zabbix-frontend]
    ...
    enabled=1
    ...

    Install Zabbix frontend packages.

    # yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl
    d. 创建初始数据库
    产品手册

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

    # mysql -uroot -p
    password
    mysql> create database zabbix character set utf8 collate utf8_bin;
    mysql> create user zabbix@localhost identified by 'password';
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    mysql> quit;

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

    # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
    e. 为Zabbix server配置数据库

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

    DBPassword=password
    f. 为Zabbix前端配置PHP

    编辑配置文件 /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf, uncomment and set 'listen' and 'server_name' directives.

    # listen 80;
    # server_name example.com;

    编辑配置文件 /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf, add nginx to listen.acl_users directive.

    listen.acl_users = apache,nginx

    Then uncomment and set the right timezone for you.

    ; php_value[date.timezone] = Europe/Riga
    g. 启动Zabbix server和agent进程

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

    # systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
    # systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
    h. 配置Zabbix前端

    连接到新安装的Zabbix前端: http://server_ip_or_name
    根据Zabbix文件里步骤操作: Installing frontend

  2. 开始使用Zabbix



/template/Home/Zkeys/PC/Static