Zabbix安装记录

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

 数据迁移,我们的Zabbix 也需要挪一挪。。。

   软件环境:

   Ubuntu 11.10

   nginx 1.0.15

   php-5.3.16

   MySQL 5.1.51

   Zabbix-1.8.15

   安装步骤:

   MySQL,NGINX省去

   php安装:

   依赖包安装:apt-get install libxml2  libxml2-dev  libpng*

   php 必须支持 php-gd、php-bcmath、php-xml、php-mysql、php-net-socket、php-mbstring

   ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-fpm --enable-sockets --enable-pdo --with-pdo-mysql=/usr/local/mysql --with-gd --enable-bcmath --enable-xml --enable-mbstring  && make && make install

   拷贝配置文件

   cp /data/php-5.3.19/php.ini-production  /usr/local/php/etc/php.ini

   修改部分:

   date.timezone = 'Asia/Chongqing'
   post_max_size = 16M
   max_execution_time = 600
   max_input_time = 600

  zabbix 安装:

  下载:wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/1.8.15/zabbix-1.8.15.tar.gz

  tar -xzf  zabbix-1.8.15.tar.gz

  groupadd zabbix;useradd zabbix -g zabbix

  数据库修改部分:

  create database zabbix character set utf8;
  grant all on zabbix.* to zabbix@'10.4.6.190' identified by 'xxxxxx';
  mysql -uroot -p zabbix < create/schema/mysql.sql  
  mysql -uroot -p zabbix < create/data/data.sql  
  mysql -uroot -p zabbix < create/data/images_mysql.sql
  ./configure --enable-server --enable-proxy --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --with-net-snmp --with-libcurl && make && make install 

  --enable-server 安装 Zabbix Server

  --enable-proxy 安装 Zabbix Proxy

  --enable-agent 安装 Zabbix Agent

  --with-mysql 使用 mysql 做数据库服务器

  --with-net-snmp 支持 SNMP

  --with-libcurl 支持 curl,用于 web 监控

  (缺少的依赖包:apt-get install libcurl4-gnutls-dev   apt-get install libcurl4-openssl-dev apt-get install net-snmp*   apt-get install libsnmp-dev)

   编辑 /etc/services,在后面追加:
zabbix-agent 10050/tcp Zabbix Agent  
zabbix-agent 10050/udp Zabbix Agent  
zabbix-trapper 10051/tcp Zabbix Trapper  
zabbix-trapper 10051/udp Zabbix Trapper  

  配置文件复制:

  mkdir /etc/zabbix  
cp misc/conf/zabbix_server.conf /etc/zabbix/  
cp misc/conf/zabbix_proxy.conf /etc/zabbix/  
cp misc/conf/zabbix_agent.conf /etc/zabbix/  
cp misc/conf/zabbix_agentd.conf /etc/zabbix/ 

  /etc/zabbix/zabbix_server.conf

  修改数据库连接设置:

  DBUser=zabbix  

  DBPassword=zabbix

  DBHost=10.4.3.163

安装启动脚本

cp misc/init.d/gentoo/zabbix-server /etc/init.d/  
cp misc/init.d/gentoo/zabbix-agentd /etc/init.d/ 
chmod +x /etc/init.d/zabbix-server  
chmod +x /etc/init.d/zabbix-agentd

nginx 配置文件:

server {
        listen 80;
        server_name zabbix.sigh.com.cn;
        client_max_body_size  10M;
        access_log /data/zabbix_php/zabbix.log   main;
        error_log  /data/zabbix_php/zabbix_error.log  warn;
        location / {  
                root /work/www/zabbix/php;  
                index index.html index.htm index.php;  
        } 
        location ~ \.php$ {  
        root /work/www/zabbix;  
        fastcgi_pass   127.0.0.1:8999;
        fastcgi_param  SCRIPT_FILENAME  /work/www/zabbix$fastcgi_script_name;
        fastcgi_index index.php;  
        include fastcgi_params;  
        }  
}

 

