zabbix 企业级监控平台部署


2017年7月13日 01:37 ⋅ 阅读: 213


服务器硬件要求:

步骤分解: 1. 部署LNMP环境 2. 安装zabbix 3. web登陆初始化 4. 安装Graphtree插件

LNMP环境

http://list.attacker.club/scripts/shell/Databases/mysql/mysql-5.6.29_binary.sh

http://list.attacker.club/scripts/shell/WebServer/nginx/nginx-1.10.0.sh

http://list.attacker.club/scripts/shell/WebServer/php/php-5.6.21.sh

一键部署zabbix服务

http://list.attacker.club/scripts/shell/ServicesDeployment/zabbix/zabbix_install.sh

php-ldap(可选)

yum install openldap openldap-devel
cd php/php-5.6.21/ext/ldap/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make test
make install

vi /usr/local/php/etc/php.ini

extension=ldap.so #加入新模块

nginx 配置

server {
    listen       800;
    server_name  _;
        index index.html  index.php;
        root /www/zabbix;
        location ~ .*\.(php|php5)?$
        {
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
                expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
                expires 1h;
        }
        access_log off;
}
/usr/local/nginx/sbin/nginx -s reload
#载入配置

Graphtree

cd /www/zabbix/
wget https://raw.githubusercontent.com/OneOaaS/graphtrees/master/graphtree3.2.x.patch
yum install -y patch
patch -Np0 < graphtree3.2.x.patch
chown -R ${WEB_USER} oneoaas

#注意此处的权限,必须和nginx或者apache的用户一致,我用的是apache,则此处为chown -R apache:apache oneoaas/