開發與維運

Zabbix部署文档

下载zabbix最新包:https://www.zabbix.com/download 我们找源码包 点击download即可

首先解压源码包:

tar -zxvf zabbix-3.2.0.tar.gz

创建zabbix用户:

groupadd zabbix
useradd -g zabbix zabbix

创建zabbix数据库:

预编译配置生成makefile:

./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl

编译安装:

make&& make install

进行配置文件修改

服务端:/usr/local/etc/zabbix_server.conf

客户端:/usr/local/etc/zabbix_agentd.conf

启动server:

zabbix_server

启动agentd:

zabbix_server

配置lnmp或者lamp环境

略(注意curl1.7.2以上版本 php5.6)

附:

php yum安装:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

yum install httpd mysql-server mysql-devel net-snmp-devel gcc php54w php54w-gdphp54w-bcmath php54w-xml php54w-ldap php54w-mbstring php54w-mysql php54w-cliphp54w-common php54w-pdo -y

php 源码包安装:

创建php用户 :

groupadd -r php && useradd -r -g php -s /bin/false -d /usr/local/php7 -M php

预编译配置生成makefile:

./configure' '--prefix=/usr/local/php' '--with-pdo-pgsql' '--with-zlib-dir' '--with-freetype-dir' '--enable-mbstring' '--with-libxml-dir=/usr' '--enable-soap' '--enable-calendar' '--with-curl' '--with-mcrypt' '--with-gd' '--with-pgsql' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-zlib' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-pcntl' '--enable-mbregex' '--enable-exif' '--enable-bcmath' '--with-mhash' '--enable-zip' '--with-pcre-regex' '--with-pdo-mysql' '--with-mysqli' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-openssl' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-libdir=/lib/x86_64-linux-gnu/' '--enable-ftp' '--with-gettext' '--with-xmlrpc' '--with-xsl' '--enable-opcache' '--enable-fpm' '--with-iconv' '--with-xpm-dir=/usr

如果遇到问题可以使用yum安装所需要的依赖包即可

配置php-fpm启动脚本启动php

访问url进行配置

官方部署文档:https://www.zabbix.com/documentation/3.2/manual/installation/install

Leave a Reply

Your email address will not be published. Required fields are marked *