YUM configuration in AIX.


    In earlier days all RPM packages in AIX were installed by the command “rpm”. The limitation for RPM command is that the difficulty to resolve the dependent packages.  Like other Linux operating system like RedHat, CentOS etc. there is a possibility to setup YUM to install packages in AIX. The below procedure will take you through the steps of configuring YUM in AIX (7.1) systems.

    After having many trial and error experiments, the final solution came up with YUM configuration on the system, which is already installed with any RPM packages, we may need to follow the steps like:

1.       Take a backup of system (mksysb)
2.       Have the list of currently installed RPM packages.
3.       Remove the existing RPM packages.
4.       Configure YUM as described below.
5.       Install the previous packages again.

Let’s start with the configuration now. Assuming that all required backups are in place to do a roll-back in case of any worst-case scenario.

Before configuring the yum remove all currently installed RPMs otherwise we may end up with resolving dependencies with new packages.

Continuing with removing the existing RPM packages.
IMPORTANT: Before removing the packages, ensure that these rpms and its libraries are currently not being used by sever process.


#rpm -qa > /tmp/rpms-installed.txt # to take the list of RPMs installed in the system.


#for i in `cat /tmp/rpms-installed.txt`
do
echo $i
rpm -e $i
sleep 2
done  # Removing the RPM packages installed in the system.
#

Now we will continuw with the configuration of Yum in the system. Configuration of YUM in AIX requires some additional packages to be downloaded and installed in it. Packages are below:

Rpm.rte  ->> Fileset can be downloaded from IBM AIX toolbox.
tcl.base
tk.base
openssl.*

Download all of them in a local directory in the server and install them by below commands.

#installp -acgXYd rpm.rte.4.13.0.3 rpm.rte

#installp -acgXYd . tcl.base tk.base
#installp -acgXYd . openssl.*

Once the above filesets have been installed successfully, we need to update virtual AIX RPM package (AIX-rpm).

#/usr/sbin/updtvpkg


The next step is to download the yum_bundle.tar fire and put it in to the directory /tmp/rpm.

# mkdir /tmp/rpm
#cd /tmp/rpm
# wget https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/yum_bundle.tar .
#rpm -Uvh *.rpm

Yum filesets have been installed on the system now. Next step is to configure the yum configuration file which is /opt/freeware/etc/yum/yum.conf. once it is created the file looks like something below.

# cat /opt/freeware/etc/yum/yum.conf
[main]
plugins=1
cachedir=/var/cache/yum
keepcache=1
debuglevel=1
logfile=/var/adm/log/yum.log
exactarch=1
obsoletes=1
#proxy=http://<proxy server>:<Proxy port> --à Enable this if the traffic is going through a proxy server.

[AIX_Toolbox]
name=AIX Toolbox repository
enabled=1
gpgcheck=0

[AIX_Toolbox_71]
name=AIX 7.1 repository
enabled=1
gpgcheck=0

Yum configuration has been done now. The yum command with almost all the options like Linux will work here as well. If you still remember our first step, we have removed the previously existed RPM commands before installing yum. We need to install all of them again by using yum command.
This command will install the packages which we listed earlier in /tmp/rpms-installed.txt file and skip the packages which are already installed as part of yum configuration before.


# for i in `cat /tmp/rpms-installed.txt”
do
yum install $i -y
done
#

That is all about the configuration of yum in AIX. Below the common error we face while installing yum. We can look at the solution for it too.


·        -----------------------------------------------------------------------------------------------------------------------------------

ERROR:
# yum list
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

        0509-022 Cannot load module /usr/lib/libintl.a(libintl.so.8).
        0509-150   Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
        0509-152   Member libiconv.so.2 is not found in archive
        0509-022 Cannot load module /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so.
        0509-150   Dependent module /usr/lib/libintl.a(libintl.so.8) could not be loaded.

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.10 (default, Jun 22 2016, 05:57:59) [C]

If you cannot solve this problem yourself, please go to
the yum faq at:

SOLUTION:

#installp -qXFaYd rpm.rte.4.13.0.3 rpm.rte
#/usr/sbin/updtvpkg

Goodluck 😊



Comments

Popular posts from this blog

AIX Firefox Installation

AIX Commands

How to increase swap size on CentOS 8 / RHEL 8

How to configure NTP in RHEL8 or CentOS 8 by chronyd.

System Administration

How to manage Linux systems through web browser (cockpit for Linux): CentOS 7, CentOS 8, RHEL 7, RHEL 8, Fedora, Ubuntu and Debian systems.

How to find big files in Linux, Unix, AIX

Remote X11 forwarding for AIX in command line.

How to enable VNC server (get GUI remotely) in CentOS 7, RHEL 7, CentOS 8 and RHEL 8 servers.

How to change Time Zone in CentOS 8, RHEL 8 and Ubuntu systems