本文主要包含centos 7 zabbix3.2,zabbix3.2安装,7编译安装zabbix3.2,编译安装zabbix3.2,centos7安装zabbix3.2等服务器相关知识,网友希望可以进行参考
CentOS 6.8安装Zabbix3.2
1.安装基础软件
yuminstall-yvimwgetlrzsz2.关闭selinux
setenforce03.更换yum源
mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.bakwgethttp://mirrors.aliyun.com/repo/epel.repo-O/etc/yum.repos.d/epel.repowgethttp://mirrors.aliyun.com/repo/Centos-6.repo-O/etc/yum.repos.d/CentOS-Base.repo4.安装mysql
查看已安装的mysql
yumlistinstalled|grepmysql删除已安装的mysql
yumremovemysql*安装mysql5.6的源
rpm-ivhhttp://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm安装mysql5.6
yuminstallmysql-server-y修改mysql配置文件
[mysqld]innodb_file_per_table启动mysql
/etc/init.d/mysqldstart进入mysql,创建zabbix用户并授权
mysql-uroot-pCREATEDATABASEzabbixCHARACTERSETutf8COLLATEutf8_bin;GRANTALLPRIVILEGESONzabbix.*TOzabbix@localhostIDENTIFIEDBY'zabbix';5.安装apache、php
配置web源
rpm-ivhhttp://repo.webtatic.com/yum/el6/latest.rpm安装apache、php
yum-yinstallhttpdphp56wphp56w-gdphp56w-mysqlphp56w-bcmathphp56w-mbstringphp56w-xmlphp56w-ldapntpdatenet-snmp*修改php配置文件
vim/etc/php.inipost_max_size=16Mmax_execution_time=300max_input_time=300date.timezone=Asia/Shanghaialways_populate_raw_post_data=-1启动apache
servicehttpdstart6.调整防火墙配置
iptables-IINPUT-ptcp-mmultiport--destination-port80,10050:10051-jACCEPTserviceiptablessave配置NTP时间
ntpdatetime.windows.com7.安装zabbix 创建用户
groupaddzabbixuseradd-gzabbixzabbix创建zabbix文件夹
mkdir/usr/local/zabbixcd/usr/local/zabbix下载zabbix3.2
wgethttp://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.0/zabbix-3.2.0.tar.gz解压
tarzxvfzabbix-3.2.0.tar.gz进入zabbix文件数据库导入表
cd/usr/local/zabbix/zabbix-3.2.0/database/mysqlmysql-uzabbix-pzabbixzabbix<schema.sqlmysql-uzabbix-pzabbixzabbix<images.sqlmysql-uzabbix-pzabbixzabbix<data.sql下载依赖包
yuminstall-ygccmysql-community-devellibxml2-develunixODBC-develnet-snmp-devellibcurl-devellibssh2-develOpenIPMI-developenssl-developenldap-develfping编译安装zabbix
cd/usr/local/zabbix/zabbix-3.2.0/./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl--with-libxml2--with-unixodbc--with-ssh2--with-openipmi--with-opensslmakeinstall修改zabbix_server配置文件
vim/usr/local/etc/zabbix_server.confDBName=zabbixDBUser=zabbixDBPassword=zabbixFpingLocation=/usr/sbin/fping创建zabbix-web页面文件夹
mkdir/var/www/html/zabbixcd/home/zabbix/downloads/zabbix-3.2.0/frontends/php/cp-a./var/www/html/zabbix/创建一个规则允许web服务器访问前端文件
chcon-Rv--type=httpd_sys_content_t/var/www/html运行Apache和zabbix访问外网
setsebool-Phttpd_can_network_connect=1setsebool-Pzabbix_can_network=1设置Apache用户web接口文件的所有者

