AIXInstallSoftwarePackage

== How to install a package on AIX ==

Now, this is a rather complicated and convoluted subject, since AIX has several methods for installing packages.

The easiest method, by far, is to install an RPM package. To do this, please refer to the page: AIXInstallRPM.

On the other hand, you also have .rte files and .bff files. Both of these are installation packages, and both can be installed using {{{smitty}}}.

The only issue is, of course, to use smitty itself. Very often, no matter how you plead and beg and scream, {{{smitty}}} will simply refuse to install a package on a machine. Don't ask me why, that software can be very temperamental.

So, here is a (very) quick explanation on how to install packages //**without**// going through {{{smitty}}} hell: use the magical formula below...

==== 1. A magical installation formula. ====

{{{ /usr/lib/instl/sm_inst installp_cmd -a -Q -d '/home/sysadmin/packages/' -f '_all_latest' \ '-c' '-N' '-g' '-X' '-v' '-G' '-V2' '-Y' '-pE' }}}

(Please note that this formula should be all on one line. I have truncated it so that it would fit better in this wiki.)

The {{{sm_inst}}} command is the one that will perform the installation. The {{{-d}}} option indicates which directory contains the packages to be installed. The {{{-f}}} option indicates that //**all**// packages in the directory should be installed on the machine.

One very important option is the final one: {{{-pE}}}. This option indicates that only a //**preview**// of the installation should be launched. If you keep this option, no package will be installed!

However, if you remove it, as in the example below, then the package installation will proceed correctly:

{{{ /usr/lib/instl/sm_inst installp_cmd -a -Q -d '/home/sysadmin/packages/' -f '_all_latest' \ '-c' '-N' '-g' '-X' '-v' '-G' '-V2' '-Y' }}}

//**WARNING: **// If the packages contained in the {{{/home/sysadmin/packages/}}} do not have the same owner, both {{{smitty}}} and {{{sm_inst}}} will fail silently and without warning... :-(

Once a program has been installed, you can use the command {{{lslpp}}} to check if this is the case. For instance, the command below checks that Java has been installed on the machine:

{{{ admin@galactus$ lslpp -al | grep -i java Java14.sdk 1.4.2.20 COMMITTED Java SDK 32-bit Java14_64.ext.commapi 1.4.2.0 COMMITTED Java SDK 64-bit Comm API Java14_64.ext.javahelp 1.4.2.0 COMMITTED Java SDK 64-bit JavaHelp? Java14_64.license 1.4.2.0 COMMITTED Java SDK 64-bit License Java14_64.sdk 1.4.2.100 COMMITTED Java SDK 64-bit Java5.sdk 5.0.0.1 COMMITTED Java SDK 32-bit 5.0.0.100 COMMITTED Java SDK 32-bit idebug.rte.olt.Java 2.4.0.0 COMMITTED RSCT GUI JAVA Msgs - U.S. 2.4.0.0 COMMITTED RSCT RMC JAVA Msgs - U.S. Java14_64.sdk 1.4.2.100 COMMITTED Java SDK 64-bit Java5.sdk 5.0.0.1 COMMITTED Java SDK 32-bit 5.0.0.100 COMMITTED Java SDK 32-bit admin@galactus$ which java /usr/java14/jre/bin/java

admin@galactus$ $(which java) -version java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2) Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20050929a (SR3) (JIT enabled: jitc)) }}}

The "magical formula" above should work about 99.9% of all cases. If not... Follow the guided tour below:

==== 2. A guided tour to the magical installation formula. ====

(Hmmm... Have you tried a {{{man sm_inst}}}? No? Then go ahead and do that, please!)

The easy way is to start {{{smitty}}} and go to {{{Software Installation and Maintenance}}} > {{{Install and Update Software}}} > {{{Install Software}}}.

Then, indicate which directory contains the packages to be installed. Select the packages you'd like to install, and the options that make more sense to you. When everything looks good, press {{{F6}}}, and, presto! Here is your command line!

In my experience, going through {{{sm_inst}}}, with the help of the "magical formula" above, is faster than going through {{{smitty}}}. But your mileage may vary, as they say.

Hope this helps!