标签:none zabbix dbn eve set ima lib config DBName
1、安装依赖包
[root@Zabbix-proxy ~]# yum -y install mysql mariadb-server mysql-devel net-snmp-devel libssh2-devel
[root@Zabbix-proxy ~]# useradd -s /sbin/nologin -M zabbix
2、下载对应版本并编译安装zabbix-proxy(注此处服务器使用的也是3.0.27)
[root@Zabbix-proxy ~]# wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.27/zabbix-3.0.27.tar.gz
[root@Zabbix-proxy ~]# tar xf zabbix-3.0.27.tar.gz
[root@Zabbix-proxy zabbix-3.0.27]# ./configure --prefix=/opt/zabbix --enable-proxy --enable-agent --with-mysql --with-net-snmp --with-ssh2
[root@Zabbix-proxy zabbix-3.0.27]# make && make install
3、启动mariadb数据库并创建名为zabbix的数据库
[root@Zabbix-proxy ~]# systemctl start mariadb.service
[root@Zabbix-proxy ~]# mysql
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by ‘123456‘;
MariaDB [(none)]> flush privileges;
[root@Zabbix-proxy ~]# mysql -uzabbix -p123456 zabbix < /root/zabbix-3.0.27/database/mysql/database/mysql/schema.sql
4、编辑zabbix_proxy.conf配置文件
[root@Zabbix-proxy ~]# grep -Ev ‘^$|#‘ /opt/zabbix/etc/zabbix_proxy.conf
Server=X.X.X.X #服务器IP地址 Hostname=Zabbix_proxy #此处hostname名称必需与服务器端agent代理程序名称相同 LogFile=/tmp/zabbix_proxy.log DBName=zabbix DBUser=zabbix DBPassword=123456 Timeout=4 LogSlowQueries=3000
5、服务器配置使用zabbix-proxy
添加主机使用agent代理程序监测
标签:none zabbix dbn eve set ima lib config DBName
原文地址:https://www.cnblogs.com/xwupiaomiao/p/10844253.html