Linux, VMware

Install Zabbix Agent 2 VMware Photon OS 4.0

Hello, guys in this short post I’ll show you how to Install Zabbix Agent 2 in VMware Photon OS 4.0.

First verify our Photon OS release with this command.

root@photon [ ~ ]# cat /etc/*release*
DISTRIB_ID="VMware Photon OS"
DISTRIB_RELEASE="4.0"
DISTRIB_CODENAME=Photon
DISTRIB_DESCRIPTION="VMware Photon OS 4.0"
NAME="VMware Photon OS"
VERSION="4.0"
ID=photon
VERSION_ID=4.0
PRETTY_NAME="VMware Photon OS/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://vmware.github.io/photon/"
BUG_REPORT_URL="https://github.com/vmware/photon/issues"
VMware Photon OS 4.0
PHOTON_BUILD_NUMBER=d98e681

Next Install wget.

root@photon [ ~ ]# tdnf install wget

Installing:
wget                                                                                          x86_64                                         1.20.3-2.ph4                                                   photon                                                           2.80M 2941070

Total installed size:   2.80M 2941070
Is this ok [y/N]: y

Downloading:
wget                                   1130646   100%
Testing transaction
Running transaction
Installing/Updating: wget-1.20.3-2.ph4.x86_64

I’m using the latest version of Zabbix server so, I download the latest agent version, from this URL.

https://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/

root@photon [ ~ ]# wget https://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/zabbix-agent2-5.2.2-1.el8.x86_64.rpm
--2020-12-17 01:03:47--  https://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/zabbix-agent2-5.2.2-1.el8.x86_64.rpm
Resolving repo.zabbix.com... 178.128.6.101, 2604:a880:2:d0::2062:d001
Connecting to repo.zabbix.com|178.128.6.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5741324 (5.5M) [application/x-redhat-package-manager]
Saving to: ‘zabbix-agent2-5.2.2-1.el8.x86_64.rpm’

zabbix-agent2-5.2.2-1.el8.x86_64.rpm                                          100%[=================================================================================================================================================================================================>]   5.47M   934KB/s    in 5.9s    

2020-12-17 01:03:53 (957 KB/s) - ‘zabbix-agent2-5.2.2-1.el8.x86_64.rpm’ saved [5741324/5741324]

root@photon [ ~ ]# ls
zabbix-agent2-5.2.2-1.el8.x86_64.rpm

Then Install the agent.

root@photon [ ~ ]# yum install zabbix-agent2-5.2.2-1.el8.x86_64.rpm 

Installing:
cyrus-sasl                                                                                    x86_64                                         2.1.27-3.ph4                                                   photon                                                          625.87k 640891
openldap                                                                                      x86_64                                         2.4.53-2.ph4                                                   photon                                                           1.80M 1889645
logrotate                                                                                     x86_64                                         3.17.0-1.ph4                                                   photon                                                          104.03k 106529
zabbix-agent2                                                                                 x86_64                                         5.2.2-1.el8                                                    @cmdline                                                       18.60M 19502784

Total installed size:  21.11M 22139849
Is this ok [y/N]: y

Downloading:
cyrus-sasl                              295582   100%
openldap                                975771   100%
logrotate                                59950   100%
Testing transaction
Running transaction
Installing/Updating: logrotate-3.17.0-1.ph4.x86_64
Created symlink /etc/systemd/system/timers.target.wants/logrotate.timer → /usr/lib/systemd/system/logrotate.timer.
Installing/Updating: cyrus-sasl-2.1.27-3.ph4.x86_64
Installing/Updating: openldap-2.4.53-2.ph4.x86_64
Installing/Updating: zabbix-agent2-5.2.2-1.el8.x86_64

Complete!

Modify the config file with your requirements in my case only the server ip.

root@photon [ ~ ]# vim /etc/zabbix/zabbix_agent2.conf
root@photon [ ~ ]# cat /etc/zabbix/zabbix_agent2.conf | grep Server=
#       Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
# Server=
Server=10.X.X.X

And lastly enable and start the service.

root@photon [ ~ ]# systemctl enable --now zabbix-agent2
root@photon [ ~ ]# systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
     Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-12-17 01:05:28 UTC; 6s ago
   Main PID: 3038 (zabbix_agent2)
      Tasks: 8 (limit: 4684)
     Memory: 5.5M
     CGroup: /system.slice/zabbix-agent2.service
             └─3038 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf

Dec 17 01:05:28 photon systemd[1]: Started Zabbix Agent 2.
Dec 17 01:05:28 photon zabbix_agent2[3038]: Starting Zabbix Agent 2 (5.2.2)
Dec 17 01:05:28 photon zabbix_agent2[3038]: Zabbix Agent2 hostname: [Zabbix server]
Dec 17 01:05:28 photon zabbix_agent2[3038]: Press Ctrl+C to exit.

Standard

One thought on “Install Zabbix Agent 2 VMware Photon OS 4.0

  1. Pingback: Monitoring Docker service with Zabbix in VMware Photon OS 4.0 | Other IT Bog

Leave a comment