• 如来神掌第一式第二十六招----ZABBIX详解


    yum -y install wget vim tree gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath mysql-connector-odbc mysql-devel libdbi-dbd-mysql net-snmp net-snmp-devel curl-devel
    service httpd start;service mysqld start;chkconfig httpd on;chkconfig mysqld on
    sed -i "s@;date.timezone =@date.timezone = Asia/Shanghai@g" /etc/php.ini
    sed -i "s@max_execution_time = 30@max_execution_time = 300@g" /etc/php.ini
    sed -i "s@post_max_size = 8M@post_max_size = 32M@g" /etc/php.ini
    sed -i "s@max_input_time = 60@max_input_time = 300@g" /etc/php.ini
    sed -i "s@memory_limit = 128M@memory_limit = 128M@g" /etc/php.ini
    sed -i "s@;mbstring.func_overload = 0@ambstring.func_overload = 2@g" /etc/php.ini
    echo "ServerName localhost:80" >>/etc/httpd/conf/httpd.conf
    /etc/init.d/httpd restart
    wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
    groupadd -g 201 zabbix
    useradd -g zabbix -u 201 -s /sbin/nologin zabbix
    tar xf zabbix-2.4.5.tar.gz
    cd zabbix-2.4.5
     ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl
     make && make install
     mysql -e "create database zabbix default charset utf8;"
     mysql -e "grant all on zabbix.* to zabbix@localhost identified by 'zabbix';"
     mysql -uzabbix -pzabbix zabbix<./database/mysql/schema.sql
     mysql -uzabbix -pzabbix zabbix<./database/mysql/images.sql
     mysql -uzabbix -pzabbix zabbix<./database/mysql/data.sql
     mkdir /var/log/zabbix
     chown zabbix.zabbix /var/log/zabbix
     ln -s /usr/local/zabbix/etc/ /etc/zabbix
     ln -s /usr/local/zabbix/bin/* /usr/bin/
     ln -s /usr/local/zabbix/sbin/* /usr/sbin/
     cp /root/zabbix-2.4.5/misc/init.d/fedora/core/zabbix_* /etc/init.d
     chmod 755 /etc/init.d/zabbix_*
     sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_server
     sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_agentd
     sed -i "s@DBUser=root@DBUser=zabbix@g" /etc/zabbix/zabbix_server.conf
     sed -i "s@#DBPassword=@DBPassword=zabbix@g" /etc/zabbix/zabbix_server.conf
     sed -i "s@# DBPassword=@DBPassword=zabbix@g" /etc/zabbix/zabbix_server.conf
     sed -i "s@Server=127.0.0.1@Server=127.0.0.1,192.168.3.28@g" /etc/zabbix/zabbix_agentd.conf
     sed -i "s@ServerActive=127.0.0.1@ServerActive=$IP:10051@g" /etc/zabbix/zabbix_agentd.conf
     sed -i "s@tmp/zabbix_agentd.log@var/log/zabbix/zabbix_agentd.log@g" /etc/zabbix/zabbix_agentd.conf
     sed -i "s@^# UnsafeUserParameters=0@UnsafeUserParameters=1
    @g" /etc/zabbix/zabbix_agentd.conf
     cp -r /root/zabbix-2.4.5/frontends/php/ /var/www/html/zabbix/
     chown -R apache.apache /var/www/html/zabbix/
    chkconfig zabbix_server on
    chkconfig zabbix_agentd on
    service zabbix_server restart
    service zabbix_agentd restart
    wget --limit-rate 500k http://www.fping.org/dist/fping-3.8.tar.gz
    tar zxvf fping-3.8.tar.gz && cd fping-3.8
    ./configure && make && make install
    chown root:root /usr/local/sbin/fping
    chmod u+s /usr/local/sbin/fping 
  • 相关阅读:
    岭回归和LASSO
    涉及到的知识点有页连接符的使用、批量修改元器件属性等知识
    OrCAD中分立器件的Symbol绘制
    OrCAD来新建原理图工程、设置原理图页面、新建原理图库
    python控制TLP2041高压电源源码(modbus rtu,try捕获异常使用)
    pyqt5分离ui主线程到子线程
    modbus rtu协议
    pcb接地设计
    PSPICE参数扫描+光标跟踪曲线改变+窗口分多个坐标系
    ad 导入logo
  • 原文地址:https://www.cnblogs.com/Mahavairocana/p/8290283.html
Copyright © 2020-2023  润新知