CentOS6.7安装部署Zabbix

部署方式:由于操作系统限制,依赖环境rpm安装,zabbix3.2源码包编译安装,数据库使用MySQL5.6版本,前端使用Nginx

安装环境准备

Yum源配置

1、MySQL使用5.6.35版本,安装MySQL Yum源

rpm -ivh http://repo.mysql.com//mysql-community-release-el6-5.noarch.rpm

2、PHP使用5.6版本及前端使用Nginx

rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm

依赖环境安装及配置

1、安装PHP、Nginx及所依赖环境包

yum -y install nginx php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap wget  net-snmp*

2、安装zabbix源码编译安装所需依赖库等文件

yum install -y gcc gcc-c++ mysql-community-devel libxml2-devel  unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel openssl-devel openldap-devel

3、下载源码包并解压缩

https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.4/zabbix-3.2.4.tar.gz
tar zxvf zabbix-3.2.4.tar.gz

MySQL安装及配置

yum -y install mysql-server mysql mysql-devel
启动服务
Service mysqld start
设置mysql初始化相关配置
/usr/bin/mysql_secure_installation
登录数据库并创建zabbix数据库及用户
shell> mysql -uroot –pzabbix
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;

导入zabbix默认数据库及文件

cd /opt/zabbix-3.2.4/database/mysql
mysql -uzabbix -p zabbix

Zabbix3.2安装

1、创建zabbix用户及用户组

useradd -g zabbix zabbix
groupadd zabbix

2、创建zabbix安装目录

mkdir /usr/local/zabbix

3、编译安装

cd /opt/zabbix-3.2.4
/configure --prefix=/usr/local/zabbix/ --enable-server --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl

你可能感兴趣的:(CentOS6.7安装部署Zabbix)