zabbix3.2安装

硬件需求

Examples of hardware configurationThe table provides several examples of hardware configurations: 
Name    Platform  CPU/Memory   Database Monitored hosts
Small  CentOS  Virtual Appliance  MySQL InnoDB  100 
Medium  CentOS  2 CPU cores/2GB  MySQL InnoDB  500 
Large  RedHat Enterprise Linux  4 CPU cores/8GB  RAID10 MySQL InnoDB or PostgreSQL  >1000 
Very large  RedHat Enterprise Linux  8 CPU cores/16GB  Fast RAID10 MySQL InnoDB or PostgreSQL  >10000 

部署环境(硬件)需求主机数量:50台、网络设备数量:20台。总计监控点位70个。根据官方提供的硬件设备需求表,提出以下硬件需求CPU:1核。内存:2G磁盘容量:45G磁盘容量计算方式:linux操作系统+软件部署:6G服务器:50个点,每一分钟读取一次数据,每秒数据量为50*30/60=25个/秒。网络设备:20个点,每20秒读取一次数据,每秒数据量为20*30/20=30个/秒。zabbix每秒处理的数据量:55个/秒一条记录大小:5字节保存记录的值(一个月):24*30*3600(一个月的秒)*55*5=712800000字节(约为6.6G)趋势数据(5年):2100个*24小时*356天*128字节(一条趋势数据大小)*5=11G事件记录保存(一年):1年*365天*24小时*3600秒*130字节(一条事件记录的大小)=4.1G按照保存记录的值3个月,趋势数据5年,时间保存记录的值2年进行计算:所需磁盘容量为:6G+6.6G*3+11+4.1G*2=45G

数据库需求

Database management system
  Software    Version    Comments 
MySQL  5.0.3 or later  Required if MySQL is used as Zabbix backend database. InnoDB engine is required. 
Oracle  10g or later  Required if Oracle is used as Zabbix backend database. 
PostgreSQL  8.1 or later  Required if PostgreSQL is used as Zabbix backend database.
It is suggested to use at least PostgreSQL 8.3, which introduced much better VACUUM performance
SQLite  3.3.5 or later  Required if SQLite is used as Zabbix backend database. 
IBM DB2  9.7 or later  Required if IBM DB2 is used as Zabbix backend database. 

前端需求

Frontend

The following software is required to run Zabbix frontend:

Software  Version Comments
Apache  1.3.12 or later   
PHP  5.4.0 or later   
  PHP extensions: 
