Thursday, April 24, 2008

HPUX how to install patch


patch install eg:
(patch is obtained in a "depot" file format, which is really a tar.
Instruction presented in here is also in a text file inside the tar.)

1. Back up your system before installing a patch.

2. Login as root.

3. Copy the patch to the /tmp directory.

4. Move to the /tmp directory and unshar the patch:

cd /tmp
sh PHSS_20055

5. Run swinstall to install the patch:

[ to check that depot has been downloaded correctly:
swlist -d @ /full/absolute/path/PHSS_20055.depot

swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHSS_20055.depot

By default swinstall will archive the original software in
/var/adm/sw/save/PHSS_20055. If you do not wish to retain a
copy of the original software, use the patch_save_files option:

swinstall -x autoreboot=true -x patch_match_target=true \
-x patch_save_files=false -s /tmp/PHSS_20055.depot

WARNING: If patch_save_files is false when a patch is installed,
the patch cannot be deinstalled. Please be careful
when using this feature.

For future reference, the contents of the PHSS_20055.text file is
available in the product readme:

swlist -l product -a readme -d @ /tmp/PHSS_20055.depot

To put this patch on a magnetic tape and install from the
tape drive, use the command:

dd if=/tmp/PHSS_20055.depot of=/dev/rmt/0m bs=2k