Managing software in SOL10 contains 2 activities :
- management of packages (software)
- management of patches (updates to software)
PACKAGES
In Unix world software that we actually install on a system in called package. In SOL10 we have 2 types of packages :
- file system format
- data stream format
Usage scenarios:
----------------------------------
Checking installed packages :
# pkgchk SUNWladm # pkgchk -v SUNWladm # pkgchk -l -p /usr/bin/showrev # pkgchk -l -P passwd # pkgchk -p /etc/shadow ---> to determine if content and attributes of file has changed
Listing and displaying info about packages installed and spooled.
# pkginfo -l | more # pkginfo -d /var/spool/pkg -l SUNWman # pkginfo # pkginfo -d /cdrom/cdrom0/Solaris_10/Product SUNWman # pkginfo -d spool SUNWdoc
Installing and spooling new packages
# pkgadd -d /cdrom/cdrom0/Solaris_10/Product SUNWman # pkgadd ./SUNWman # pkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product -s spool SUNWauda # pkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product -s /export/pkg SUNWauda
Removing packages
# pkgrm SUNWman # pkgrm -s spool SUNWman # pkgrm -s /export/pkg SUNWman
Dispalying content of data stream packages.
# head SUNWman.pkg | more
Checking package file type.
# file SUNWman.pkg
Transforming package from file system format to data stream format.
# pkgtrans -s /cdrom/cdrom0/s0/Solaris_10/Product /var/tmp/stream.pkg SUNWzlib SUNWftpr SUNWftpu # pkgtrans /var/tmp /tmp/SUNWrsc.pkg SUNWrsc # pkgadd -d /var/tmp/stream.pkg
File or Directory |
Description |
|---|---|
/var/sadm/install/contents |
A software package map of the entire system |
/opt/pkgname |
The preferred location for the installation of unbundled packages |
/opt/pkgname/bin or
/opt/bin |
The preferred location for the executable files of unbundled packages |
/var/opt/pkgname or /etc/opt/pkgname |
The preferred location for log files of unbundled packages |
PATCHES
A patch contains a collection of files and directories. This collection replaces existing files and directories that prevent proper execution of the software. Some patches contain product enhancements.
The Solaris OS patch types include:
- Standard patches - Patches that fix specific problems with the Solaris OS and other Sun hardware and software products.
- Recommended patches - Solaris OS patches that fix problems that might occur on a large percentage of systems. These include recommended security patches.
- Firmware and PROM patches.
- Patch clusters - A group of standard, recommended, security, or Y2K patches that have been bundled into a single archive for easy downloading and installation.
A patch is distributed as a directory that is identified by a unique number. The number assigned to a patch includes the patch base code first, a hyphen, and a number that represents the patch revision number. For example, a patch directory named 105050-01, indicates that 105050 is the patch number and 01 is the revision number.
Display already installed patches
# showrev -por another cmd
# patchadd -p
When patches are downloaded to the local system, you must place the patches in a temporary directory to prepare them for installation. The directory commonly used is the /var/tmp directory.
One of the common reasons for patch installation failure is directory permission or ownership problems. The /var/tmp directory is open to all and eliminates any of these types of problems.
The Solaris 7, Solaris 8, Solaris 9, and Solaris 10 OS patches are in zip format, for example, 105050-01.zip.
Use the unzip command to unpack the patch files.
# /usr/bin/unzip 105050-01.zip
Earlier versions of the Solaris OS used compressed tar files in a tar.Z format, for example, 101010-01.tar.Z.
Use the zcat command to uncompress the patch files and the tar command to create the patch directories.
# /usr/bin/zcat 105050-01.tar.Z | tar xvf -
Usage scenarios:
------------------------------
# patchadd 105050-01
Install patch.
patchrm 105050-01
Remove patch.
When you remove a patch, the patchrm command restores all files that were modified or replaced by that patch, unless:
The patch was installed with the patchadd -d option (which instructs the patchadd command not to save copies of files being updated or replaced)
The patch is required by another patch
The patch has been obsoleted by a later patch
The patchrm command calls the pkgadd utility to restore packages that were saved during the initial patch installation.
Patch cluster
To install a patch cluster, perform the following steps:
- Be sure the patch cluster has been unzipped or uncompressed and extracted if the cluster was received as a tar.Z file.
- Decide on which method to use to install the cluster--the recommended default save option or the -nosave option.
- Change to the directory that contains the patch cluster. Read the CLUSTER_README file, which contains information about the bundled set of patches, including:
- Read each individual patch README file to determine if any additional steps are required to fully install any individual patch.
- Check the log file if more detail is needed.
- Reboot the system for all patches to take effect.
Then run the install_cluster script.
# cd 10_Recommended # ./install_cluster
The installation appears as follows:
Patch cluster install script for Solaris 10 Recommended *WARNING* SYSTEMS WITH LIMITED DISK SPACE SHOULD *NOT* INSTALL PATCHES:
(Other disk space warning messages omitted.)
Are you ready to continue with install? [y/n]:y Determining if sufficient save space exists... Sufficient save space exists, continuing... Installing patches located in /tmp/10_Recommended Using patch_order file for patch installation sequence Installing 113319-01...
(Other patch messages omitted.)
The following patches were not able to be installed:
112875-01
113023-01
For more installation messages refer to the installation logfile:
/var/sadm/install_data/Solaris_10_Recommended_log
Use '/usr/bin/showrev -p' to verify installed patch-ids.
Refer to individual patch README files for more patch detail.
Rebooting the system is usually necessary after installation
#
Reviewing the log provides information about why the patches listed above were not able to be installed:
# more /var/sadm/install_data/Solaris_10_Recommended_log *** Install Solaris 10 Recommended begins Mon Oct 18 14:47:11 BST 2004*** *** PATCHDIR = /tmp/10_Recommended *** (output omitted) Installing 112875-01... Checking installed patches... Patch 112875-01 has already been applied. See patchadd(1M) for instructions. Installing 113023-01... Checking installed patches... One or more patch packages included in 113023-01 are not installed on this system. (output omitted) #