gd  2.0 or later  PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir). 
bcmath    php-bcmath (--enable-bcmath
ctype    php-ctype (--enable-ctype
libXML  2.6.15 or later  php-xml or php5-dom, if provided as a separate package by the distributor. 
xmlreader    php-xmlreader, if provided as a separate package by the distributor. 
xmlwriter    php-xmlwriter, if provided as a separate package by the distributor. 
session    php-session, if provided as a separate package by the distributor. 
sockets    php-net-socket (--enable-sockets). Required for user script support. 
mbstring    php-mbstring (--enable-mbstring
gettext    php-gettext (--with-gettext). Required for translations to work. 
ldap    php-ldap. Required only if LDAP authentication is used in the frontend. 
ibm_db2    Required if IBM DB2 is used as Zabbix backend database. 
mysqli    Required if MySQL is used as Zabbix backend database. 
oci8    Required if Oracle is used as Zabbix backend database. 
pgsql    Required if PostgreSQL is used as Zabbix backend database.
sqlite3   
Required if SQLite is used as Zabbix backend database.

 要点:( --with-mysqli=mysqlnd和--with-gettext一定要加上,否则前者不装时安装 zabbix时database type没有选项 默认出来的数据库是SqLite 3,且不能切换  ,后者不装时,会报PHP gettext warning)



 
Pre-requisite Minimum value Description
PHP version  5.4.0   
PHP memory_limit option  128MB  In php.ini:
memory_limit = 128M 
PHP post_max_size option  16MB  In php.ini:
post_max_size = 16M 
PHP upload_max_filesize option  2MB  In php.ini:
upload_max_filesize = 2M 
PHP max_execution_time option  300 seconds (values 0 and -1 are allowed) In php.ini:
max_execution_time = 300 
PHP max_input_time option  300 seconds (values 0 and -1 are allowed) In php.ini:
max_input_time = 300 
PHP session.auto_start option  must be disabled  In php.ini:
session.auto_start = 0 
Database support  One of: IBM DB2, MySQL, Oracle, PostgreSQL, SQLite  One of the following modules must be installed:
ibm_db2, mysql, oci8, pgsql, sqlite3 
bcmath    php-bcmath 
mbstring    php-mbstring 
PHP mbstring.func_overload option  must be disabled  In php.ini:
mbstring.func_overload = 0 
PHP always_populate_raw_post_data option  must be disabled  Required only for PHP versions 5.6.0 or newer.
In php.ini:
always_populate_raw_post_data = -1
sockets    php-net-socket. Required for user script support.  
gd  2.0 or higher  php-gd. PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir).
libxml  2.6.15  php-xml or php5-dom 
xmlwriter    php-xmlwriter 
xmlreader    php-xmlreader 
ctype    php-ctype 
session    php-session 
gettext    php-gettext
Since Zabbix 2.2.1, the PHP gettext extension is not a mandatory requirement for installing Zabbix. If gettext is not installed, the frontend will work as usual, however, the translations will not be available. 

其他扩展需求

 
Requirement Description
OpenIPMI  Required for IPMI support. yum install OpenIPMI-devel OpenIPMI
libssh2  Required for SSH support. Version 1.0 or higher.yum install libssh2 libssh2-devel
fping  Required for ICMP ping items.yum install fping
libcurl  Required for web monitoring, VMware monitoring and SMTP authentication. For SMTP authentication, version 7.20.0 or higher is required.yum install libcurl libcurl-devel
libiksemel  Required for Jabber support.
libxml2  Required for VMware monitoring. yum install libxml2 libxml2-devel
net-snmp  Required for SNMP support. yum install net-snmp net-snmp-devel

yum install OpenIPMI-devel OpenIPMI libssh2 libssh2-devel fping libxml2 libxml2-devel net-snmp net-snmp-devel -y

环境及相关软件

系统: CentOS release 6.7 (Final)

软件包:/home/tools  mysql-5.5.49.tar.gz  libiconv-1.14.tar.gz  nginx-1.8.1.tar.gz  php-5.6.22.tar.gz  zabbix-3.2.6.tar.gz  

数据库安装

yum install cmake  ncurses-devel openssl-devel -y
useradd mysql -s /bin/nologin -M
mkdir /data
chown -R mysql.mysql /data 

cd /home/tools/
tar -xf mysql-5.5.49.tar.gz
cd mysql-5.5.49
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.5.49 -DMYSQL_DATADIR=/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_EMBEDDED_SERVER=1 -DENABLED_PROFILING=1 -DWITH_DEBUG=0 

make
make install

ln -s /usr/local/mysql5.5.49  /usr/local/mysql
/bin/cp /home/tools/mysql-5.5.49/support-files/my-large.cnf /etc/my.cnf
chown -R mysql.mysql /usr/local/mysql

#vi /etc/my.cnf
#增加
#datadir = /data
#innodb_file_per_table = 1

/bin/cp /home/tools/mysql-5.5.49/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld

echo ‘export PATH=/usr/local/mysql/bin:$PATH‘ >>/etc/profile
source /etc/profile

cd  /usr/local/mysql/scripts
./mysql_install_db --basedir=/usr/local/mysql --datadir=/data/ --user=mysql
/etc/init.d/mysqld start

nginx安装

yum  install  pcre  pcre-devel -y
yum  install  openssl-devel   openssl -y
useradd  nginx  -s  /sbin/nologin  -M
cd /home/tools
tar -zxvf nginx-1.8.1.tar.gz
cd nginx-1.8.1
./configure --prefix=/usr/local/nginx-1.8.1 --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module
make
make install

ln -s /usr/local/nginx-1.8.1/ /usr/local/nginx

cd /usr/local/nginx
egrep -v "#|^$" conf/nginx.conf.default >conf/nginx.conf

在nginx.conf中的server内添加:
#vi conf/nginx.conf
location  ~.*\.(php|php5)$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include  fastcgi.conf;
        }

/usr/local/nginx/sbin/nginx

php安装

yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl-devel -y
cd /home/tools
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum -y install libmcrypt libmcrypt-devel mhash mhash-devel mcrypt -y
cd /home/tools
tar xf php-5.6.22.tar.gz
cd php-5.6.22
./configure --prefix=/usr/local/php5.6.22 --with-mysql=/usr/local/mysql --with-mysqli=mysqlnd  --with-pdo-mysql=mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --with-gettext --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp --enable-opcache --enable-ctype

make
make install
ln -s /usr/local/php5.6.22/ /usr/local/php
==============================================
#vi /etc/ld.so.conf.d/local.conf
/usr/local/lib64
#ldconfig
configure: error: Don‘t know how to define struct flock on this system, set --enable-opcache=no如果无法解决,尝试如下echo /usr/local/mysql/lib >> /etc/ld.so.confldconfig

=============================================

cp /home/tools/php-5.6.22/php.ini-production /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
/usr/local/php/sbin/php-fpm

#check whether fastcgi can connect php
vi /usr/local/nginx/html/phpinfo.php
<?php   phpinfo()  ?>

在浏览器中访问http://zabbix服务器IP/phpinfo.php

安装zabbix

mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
mysql> quit;

cd /home/toolstar -xf zabbix-3.2.6.tar.gzcd /home/tools/zabbix-3.2.6/database/mysqlmysql -uzabbix -pzabbix zabbix < schema.sqlmysql -uzabbix -pzabbix zabbix < images.sqlmysql -uzabbix -pzabbix zabbix < data.sql

cd /home/tools/zabbix-3.2.6./configure --prefix=/usr/local/zabbix  --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-ssh2make installcp -a  /home/tools/zabbix-3.2.6/frontends/php/* /usr/local/nginx/html/chown -R nginx.nginx /usr/local/nginx/html/

vi /usr/local/zabbix/etc/zabbix_server.confLogFile=/tmp/zabbix_server.logDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbix

useradd zabbix  -s /sbin/nologin  -M

cd  /usr/local/php/lib/ sed -i "s#post_max_size = 8M#post_max_size = 16M#g" php.inised -i "s#max_execution_time = 30#max_execution_time = 300#g" php.inised -i "s#max_input_time = 60#max_input_time = 300#g" php.inised -i "s#;date.timezone =#date.timezone = Asia/Shanghai#g" php.inised -i "s#;always_populate_raw_post_data = -1#always_populate_raw_post_data = -1#g" php.ini

killall php-fpm/usr/local/php/sbin/php-fpm 

浏览器,按照提示完成http://zabbix ip/setup.php
配置开机启动
cd /home/tools/zabbix-3.2.6/misc/init.d/fedora/core/
cp zabbix_* /etc/init.d/
chmod +x /etc/init.d/zabbix_server
chmod +x /etc/init.d/zabbix_agentd
chkconfig zabbix_server on
chkconfig zabbix_agentd on

修改zabbix开机启动脚本中的zabbix安装目录
vi /etc/rc.d/init.d/zabbix_server #编辑服务端配置文件
BASEDIR=/usr/local/zabbix/ #zabbix安装目录
vi /etc/rc.d/init.d/zabbix_agentd #编辑客户端配置文件
BASEDIR=/usr/local/zabbix/ #zabbix安装目录
 
时间: 2024-10-27 01:43:58

zabbix3.2安装的相关文章

zabbix3.x安装

Zabbix3.0rpm安装手册 环境准备 硬件设备准备(生产环境)l电脑一台,内存>=8G,可用磁盘空间大于 80G.l安装 CentOS-7.x-x86_64 系统.实验环境详情 主机名( FQDN) IP 地址( NAT) 描述 Zabbix-server eth0:192.168.100.2 1VCPU. 2G 内存.一块硬盘 sda50G(动态) 备注 1.安装的时候将网卡命名为 eth0. eth1 环境准备l安装操作系统 CentOS-7-x86_64.l基本系统: 1VCPU+2

zabbix专题:第二章 zabbix3.0安装详解

zabbix3.0安装详解 本节目录大纲 安装配置mariadb 安装服务器端 zabbix web配置 web页面初始化 更改为中文 中文乱码问题 zabbix专题:第二章 zabbix3.2安装详解 zabbix专题:第二章 zabbix3.2安装详解 官方文档地址: https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages 我安装zabbix用的rpm包,可以从官网的源里面去下载,需

Zabbix3.x安装图解教程

准备知识: Zabbix3.x比较之前的2.0界面有了很大的变化,但是安装部署过程与2.x基本完全一样. 1.Zabbix2.x安装图解教程 http://www.osyunwei.com/archives/7984.html 2.CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14 http://www.osyunwei.com/archives/7891.html 3.zabbix软件包下载 zabbix-3.0.1.tar.gz http://hea

烂泥:zabbix3.0安装与配置

这个月又快过完了,最近也比较忙,没时间写文章,今天挤点时间把zabbix3.0安装与配置的文章写下来. 其实zabbix3.0的安装很简单,但是由于个人比较懒,所以一直不喜欢使用源码方式进行安装,而且管理的服务器多了,源码安装也感觉不方便,所以现在大部分安装软件我都会首先选择yum或者apt-get方式进行. 本篇文章,我也不多介绍zabbix3.0安装的详细步骤了,只列出centos.ubuntu下zabbix3.0的相关安装命令以及zabbix的基本配置. zabbix3.0对OS的要求:m

zabbix3.0安装过程中出现的问题

1.   zabbix3.0 安装过程中修改完php.ini的文件重新启动php-fpm没有效果 可以到phpinfo里面看php.ini的默认位置 或者php-fpm启动的时候指定配置文件(-c  file) 2.连接mysql的过程中遇到can't connect to local MySQL server through socket "/tmp/mysql.sock" 如图 更改php.ini配置文件中的 pdo_mysql.default_socket= mysqli.def

Zabbix3.4安装部署 操作过程手册

1 系统环境cat /etc/redhat-release 更新centos yum -y update2 关闭防火墙systemctl stop firewalld.servicesystemctl disable firewalld.servicesed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/configgrep SELINUX=disabled /etc/selinux/configsetenforce 0reboo

Zabbix3.4安装详细步骤

Zabbix3.4安装的详细步骤 一.zabbix介绍 现在大多数公司都会用到监控软件,主流的监控软件就是Zabbix了,当然还会有Nagios等其他的软件: Zabbix简介: zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供柔软的通知机制以让系统管理员快速定位/解决存在的各种问题. zabbix 由2部分构成,zabbix server 与可选组件zabbix agent. zabb

zabbix3.x安装出现“configure: error: Not found mysqlclient library”的解决办法

如题所示,在CentOS6.x的系统中安装zabbix3.x,使用了以下的编译命令: ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 在编译时,可能会出现题目中所示的错误,可以通过安装mysql-devel这个库解决: [[email protected] za

zabbix3.0安装教程(环境)

 ZABBIX 安装图解教程(环境篇) 说明: 操作系统:Centos6.x(64) IP地址:192.168.1.1 Web环境:Mysql+Nginx+php Zabbix版本:zabbix3.0.3 备注:Linux下安装zabbix需要有LAMP或者LNMP运行环境   准备篇: 一.WEB环境安装:Mysql+Nginx+php CentOS 6.x编译安装Nginx1.8.0+MySQL5.1.73+PHP5.6.23 安装篇: 一.mysql安装 1.下载mysql到/usr/lo

CentOS7+LNMP 安装Zabbix3.0 安装笔记

转载 自 http://blog.csdn.net/asionliang/article/details/51733833 从网上看过N篇教程,小白编译各种出错,无奈选择LNMP一键安装包,解决所有问题.感谢lnmp.org的lamp一体包,现已成功安装,做个笔记,以便后查. 参考: http://www.cnblogs.com/swordxia/p/5591712.html 1.配置防火墙 [root~]# firewall-cmd --permanent --zone=public --ad