One of my Red Hat servers is behind proxy with no access to the outside world. This box is registered to a Satellite server to receive software updates.

I want to install Zabbix server on this server using the packages from Zabbix upstream directly. To do this, I need to set the proxy for the Zabbix’s repository. There are a few ways to do this. For my purpose, the best place is to set proxy=proxy_server directly in the .repo file.

[root@monitor ~]# cat /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/8/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
proxy="http://proxyserver.domain:3128"

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/8/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
proxy="http://proxyserver.domain:3128"

Reference: