zabbix部署(客戶端)
阿新 • • 發佈:2018-08-22
configure head 關閉 sta etc org make wall lld 環境說明
環境 | IP | 需要安裝的程序 |
---|---|---|
客戶端 | 192.168.24.188 | zabbix_agentd |
1.關閉防火墻和SELINUX
[root@linfan ~]# systemctl stop firewalld
[root@linfan ~]# systemctl disable firewalld
[root@linfan ~]# sed -ri ‘s/(SELINUX=.*)/\1disabled/g‘ /etc/selinux/config
[root@linfan ~]# setenforce 0
2.zabbix安裝
安裝依賴包
[root@linfan ~]# yum -y install net-snmp-devel libevent-devel
下載zabbix
[root@linfan ~]# cd /usr/src/
[root@linfan src]# wget https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.12/zabbix-3.4.12.tar.gz
解壓
[root@linfan src]# tar xf zabbix-3.4.12.tar.gz [root@linfan src]# ls apr-1.6.3 apr-util-1.6.1.tar.bz2 mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz zabbix-3.4.12 apr-1.6.3.tar.bz2 debug php-7.2.8 zabbix-3.4.12.tar.gz apr-util-1.6.1 kernels php-7.2.8.tar.xz
創建zabbix用戶和組
[root@linfan ~]# groupadd -r zabbix
[root@linfan ~]# useradd -r -g zabbix -M -s /sbin/nologin zabbix
安裝編譯zabbix
[root@linfan src]# cd /usr/src/zabbix-3.4.12
[root@linfan zabbix-3.4.12]# ./configure --enable-agent
[root@linfan zabbix-3.4.12]# make install
修改客戶端配置文件
[root@linfan zabbix-3.4.12]# vim /usr/local/etc/zabbix_agentd.conf //將以下三處配置為服務端IP地址 Server=192.168.24.168 ServerActive=192.168.24.168 Hostname=192.168.24.168
啟動agentd
[root@linfan ~]# zabbix_agentd
[root@linfan ~]# ss -natl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:22 *:*
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 *:10050 *:*
LISTEN 0 128 :::22 :::*
LISTEN 0 100 ::1:25 :::*
web界面配置步驟
1.建主機組
2.把主機加入相應的主機組
3.配置主機
4.配置監控項
5.配置警告信息
6.發郵件
zabbix部署(客戶端)