YUM with NIMHTTP

YUM with NIMHTTP

Starting with AIX 7.2, NIM supports the use of HTTP. The new NIM service handler nimhttp (port 4901) is available for this purpose. This offers the possibility of making YUM repositories available on a NIM server with the help of this NIM service handler. To do this, the repositories must be saved under the document root (/export/nim by default). AIX clients can then access the repositories using HTTP with port nummer 4901.

The repositories must be configured on the AIX client under /opt/freeware/etc/yum/yum.conf or /opt/freeware/etc/yum/repos.d. All available YUM operations are supported in this way.

If nimhttp is already used on the NIM server, this does not result in any additional effort.

The following shows the configuration for using YUM with nimhttp.

The first requirement is that the NIM service handler nimhttp is active on the NIM server:

aixnim # lssrc -s nimhttp
Subsystem???????? Group??????????? PID????????? Status
?nimhttp????????? ?????????????????19136996???? active
aixnim #        

If nimhttp has not yet been activated, this can be done using the nimconfig command on the NIM server:

aixnim # nimconfig -h
0513-077 Subsystem has been changed.
0513-059 The nimhttp Subsystem has been started. Subsystem PID is 19136996.
aixnim #        

Note: The configuration of nimhttp is shown elsewhere.

For test purposes, we create a small text file on the NIM server under /export/nim (document root):

aixnim # echo "testfile for nimhttp" >/export/nim/testfile
aixnim #        

Next, we check the functionality on the NIM client by downloading the test file from the NIM server with the NIM client command nimhttp:

aix01 # nimhttp -f testfile -o dest=/tmp -v
nimhttp: (source)?????? testfile
nimhttp: (dest_dir)???? /tmp
nimhttp: (verbose)????? debug
nimhttp: (master_ip)??? aixnim
nimhttp: (master_port)? 4901

sending to master...
size= 46
pull_request= "GET /testfile HTTP/1.1
Connection: close

"
Writing 21 bytes of data to /tmp/testfile
Total size of datalen is 21. Content_length size is 21.
aix01 #        

(The ‘-v‘ option provides the debugging output shown.)

The test file was saved under /tmp/testfile.

Another test with the command curl (available from the AIX toolbox) also shows that nimhttp can be used successfully to download data:

aix01 # curl https://aixnim:4901/testfile
testfile for nimhttp
aix01 #        

The use of nimhttp to access YUM repositories should therefore be possible in principle.

We have copies of the AIX Toolbox repositories provided by IBM on our NIM server in the following directories:

/export/nim/aixtoolbox/RPMS/noarch?????????AIX_Toolbox_noach (AIX noarch repository)

/export/nim/aixtoolbox/RPMS/ppc??????????AIX_Toolbox (AIX generic repository)

/export/nim/aixtoolbox/RPMS/ppc-7.1????????AIX_Toolbox_71 (AIX 7.1 specific repository)

/export/nim/aixtoolbox/RPMS/ppc-7.2????????AIX_Toolbox_72 (AIX 7.2 specific repository)

In order for an AIX client system to be able to access these repositories, they must be referenced in the YUM configuration. For the sake of simplicity, we have entered the repositories in the configuration file /opt/freeware/etc/yum/yum.conf:

aix01 # vi /opt/freeware/etc/yum/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1

[AIX_Toolbox]
name=AIX generic repository
baseurl=https://aixnim:4901/aixtoolbox/RPMS/ppc/
enabled=1
gpgcheck=0

[AIX_Toolbox_noarch]
name=AIX noarch repository
baseurl=https://aixnim:4901/aixtoolbox/RPMS/noarch/
enabled=1
gpgcheck=0

[AIX_Toolbox_72]
name=AIX 7.2 specific repository
baseurl=https://aixnim:4901/aixtoolbox/RPMS/ppc-7.2/
enabled=1
gpgcheck=0

aix01 #        

Alternatively, a separate repo file can be created for each repository under /opt/freeware/etc/yum/repos.d.

The key entry is the baseurl attribute. The URL used here is http. The host name of the NIM server is given the port number of nimhttp (port 4901) separated by a colon. The path is then relative to /export/nim (document root) on the NIM server.

A list of the available YUM repositories printed by the command “yum repolist” shows the expected repositories:

