Author Topic: basic command for AIX unix (IBM)  (Read 15778 times)


golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: basic command for AIX unix (IBM)
« Reply #1 on: กรกฎาคม 19, 2018, 08:48:23 PM »
##Install program on AIX via installp

https://unix.stackexchange.com/questions/325701/what-commands-are-used-to-install-software-on-aix

The most generic method - and the one that resolves the "lower layer" or differences in the different formats is: smit install

smit install - as part of smit takes you through a number of dialogs to help with selections. Ultimately this calls the program /usr/sbin/geninstall

So the next aspect of this question is: what does geninstall call?

Legacy INSTALLP
(aka BFF - backup file format)

The installp/bff format uses the command installp.
installp is simple to use from the command line:
installp is also a package manager in that it can also resolve and install dependencies - when available in the /software/repository/directory
The following commands demonstrate some common actions with LPP/installp/BFF packaging.

To install some.fileset.name from /software/repository/directory while also finding and installing dependancies - as well as increase filesystems size should that be necessary

installp -d /software/repository/directory -agX some.fileset.name
-d: directory with software package/packages in BFF format
-a: apply -g: resolve and apply dependencies, if any -X: increase target filesystem size, if needed
List software in repository

installp -d /software/repository/directory -L -d: directory with software package/packages in BFF format -L: List LPP packages in directory
Regenerate the TOC in /software/repository/directory

inutoc /software/repository/directory Uninstall some.fileset.name

installp -ug some.fileset.name
-u: uninstall argument(s) -g: uninstall, recursively, software that depends on some.fileset.name

Listing/verification of already installed packages

lslpp -L
List installed LPP packages - do not distinguish between root, usr or shared components
lslpp -l
List installed LPP packages - include the distinct root, usr and/or shared components
lppck -v some.fileset.name
-v: verify contents of Verify some.fileset.name integrity
lslpp -h some.fileset.name
-h: history of List the installation history (install dates) of current and previous versions of some.fileset.name -w: where is
lslpp -w /some/file/name
Identify the fileset that contains /some/file/name
RPM - RedHat Package Manager
rpm on AIX is standard rpm - see any Linux guide for instructions on how to use it. Note that the version of RPM installed is 'ancient'. Some options you expect may be missing.

michael@x071:[/usr/sbin]rpm --version
RPM version 3.0.5
/usr/bin/rpm is installed by default, and is part of the fileset named rpm.rte

michael@x071:[/usr/sbin]lslpp -w /usr/bin/rpm
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/bin/rpm                                rpm.rte               File
Starting with AIX 7.2 (which I do not have access to right now) has rpm version 4, and yum is also included to help with RPM dependency hell

ISMP
InstallShield Multi Platform

I have never tried to install ISMP from the command-line, so no quick summary here. The main 'user' of this packaging method has been '3rd-party' VAR and software vendors. IBM software group has also been a frequent user - more in the past (e.g., db2v6 or v7, and the initial versions of apache-1 and httpd-2).

a quick description can be found at https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.install/ismp_installation.htm (Thanks Jeff Schaller, for the link)
The key point seems to be that installp and RPM never have user interaction while ISMP may (read, probably needs a response file to be hands free)
Personal Notes
For me personally, ISMP is a 'historical note', as I see it less and less (not even IBM software group seems to use it anymore). Further, RPM is something I prefer to avoid on AIX. Not because I dislike RPM - but because the common flaw (imho) is that RPM packages do not know what installp has installed (and v.v.) and RPM overwrites the contents of other installp packages without warning or thereafter remove bits without warning. This knife cuts two ways: 'the new' gets broken when 'the old' has an update applied. In short - mix -> and make a murphy day!

personally, in 2001 I thought three different installers was a great idea. And geninstall to control them all. Experience with troubleshooting things suddenly gone wrong have taught me otherwise!

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: basic command for AIX unix (IBM)
« Reply #2 on: กรกฎาคม 25, 2018, 06:49:08 PM »
ใน AIX เราสามารถลง package ตัวที่เป็น .rpm ได้ครับโดยวิธี rpm -ivh ก็ได้ หรือมีอีก command เทพคือ smit installp ครับ
มันจะติดตั้งให้เลย ถ้าใครอยากลง mysql-client บน aix ก็ง่ายๆ เลยตามด้านล่างนี้ครับ แต่ต้อง download package เข้าไปไว้ใน folder ก่อนนะครับผม

###Check and upload for package MySQL-client-5.5.10-1.aix5.3.ppc.rpm + MySQL-devel-5.5.10-1.aix5.3.ppc.rpm
cd /tmp/pkl ; ls
MySQL-client-5.5.10-1.aix5.3.ppc.rpm  MySQL-devel-5.5.10-1.aix5.3.ppc.rpm

####Start install via command smit installp
smit installp
Choose package in “/tmp/pkl”
Then install by “enter”
waiting until finish ...
exit from smit program by press “F10”