Under Construction

Repository with HTTP or HTTPS Access via Proxy Server

Systems often do not have direct Internet access. Direct access to official repositories such as the AIX toolbox via https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox is then not possible. For systems that can access Internet resources at least via a proxy server, YUM can also be configured to use such a proxy server. All you have to do is specify the proxy server for the relevant repository using the proxy attribute.

We show this using the example of the “AIX generic repository” (AIX_Toolbox). After installing YUM, you will find the following standard entry for this repository in the YUM configuration file /opt/freeware/etc/yum/yum.conf:

aix03 # cat /opt/freeware/etc/yum/yum.conf


[AIX_Toolbox]
name=AIX generic repository
baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
enabled=1
gpgcheck=0


aix03 #

Since the sample system aix03 does not have a direct internet connection, access to the repository with the standard configuration fails:

aix03 # yum repolist
https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: public.dhe.ibm.com"
Trying other mirror.
repo id                                  repo name                                         status
AIX_Toolbox                              AIX generic repository                            0
AIX_Toolbox_72                           AIX 7.2 specific repository                       0
AIX_Toolbox_noarch                       AIX noarch repository                             0
repolist: 0
aix03 #

The host name public.dhe.ibm.com cannot be resolved in our case. If the hostname name can be resolved, the error message looks slightly different:

aix03 # yum repolist
https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/repodata/repomd.xml: [Errno 12] Timeout on https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/repodata/repomd.xml: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
repo id                                  repo name                                         status
AIX_Toolbox                              AIX generic repository                            0
AIX_Toolbox_72                           AIX 7.2 specific repository                       0
AIX_Toolbox_noarch                       AIX noarch repository                             0
repolist: 0
aix03 #

The command hangs for a while and then reports a timeout.

On the example system aix03, our proxy server webproxy can be reached via port number 3080. We enter this proxy for the repository using the proxy attribute:

proxy=http://webproxy:3080

Overall, the following entry in /opt/freeware/etc/yum/yum.conf for the “AIX generic repository” results:

aix03 # cat /opt/freeware/etc/yum/yum.conf


[AIX_Toolbox]
name=AIX generic repository
baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
enabled=1
gpgcheck=0
proxy=http://webproxy:3080


aix03 #

Instead of the host name webproxy, the IP address can be used. Access to this repository now works:

aix03 # yum repolist
AIX_Toolbox                                                               | 2.6 kB  00:00:00    
AIX_Toolbox/primary_db                                                    | 1.8 MB  00:00:00    
https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: public.dhe.ibm.com"
Trying other mirror.
repo id                                  repo name                                         status
AIX_Toolbox                              AIX generic repository                            2,743
AIX_Toolbox_72                           AIX 7.2 specific repository                           0
AIX_Toolbox_noarch                       AIX noarch repository                                 0
repolist: 2,743
aix03 #

However, the other repositories do not yet use a proxy and therefore return a corresponding error. Instead of entering a proxy for each of the repositories, you can also enter a proxy in the main section. The entry then applies to all repositories (unless a repository overwrites this entry):

aix03 # cat /opt/freeware/etc/yum/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
proxy=http://webproxy:3080

aix03 #

Access now works for all repositories:

aix03 # yum repolist
AIX_Toolbox_72                                                            | 2.5 kB  00:00:00    
AIX_Toolbox_72/primary_db                                                 | 285 kB  00:00:00    
AIX_Toolbox_noarch                                                        | 2.5 kB  00:00:00    
AIX_Toolbox_noarch/primary_db                                             | 105 kB  00:00:00    
repo id                                  repo name                                         status
AIX_Toolbox                              AIX generic repository                            2,743
AIX_Toolbox_72                           AIX 7.2 specific repository                         417
AIX_Toolbox_noarch                       AIX noarch repository                               301
repolist: 3,461
aix03 #