Centos7安装部署Zabbix
安装部署Zabbix需要安装四个组件:
Zabbix_Server、Zabbix_WEB、Datebases(mariadb)、Zabbix_Agant
一、Zabbix安装部署环境准备
Zabbix-server:192.168.206.139 ## zabbix服务端 ##
Zabbix-agent:192.168.206.141 ## zabbix客户端 ##
[root@localhost ~]# cat /etc/redhat-release ## 查看系统版本 ##
CentOS Linux release 7.6.1810 (Core)
[root@localhost ~]# uname -r ## 查看内核版本 ##
3.10.0-957.el7.x86_64
[root@localhost ~]# getenforce ## 检测selinux是否关闭 ##
Enforcing
[root@localhost ~]# vim /etc/selinux/config ## 关闭selinux ##
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl stop firewalld ## 关闭防火墙 ##
[root@localhost ~]# systemctl disable firewalld ## 关闭防火墙开机自启动 ##
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
二、Zabbix安装部署
——————————————— Zabbix_Server ——————————————
1、进入zabbix官网下载zabbix安装包
2、打开终端,通过mwget下载安装包到虚拟机上
[root@zabbix]#:mwgethttps://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.2.7/zabbix-4.2.7.tar.gz
3、解压zabbix压缩包,并进入zabbix目录
[root@localhost zabbix-soft]# tar -xzf zabbix-4.2.7.tar.gz
4、预编译之前,安装zabbix依赖软件
[root@localhost zabbix-4.2.7]#yum install -y curl curl-devel
[root@localhost zabbix-4.2.7]#yum install -y net-snmp net-snmp-devel
[root@localhost zabbix-4.2.7]#yum install -y perl-DBI mysql-devel
[root@localhost zabbix-4.2.7]#yum install -y libevent-devel
5、创建zabbix组
[root@localhost zabbix-4.2.7]# groupadd zabbix; useradd -g zabbix zabbix; usermod -s /sbin/nologin zabbix
6、对zabbix进行预编译
./configure --prefix=/usr/local/zabbix/ --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl
注:如果./configure中出现问题,需要解决问题,再make clean ,再进行预编译
7、对zabbix进行编译安装
[root@localhost zabbix-4.2.7]# make&&make install
8、进入zabbix配置文件目录查看是否安装成功
[root@localhost zabbix-4.2.7]# cd /usr/local/zabbix
[root@localhost zabbix-4.2.7]# ls
9、配置启动zabbix服务命令
[root@localhost zabbix-4.2.7]# pwd ## 进入zabbix安装目录 ##
/usr/local/zabbix-soft/zabbix-4.2.7
[root@localhost zabbix-4.2.7]#
[root@localhost zabbix-4.2.7]# ls
AUTHORS Makefile.in compile configure install-sh src
COPYING NEWS conf configure.ac m4
ChangeLog README config.guess database man
INSTALL aclocal.m4 config.log depcomp misc
Makefile bin config.status frontends missing
Makefile.am build config.sub include sass
[root@localhost zabbix-4.2.7]#