Sun Microsystems 10 User Manual

Page of 121
Version 3.1-en
  Solaris 10 Container Guide - 3.1   4. Best Practices 
Effective: 30/11/2009
4.1.5. Software installations in Solaris and zones
[dd] The zones' directory structure is determined mainly from the need to install software with special 
needs in this area. Prior to creating the zones, this question should also be discussed extensively with 
regards to the intended purpose of the zone. In general, the following types of software installations 
are possible in Solaris:
Software installation from an archive – referred to below as non-pkg software
The software is installed per installation script by copying from an archive or a directory.
No information on the installed software is contained in the pkg database.
Software management must be carried out by tools belonging to the software itself or by 
simple Solaris programs such as cp, mv, rm,...
Software installation as a package with pkgadd – referred to below as pkg software, etc.
The software is distributed in pkg format and installed with pkgadd.
The pkg information is present in the pkg database under /var/sadm/install.
The pkg database is used for pkg management such as update, patch, remove and zone 
installation.
Furthermore, it must be decided whether software is to be installed in all zones (global and local) or 
only in a certain zone, and who has permission to install the software (the global zone or the local 
zone).
The following chapters describe various software installation scenarios related to the usability of the 
software.
4.1.5.1. Software installation by the global zone   usage in all zones
non-pkg software 
Software A is installed by the global zone, e.g. in /software/A.
/software/A is made available to all local zones as a read-only directory (e.g. zonecfg: 
add fs).
/software/A/cfg is a soft link according to e.g. /opt/A/cfg and contains the zone-dependent 
configuration.
/software/A/data   is   a   soft   link   according   to   e.g.   /opt/A/data   and   contains   the   zone-
dependent data.
The software can be used in all zones.
Only the configuration and the software data can be modified by the zones.
pkg software
Software P is installed by the global zone with pkgadd in the global zone and all local 
zones.
An entry is made in the pkg database in all zones.
If the file to be installed is not located in an inherit-pkg-dir, the file is copied into 
the corresponding directory.
The configuration and data directories of software P can be placed in areas writable for 
the local zones by corresponding soft links (see non-pkg software).
The software can be used in all zones.
Only the configuration and the software data can be modified by the zones.
4.1.5.2. Software installation by the global zone – usage in a local zone
non-pkg software 
Software A is installed by the global zone, e.g. in /zone-z/software/A
/zone-z/software/A is made available as a writable directory of local zone z (e.g. zonecfg: 
add fs)
The configuration and the data of software A can be modified by zone z, since this part 
is available and writable exclusively by this zone.
pkg software
This case is not recommended for pkg software. In this case, it is better to install the 
software  directly in the  local  zone  (installation  by  the  local  zone  –  usage  in  the  local 
zone).
36