Under Construction

Repository with FTP Access

To access a repository via FTP, the baseurl must begin with “ftp://<server>“. Whereby “<server>” must either replaced with the host name or the IP address of the FTP server. By default, YUM uses anonymous FTP for the access.

In the following example, anonymous FTP was configured on the NIM server aixnim and a directory myrepo was created for the repository in the public directory /home/ftp/pub. Then, this repository can be used on any AIX system with FTP access to the NIM server aixnim using anonymous FTP. We use the following repo file to register the repository:

aix01 # cat /tmp/myrepo.repo
[myrepo]
name=my private repository
baseurl=ftp://aixnim/pub/myrepo
aix01 #

The repository can be added to the YUM configuration using yum-config-manager:

aix01 # yum-config-manager --add-repo /tmp/myrepo.repo
adding repo from: /tmp/myrepo.repo
grabbing file /tmp/myrepo.repo to /opt/freeware/etc/yum/repos.d/myrepo.repo
repo saved to /opt/freeware/etc/yum/repos.d/myrepo.repo
aix01 #

The new repository can be used immediately:

aix01 # yum repolist
myrepo                                                                      | 2.9 kB  00:00:00    
myrepo/primary_db                                                           | 3.4 kB  00:00:00    
repo id                                   repo name                                          status
AIX_Toolbox                               AIX generic repository                             2740
AIX_Toolbox_71                            AIX 7.1 specific repository                         295
AIX_Toolbox_noarch                        AIX noarch repository                               301
myrepo                                    my private repository                                 4
repolist: 3340
aix01 #

The output shows that 4 RPM packages are available in the new myrepo repository.

If instead of anonymous FTP a regular FTP account should be used to access the repository, the user and password to be used must be entered in the configuration. As an example, the user account “yumrepo” with the password “s3cr3t” is used for access. This time the repository is on the FTP server under /var/myrepo. We use the following repo file:

aix01 # cat /tmp/myrepo.repo
[myrepo]
name=my private repository
baseurl=ftp://yumrepo:s3cr3t@aixnim//var/myrepo
aix01 #

Username and password are separated from each other with a colon (“yumrepo: s3cr3t”) and an “@” sign is placed in front of the host name (or IP address) of the FTP server.

Attention: The first slash (“/”) after the host name serves as a separator and means: the computer name ends here. Without the second slash (“/”) the path “var/myrepo” on the remote system would be relative to the home directory of the user yumrepo!

The repository can be added to the current YUM configuration using yum-config-manager again:

aix01 # yum-config-manager --add-repo /tmp/myrepo.repo
adding repo from: /tmp/myrepo.repo
grabbing file /tmp/myrepo.repo to /opt/freeware/etc/yum/repos.d/myrepo.repo
myrepo.repo                                                                 |   90 B  00:00:00    
repo saved to /opt/freeware/etc/yum/repos.d/myrepo.repo
aix01 #

The new repository works without problems with the specified user and password:

aix01 # yum list available zchun*
Available Packages
zchunk.ppc                                       1.1.4-32_1                                  myrepo
zchunk-devel.ppc                                 1.1.4-32_1                                  myrepo
zchunk-libs.ppc                                  1.1.4-32_1                                  myrepo
aix01 #