zoukankan      html  css  js  c++  java
  • 如来神掌第一式第二十六招----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 
  • 相关阅读:
    [bug] ERROR: Can't get master address from ZooKeeper; znode data == null
    [面试] 大数据
    [项目] 智慧出行
    [Linux] grep -v
    [Linux] > /dev/null 2>&1 &
    [bug] CDH报错:cloudera-scm-server dead but pid file exists
    [bug] CM / CDH 主机运行状态不良情况
    [bug] org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2
    [其他] 记忆的奥秘(一)
    处理数字的类 —— Math类 、 Random类 、 BigDecimal类 与 BigInteger类
  • 原文地址:https://www.cnblogs.com/Mahavairocana/p/8290283.html
Copyright © 2011-2022 走看看