启动php-fpm。

默认用户名和密码是:Admin/zabbix;

安装FAQ:

1 configure: error: MySQL library not found
  the problem is not installed mysql-devel
  #apt-get install  libghc6-hsql-mysql-dev (ubuntu )

2 configure: error: Jabber library not found
  the problem is not installed jabber lib
  #apt-get install libphp-jabber
  #apt-get install libnet-jabber-loudmouth-perl
  #apt-get install jabber-dev
  #apt-get install libiksemel-dev  

3 configure: error: Not found curlLibrary
  the problem is not installed libcurl4-openssl-dev
  #apt-get install libcurl4-openssl-dev

4 configure: error : Not found NET-SNM library
  #apt-get install libsnmp-dev
  #apt-get install snmp




本文转自 位鹏飞 51CTO博客,原文链接:http://blog.51cto.com/weipengfei/1093072,如需转载请自行联系原作者
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
2月前
|
监控 关系型数据库 Linux
|
6月前
|
监控 关系型数据库 MySQL
企业实战(8)CentOS 6.8安装Zabbix-agent 5.0监控主机性能与Mysql数据库
企业实战(8)CentOS 6.8安装Zabbix-agent 5.0监控主机性能与Mysql数据库
|
4月前
|
存储 监控
Zabbix【问题 01】软件包 zabbix-release-6.2-3.el7.noarch (比 zabbix-release-5.0-1.el7.noarch 还要新) 已经安装
Zabbix【问题 01】软件包 zabbix-release-6.2-3.el7.noarch (比 zabbix-release-5.0-1.el7.noarch 还要新) 已经安装
57 0
|
4月前
|
监控 前端开发 应用服务中间件
Zabbix【部署 01】Zabbix企业级分布式监控系统部署配置使用实例(在线安装及问题处理)程序安装+数据库初始+前端配置+服务启动+Web登录
Zabbix【部署 01】Zabbix企业级分布式监控系统部署配置使用实例(在线安装及问题处理)程序安装+数据库初始+前端配置+服务启动+Web登录
414 0
|
4月前
|
监控 数据库连接 数据安全/隐私保护
安装Zabbix Server
安装Zabbix Server
54 1
|
9月前
|
监控 网络协议 Shell
使用脚本安装zabbix agent 6.0(新手友好)
使用脚本安装zabbix agent 6.0(新手友好)
|
4月前
|
存储 监控 前端开发
zabbix概述及简单的在centos7安装Zabbix5.0及添加监控对象
Zabbix是一种开源的企业级监控解决方案,用于实时监控网络、服务器、应用程序等各种设备和服务的性能和可用性,并提供通知和报警功能。它具有灵活可扩展、可定制化的特点,可以满足不同规模和需求的监控需求。
169 0
|
6月前
|
监控 Linux
CentOS 7安装zabbix-agent 5.0报错:依赖检测失败:libpcre.so.0(64bit)获取GPG密钥失败
CentOS 7安装zabbix-agent 5.0报错:依赖检测失败:libpcre.so.0(64bit)获取GPG密钥失败
136 0
|
6月前
|
监控 关系型数据库 MySQL
Zabbix分布式监控实战(二)——CentOS 7.5安装Zabbix-agent 5.0监控Mysql数据库
Zabbix分布式监控实战(二)——CentOS 7.5安装Zabbix-agent 5.0监控Mysql数据库
|
8月前
|
SQL 运维 监控
【运维知识进阶篇】Zabbix5.0稳定版详解11(在Grafana中使用Zabbix插件:安装Grafana+安装Zabbix插件+添加数据源+Grafana直连MySQL数据库取值)(下)
【运维知识进阶篇】Zabbix5.0稳定版详解11(在Grafana中使用Zabbix插件:安装Grafana+安装Zabbix插件+添加数据源+Grafana直连MySQL数据库取值)(下)
118 1