• install zabbix


    #yum install maridb and php apache
    yum install make httpd php mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-fpm php-gd php-mysql php-bcmath php-mbstring php-xml unixODBC-devel OpenIPMI-devel libxml2-devel mariadb mariadb-server -y

    #add new user zabbix
    useradd zabbix -s /sbin/nologin

    #start mariadb
    systemctl start mariadb.service

    #create new database
    mysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;"

    #create new user
    mysql -uroot -e "grant all on zabbix.* to zabbix@localhost identified by 'zabbix';"

    #flush privileges
    mysql -uroot -e "flush privileges;"

    #download zabbix installation and install
    cd /usr/local/src/
    wget https://testom.obs.cn-east-2.myhuaweicloud.com/zabbix-3.2.7.tar.gz
    tar -xf zabbix-3.2.7.tar.gz
    cd zabbix-3.2.7

    #excute sql script
    cd database/mysql/
    mysql -uzabbix -pzabbix zabbix < schema.sql
    mysql -uzabbix -pzabbix zabbix < images.sql
    mysql -uzabbix -pzabbix zabbix < data.sql

    #start install zabbix
    cd /usr/local/src/zabbix-3.2.7

    ./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-unixodbc

    make && make install

    #modify zabbix db password
    sed -i "s/# DBPassword=/DBPassword=zabbix/g" /usr/local/etc/zabbix_server.conf

    #copy start file to init.d

    cp /usr/local/src/zabbix-3.2.7/misc/init.d/fedora/core5/zabbix_server /etc/init.d/

    chmod +x /etc/init.d/zabbix_server

    #start zabbix
    /etc/init.d/zabbix_server start

    #modify php conf
    sed -i "s#max_execution_time = 30#max_execution_time = 300#" /etc/php.ini

    sed -i "s#max_input_time = 60#max_input_time = 300#" /etc/php.ini

    sed -i "s#post_max_size = 8M#post_max_size = 32M#" /etc/php.ini

    sed -i "s#;date.timezone =#date.timezone = Asia/Shanghai#g" /etc/php.ini

    #copy zabbix frontend to html
    cd /usr/local/src/zabbix-3.2.7/frontends/
    mkdir -p /var/www/html/zabbix
    cp -rf php/* /var/www/html/zabbix
    chmod -R 777 /var/www/html/zabbix

  • 相关阅读:
    解决CollectionView TableView reloadData或者reloadSections时的刷新的闪烁问题
    HTTP请求头
    Fastlane 使用笔记
    python-函数式编程
    python-高级特性
    python基础使用
    python基础-函数02
    python基础-函数01
    python基础
    Linux基础
  • 原文地址:https://www.cnblogs.com/zmichael/p/12054325.html
Copyright © 2020-2023  润新知