aix01 # yum repolist
repo id???????????????????????????????????? repo name??????????????????????????????????? ?????????status
AIX_Toolbox???????????????????????????????? AIX generic repository??????????????????????????????? 2740
AIX_Toolbox_72????????????????????????????? AIX 7.2 specific repository??????????????????????????? 417
AIX_Toolbox_noarch??????????????? ??????????AIX noarch repository????????????????????????????????? 301
repolist: 3458
aix01 #        

To demonstrate that installing RPMs in this way with nimhttp is also possible, we show the installation of wget:

aix01 # yum install wget
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wget.ppc 0:1.21.1-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================
Package????????????? Arch??????????????? Version???????????????????? Repository?????????????????? Size
========================================================================================================
Installing:
wget???????????????? ppc???????????????? 1.21.1-1??????????????????? AIX_Toolbox???????????????? 703 k

Transaction Summary
========================================================================================================
Install?????? 1 Package

Total size: 703 k
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
? Installing : wget-1.21.1-1.ppc??????????????????????????????????????????????????????????????????? 1/1
From wget-1.21.1 onwards, symbolic link of wget in /usr/bin is removed.
The binary is shipped in /opt/freeware/bin. Please use absolute path or
add /opt/freeware/bin in PATH environment variable to use the binary.

Installed:
? wget.ppc 0:1.21.1-1??????????????????????????????????????????????????????????????????????????????????

Complete!

aix01 #        

The AIX system does not necessarily have to be a NIM client, as YUM does not use NIM. YUM only uses the http server provided by the NIM master. The AIX version is also irrelevant, the AIX client can run on AIX 7.1 or AIX 7.2.

Note: For AIX 7.3, the Dandified YUM (DNF) is used instead of YUM.

Installing YUM

AIX System with direct Internet Connection

AIX System without direct Internet Connection

Fixing Errors

Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so) could not be loaded

db-4.8.24-3.ppc conflicts with file from package db4-4.7.25-2.ppc

Using YUM

Which Repositories are Available?

Installing RPM Packages

Listing RPM Packages

Updating RPM Packages

Upgrading RPM Packages

Removing RPM Packages

Searching RPM Packages

YUM Repositories

Configuring Existing Repositories

Adding a Local Repository

Repository with FTP Access

Repository with HTTP or HTTPS Access

Repository with HTTP or HTTPS Access via Proxy Server

Creating a Local Repository

Creating a Local Mirror of a Repository

YUM with NIMHTTP

NIMHTTP with HTTPS

要查看或添加评论,请登录

Armin Schmidt的更多文章

  • Some Download Links for AIX Software

    Some Download Links for AIX Software

    There are several sources for software for AIX. Depending on whether the software you are looking for is the operating…

    3 条评论
  • Connecting a Power 10 eBMC system to an HMC

    Connecting a Power 10 eBMC system to an HMC

    This blog post will show how to connect a Power 10 eBMC managed system to an HMC. The necessary steps are shown once…

    1 条评论
  • Status of LPARs

    Status of LPARs

    With the LPAR tool, the status of one, several or all LPARs can be easily determined using the “lpar status” command…

    3 条评论
  • NTP Configuration on HMC with LPAR tool

    NTP Configuration on HMC with LPAR tool

    The current status of NTP on an HMC can then be displayed using “hmc lsntp“: $ hmc lsntp NAME???XNTP??? XNTPSTATUS…

  • History Expansion bash

    History Expansion bash

    Many AIX and UNIX users use bash as their preferred shell. Navigating in the history with the cursor keys is certainly…

    4 条评论
  • The Command chrctcp

    The Command chrctcp

    On AIX, the System Resource Controller (SRC) is used to control subsystems and subservers. Every AIX administrator is…

    2 条评论
  • Path to the executable of a running AIX process

    Path to the executable of a running AIX process

    If a process was not started with an absolute path, it is surprisingly difficult to find out the absolute path for the…

    2 条评论
  • LPAR tool 1.7.0.1 is now available

    LPAR tool 1.7.0.1 is now available

    Version 1.7.

  • Udated: AIX-Lifecycle at your fingertips

    Udated: AIX-Lifecycle at your fingertips

    IBM has changed the URL for the FLRT Lite data file. From the old URL https://www14.

    2 条评论
  • What is the size of the internal log in JFS2

    What is the size of the internal log in JFS2

    A trivial question we stumbled across recently: How big is the internal JFS2 log currently? The size of the internal…

    3 条评论

社区洞察

其他会员也浏览了