zoukankan      html  css  js  c++  java
  • zabbix监控

    zabbix 
       1.先安装lnmp环境
        yun -y install gcc pcre-devel  openssl-devel 
        tar -xf nginx-1.12.2.tar.gz
        cd nginx-1.12.2.tar.gz
        ./configure  --with-http_ssl_module
        make  && make install
        yum -y install php   php-mysql  php-fpm  mariadb  mariadb-server  mariadb-devel
       修改配置文件  vim /usr/local/nginx/conf/nginx.conf
     改成支持php 页面
     启动 php-fpm  mariadb      和 /usr/local/nginx/conf/nginx.conf
        2. 安装源码zabbix
         yum -y install net-snmp-devel  curl-devel  libevent-devel
         tar -xf zabbix-3.4.4.tar.gz 
         cd   zabbix-3.4.4
         ./configure  --enable-server  --enable-proxy  --enable-agent  --with-mysql=/usr/bin/mysql_config  --with-net-snmp --with-libcurl 
         make  install 
      3.初始化准备
      mysql  直接进入数据库
      create  databases  zabbix character  set  utf8;    (创建zabbix库支持中文格式)
      grant  all on  zabbix.* to zabbix@"localhost" identified by 'zabbix'  (授权用户并设置密码)
      cd zabbix-3.4.4 /databases/mysql
      mysql -uzabbix -pzabbix < schema.sql
      mysql -uzabbix -pzabbix < images.sql
      mysql -uzabbix -pzabbix < data.sql
      4.上线zabbix页面
      cd zabbix-3.4.4 /frontends/php
      cp -a *  /usr/local/nginx/html
      chmod -R 777  /usr/local/nginx/html/*
      修改nginx配置文件   vim /usr/local/nginx/conf/nginx.conf
      添加:fastcgi_buffers 8 16k; (缓存php生成页面内容8个16k)
      fastcgi_buffers_size  32k;(缓存php生产的头部信息)
      fastcgi_connect_timeout 300; (链接php的超时时间)
      fastcgi_send_timeout 300; (发送请求的超时时间)
      fastcgi_read_timeout 300; (读取请求的超时时间)
      关闭nginx 在开启
      yum- y install  php-gd  php-xml  php-ldup  php-dcmath  php-mbstring 
      vim /etc/php.ini
    878行   date.timezone=Asia/Shanghai    设置时区上海
    384行   max_execution_time=300           最大执行时间  秒
    643行   post_max_size=32M                   POST数据最大容量
    394行   max_input_time=300                   服务器接收数据时间限制
    systemcle  restart   php-fpm
    5.启动服务
    修改配置文件   vim /usr/local/etc/zabbix_server.conf
    DBHOST=localhost          数据库主机
    DBNAME=zabbix              设置数据库名称
    DBUSER=zabbix              数据库账号
    DBPassword=zabbix        密码
    LogFile=/tmp/zabbix_server.log    日志
    启动服务前先创建个用户不然无法启动
    useradd      zabbix
    启动服务    zabbix_server
    ss  -lntup  | grep  :10051     查看端口
    停止服务     killall  -q zabbix_server
     
    被监控几台做:
    yum -y install     gcc   pcre-devel
    tar  -xf  zabbix-3.4.4tar.gz
    cd zabbix-3.4.4
    ./configure  --enable-agent
    make   install
    useradd     zabbix
    zabbix_server   启动服务

    访问监控页面   firefox  http://192.168.4.25/index.php
     
     
  • 相关阅读:
    无限维
    黎曼流形
    why we need virtual key word
    TOJ 4119 Split Equally
    TOJ 4003 Next Permutation
    TOJ 4002 Palindrome Generator
    TOJ 2749 Absent Substrings
    TOJ 2641 Gene
    TOJ 2861 Octal Fractions
    TOJ 4394 Rebuild Road
  • 原文地址:https://www.cnblogs.com/xiaolei123/p/11841619.html
Copyright © 2011-2022 走看看