zabbix-agent ubuntu install
작성자 기준 테스트 환경 : Ubuntu-18.04.4(LTS) - 최소 설치 (minimal) 기준
Linux yunli 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
-
network configuration
$ vi /etc/netplan/50-cloud-init.yaml
.. ...
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets: {}
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 192.168.137.61/24
gateway4: 192.168.137.1
nameservers:
addresses:
[168.126.63.1,168.126.63.2]
$ netplan apply
-
agent install
reference URL
https://www.zabbix.com/documentation/3.0/manual/installation/upgrade_packages/debian_ubuntu
ubuntu 버전에 맞는 zabbix-server 3.0 dpkg 다운로드 받은 후에 아래 작업
$ dpkg -i zabbix-release_3.0-2+bionic_all.deb
Selecting previously unselected package zabbix-release.
(Reading database ... 66964 files and directories currently installed.)
Preparing to unpack zabbix-release_3.0-2+bionic_all.deb ...
Unpacking zabbix-release (3.0-2+bionic) ...
Setting up zabbix-release (3.0-2+bionic) …
$ apt-get update
Get:1 http://repo.zabbix.com/zabbix/3.0/ubuntu bionic InRelease [7,096 B]
Get:2 http://repo.zabbix.com/zabbix/3.0/ubuntu bionic/main Sources [1,196 B]
Get:3 http://repo.zabbix.com/zabbix/3.0/ubuntu bionic/main amd64 Packages [2,648 B]
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 263 kB in 3s (82.0 kB/s)
Reading package lists... Done
$ apt-get install zabbix-agent
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
zabbix-agent
0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
Need to get 160 kB of archives.
After this operation, 630 kB of additional disk space will be used.
Get:1 http://repo.zabbix.com/zabbix/3.0/ubuntu bionic/main amd64 zabbix-agent amd64 1:3.0.30-1+bionic [160 kB]
Fetched 160 kB in 1s (141 kB/s)
Selecting previously unselected package zabbix-agent.
(Reading database ... 66970 files and directories currently installed.)
Preparing to unpack .../zabbix-agent_1%3a3.0.30-1+bionic_amd64.deb ...
Unpacking zabbix-agent (1:3.0.30-1+bionic) ...
Setting up zabbix-agent (1:3.0.30-1+bionic) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.33) …
root@yunli:/usr/local/src# /etc/init.d/zabbix-agent start
// 설치 확인
$ netstat -nlpt
$ ps -ef | grep -i zabbix
-
zabbix configuration (환경설정 - zabbix-server 환경설정에 맞추어서 작업 진행 해야합니다. )
-
환경 설정 작업 전에는 항상 conf 파일 백업 해두는 것이 좋습니다.
$ vi /etc/zabbix/zabbix_agentd.conf
## 수정 start ##
95 Server=127.0.0.1
→ 95 Server=192.168.137.43
136 ServerActive=127.0.0.1
→ 136 ServerActive=192.168.137.43
147 Hostname=Zabbix server
→ 147 Hostname=zabbix.masangsoft.kr
## 수정 End ##
247 # AllowRoot=0
248 AllowRoot=1 ## 추가
-
기타 (서버 설정마다 다름)
방화벽 설정이 되어있다면 해당 방화벽 설정에 맞게 추가 해줘야합니다.
10050 port 추가
서버 설정에 맞게 자동 재시작 등록 해줘야 합니다.
-
확인
root@yunli:/usr/local/src# /etc/init.d/zabbix-agent start
[ ok ] Starting zabbix-agent (via systemctl): zabbix-agent.service.
root@yunli:/usr/local/src# netstat -nlpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 3553/zabbix_agentd
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 864/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1376/sshd
tcp6 0 0 :::10050 :::* LISTEN 3553/zabbix_agentd
tcp6 0 0 :::22 :::* LISTEN 1376/sshd
root@yunli:/usr/local/src# ps -ef | grep -i zabbix
zabbix 3553 1 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix 3554 3553 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 3555 3553 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
zabbix 3556 3553 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
zabbix 3557 3553 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
zabbix 3558 3553 0 05:14 ? 00:00:00 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
root 3820 3021 0 05:36 pts/2 00:00:00 grep --color=auto -i zabbix

'01_install (강좌) > 12_Zabbix' 카테고리의 다른 글
zabbix-server_3.0(LTS) install #!!! (0) | 2020.03.12 |
---|