zoukankan      html  css  js  c++  java
  • Centos6.10源码部署zabbix-3.2.6

    环境:Centos6.10   已有lnmp环境  mysql5.7  php7.2

    创建zabbix数据库

    mysql> create database zabbix character set utf8 collate utf8_bin;
    mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

     创建zabbix用户

    shell> groupadd zabbix
    shell> useradd -g zabbix zabbix

     下载zabbix3.2.0安装包

    wget https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.6/zabbix-3.2.6.tar.gz


    导入zabbix数据到数据库中
    shell> tar zxvf zabbix-3.2.6.tar.gz
    shell> cd zabbix-3.2.6/database/mysql/
    shell> mysql -u zabbix -pzabbix < schema.sql
    shell> mysql -u zabbix -pzabbix < images.sql
    shell> mysql -u zabbix -pzabbix < data.sql
    编译安装zabbix(同时安装server端和agent端)
    shell>cd /root/zabbix-3.2.6
    shell> ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl
    shell> make install

    修改配置启动文件

    shell>vim /usr/local/etc/zabbix_server.conf
            DBName=zabbix
            DBUser=zabbix
            DBPassword=zabbix

     创建zabbix-web页面文件夹

    mkdir /home/zabbix
    cd /usr/local/zabbix/frontends/php/
    cp -a . /home/zabbix/

    配置nginx配置文件server段

    server {
            listen         88;
            root            /home/www/wwwroot/zabbix; #页面路径
                index   index.html index.htm index.php;
                include enable-php.conf;
            location ~* .(auto).(jpg|gif|png|jpeg)?$ {
                if (!-f $request_filename) {
                        rewrite ^/.*$ /autoimg.php;
                }
                expires max;
            }
    }

    授权

    chown -R www.www /home/zabbix
    chmod +x /home/zabbix/conf/

    拷贝启动服务

    cp /usr/local/zabbix/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server

    优化PHP

    vim /etc/php.ini
    post_max_size=16M
    max_execution_time=300
    max_input_time=300
    date.timezone=Asia/Shanghai
    always_populate_raw_post_data=-1
    /etc/init.d/httpd restart

    启动服务:

    service nginx reload 
    
    service zabbix_server start

    进入页面

  • 相关阅读:
    Android获取当前时间的3中方法总结
    解决 C# .NET WebClient WebRequest请求缓慢的问题
    无刷新的批量图片上传插件.NET版
    <img>标签显示本地路径的图片的.NET解决方案
    无刷新分页
    Shader基本类型
    shader内置变量和函数
    Shader基础
    Lua中的基本函数库
    Lua中的操作系统库
  • 原文地址:https://www.cnblogs.com/new-journey/p/10556540.html
Copyright © 2011-2022 走看看