Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.5 KB

Centos7.7编译源码安装使用Zabbix(zabbix-agent).md

File metadata and controls

46 lines (37 loc) · 1.5 KB

一、新建Zabbix用户

[root@zabbix ~]# groupadd zabbix
[root@zabbix ~]# useradd zabbix -g zabbix -s /sbin/nologin

二、编译环境准备

[root@zabbix ~]# yum install -y gcc  libxml2-devel libevent-devel net-snmp net-snmp-devel  curl  curl-devel php  php-bcmath  php-mbstring mariadb mariadb-devel java-1.6.0-openjdk-devel --skip-broken

三、去官网下载编译安装的Zabbix

https://www.zabbix.com/download_sources

[root@zabbix ~]# wget https://www.xxshell.com/download/sh/zabbix/zabbix4.4/zabbix-4.4.1.tar.gz
[root@zabbix ~]# tar -xzvf zabbix-4.4.1.tar.gz
[root@zabbix ~]# cd zabbix-4.4.1
[root@zabbix ~]# ./configure --enable-agent
[root@zabbix ~]# make -j 2 && make install

四、修改zabbix-agent配置文件

sudo vim /etc/init.d/zabbix_agentd

Server=zabbix_server_hostname
#ServerActive=127.0.0.1
#Hostname=Zabbix server

五、启动Zabbix-Agent

/etc/init.d/zabbix_agentd restart
systemctl enable zabbix_agentd