How to install YUM and other rpm packages on VIOs and AIX manually
[Download rpm.rte]
Download the rpm.rte from ibm site and update it.
https://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/rpm.rte.4.9.1.3
installp -acgXYd rpm.rte or use smitty update_all
[Download the yum_bundle.tar]
This file have all the necessary packages to install yum in a AIX system. NOTE: is very import to update the rpm.rte first, if you not update it first you can have errors messages if you try to install yum. As part of the installation of the rpm.rte, it runs as well the updtvpkg command to update the rpm database that have reference for new libs on the system that are used when you try to install new packages.
wget -c https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/yum_bundle.tar
try to install using the command rpm -Uvh *.rpm
Sometimes the command will fail due readline and glib packages, you can exclude them, sometimes you will already have some packages installed, you can exclude them using: rpm -Uvh $(ls *rpm|egrep -v "readline|glib")
[Update packages]
Now with yum installed, if you have internet access on the server, you may try install normally the python3 package. yum install python3 sqlite
NOTE: Is very important update the sqlite as well, I got some errors due the sqlite not updated when you try to install python3. sqlite will not be updated automatically if you only try to install python3.
[repository]
Below a repository example from /opt/freeware/etc/yum/yum.conf
[main] plugins=1 cachedir=/var/cache/yum keepcache=1 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 proxy=https://myproxyserver:3128
[AIX_Toolbox] name=AIX generic repository baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ enabled=1 gpgcheck=0
You can see that proxy is set.
[Alternative solution]
One very good solution is use nfs + nim to install the rpm packages on AIX servers. You can create a local repo with all the new packages from AIX tool box site. Download all packages from this page in one folder: https://www.ibm.com/support/pages/node/883796
You may try save the html from the page above and using cut command you can filter for the https links. You may try download directly from the FTP but there is a lot of packages there. Here one example to filter all the rpm links with the hmtl page saved:
[edipof@tp460Fedora AIX_TOOLBOX_RPMS_PACKAGES]$ cat AIX\ Toolbox\ for\ Linux\ Applications\ -\ Downloads\ alpha.html |grep rpm|cut -d """ -f8|more
https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/a2ps/a2ps-4.13-4.aix6.1.ppc.rpm https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/aix-x11-pc/aix-x11-pc-1.0-1.aix6.1.ppc.rpm https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ansible/ansible-2.7.0-1.aix6.1.ppc.rpm https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/apr/apr-devel-1.5.2-1.aix6.1.ppc.rpm https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/apr/apr-util-devel-1.5.4-1.aix6.1.ppc.rpm
You can save all the links in one file and use a loop whiel with wget to download everything:
while read line:do wget -c name done<packagelist
NOTE: you can use the following command as well: lynx -dump -listonly www.ibm.com/support/pages/node/883796|grep -i .rpm|grep -v .src.|awk '{print $2}'
or
lynx -dump -listonly -nonumbers https://www.ibm.com/support/pages/node/883796|grep -i .rpm|grep -v .src.
After download complete you can send the folder for a nim server, send to a folder that is exported for the targets where you want install the packages.
[Create repo]
on the nim server install the createrepo package
rpm -Uvh createrepo-0.10.3-3.aix6.1.noarch.rpm
The package may need dependencies, you have all the packages on the folder that you just uploaded.
Now create the local repo, example below:
create repo /foldernim/aix_rpm
You must pass the complete path to avoid errors, the aix_rpm above is where all the rpms packages are located.
[Install yum on remote server]
Follow the instruction from before to install the yum package on the server, edit the yum.conf as below:
[main] cachedir=/var/cache/yum keepcache=1 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 plugins=1
[local_ibm_tools] name=Local AIX IBM packages baseurl=file:///mnt/aix_rpm gpgcheck=0 enabled=1
####################################################
The important thing is the baseurl above, you are informing yum that the packages are on the /mnt/aix_rpm, this comes from the folder that you just mounted from the nim and where are located the rpms. Remember that for this work createrepo need be run before to index and create the needed configuration that will be read by yum. After that you can proceed normally with the installation. The big advantage of this approach is that the rpms from AIX toolbos are not to big, all the packages in on folder are less than 1GB, you can alwasy update the nim folder with new packages. If you put new rpms on the nim folder, remember to run createrepo to update the index. Now all the packages intallation will be very fast on the AIX and VIOs servers.
Comentários
Postar um comentário