How Can I Set Up and Configure A Zone Under Solaris 10
How Can I Set Up and Configure A Zone Under Solaris 10
How Can I Set Up and Configure A Zone Under Solaris 10
ANSWER
Zones are a feature new in Solaris 10, and provide a useful mechanism to create a
Solaris environment for testing, and containment (Apache server, etc.). No
additional hardware is required for a zone, just some disk space. The impact of a
zone on machine performance is minimal. as all zones use the same kernel (not
true any more - see the example for installing a Linux zone to run acroread here),
so some additional memory for extra processes is all that's required.
Resource allocation to a zone can be closely controlled, and this includes processor
shares, resource pools and resource capping with rcapd.
Since update 4 of Solaris 10 (August 2007) dedicated network interfaces can be
assigned to a zone; prior to this they have to be shared with the global zone.
Here is an example of zone creation, but for a fuller picture consider attending
our Solaris 10 Administration Part 2 course
Create a suitable directory, to hold the zone copy of the OS:# mkdir -p
/Zones/Apache
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: 192.168.200.117
physical: hme0
zonecfg:apache> verify
zonecfg:apache> commit
zonecfg:apache> exit
(Note that a full copy of Solaris can be installed, rather than sharing directories, by
using the -b flag to the create option within zonecfg.)
Now we use zoneadm to install the zone:# zoneadm
-z
apache install
-ld
/Zones/Apache
drwxr-xr-x 2 root
root
Above sets correct permissions; now we can try again:# zoneadm -z apache install
/Zones/Apache
root
# ls
bin
dev
root
etc
home
export lib
mnt
opt
platform sbin
proc
system
tmp
usr
var
-z
apache
boot
Now login to the zone:- (-C option says we wish to login at the Console device):# zlogin -C apache
7. Netherlands (ISO8859-1)
8. Netherlands (ISO8859-15 - Euro)
9. Go Back to Previous Screen
Please make a choice (0 - 9), or press h or ? for help: 0
Then:What type of terminal are you using?
1) ANSI Standard CRT
etc.etc.
10) Televideo 925
11) Wyse Model 50
12) X Terminal Emulator (xterms)
13) CDE Terminal Emulator (dtterm)
14) Other
Type the number of your choice and press Return: 13
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair
You are now asked some questions as though you were performing a boot
after a sys-unconfig(1M), and when all information has been entered:System identification is completed.
One more question:This system is configured with NFS version 4, which uses a domain
name that is automatically derived from the system's name services.
The derived domain name is sufficient for most configurations. In a
few cases, mounts that cross different domains might cause files to
be owned by "nobody" due to the lack of a common domain name.
Do you need to override the system's default NFS version 4 domain name
(yes/no) ? [no] : no
rebooting system due to change(s) in /etc/default/init
[NOTICE: Zone rebooting]
SunOS Release 5.10 Version Generic 64-bit
Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: apache
apache console login: root
Password:
A variety of additional options are available, including preparing zone pre-configuration data,
controlling zones (booting, halting, etc) from the global zone, configuring zone resource
controls, etc. Further, Solaris 10 updates 3 to 6 contain a number of enhancements, such as
zone renaming, cloning and migration, plus the ability to run other operating systems see here for an example of installing a Linux OS to run acroread on Solaris X86.
Solaris 8 and 9 zones can also be created with additional software downloaded from Sun see here for an example.
QUESTION
I want to run a recent version of Adobe Reader (acroread) under Solaris 10 x86.
ANSWER