创建solaris zone
root@rac1 # cd /orabak
root@rac1 # mkdir zone
root@rac1 # cd zone/
root@rac1 # mkdir orabktest
root@rac1 # ls
orabktest
root@rac1 # pwd
/orabak/zone
root@rac1 # ls
orabktest
root@rac1 # chmod 700 orabktest
root@rac1 #
root@rac1 # zonecfg -z orabktest
orabktest: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg

rabktest> create
zonecfg

rabktest> set zonepath=/orabak/zone/orabktest
zonecfg

rabktest> set autoboot=true
zonecfg

rabktest> add net
zonecfg

rabktest:net> set address=10.0.9.15
zonecfg

rabktest:net> set physical=ce0
zonecfg

rabktest:net> end
zonecfg

rabktest>
zonecfg

rabktest> info
zonepath: /orabak/zone/orabktest
autoboot: true
pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: 10.0.9.15
physical: ce0
zonecfg

rabktest> verify
zonecfg:orabktest> commit
zonecfg:orabktest> ^D
root@rac1 #
root@rac1 # zoneadm -z orabktest install
root@rac1 # zoneadm -z orabktest list -v
ID NAME STATUS PATH
- orabktest installed /orabak/zone/orabktest
root@rac1 # zoneadm -z orabktest boot
root@rac1 # zoneadm -z orabktest list -v
ID NAME STATUS PATH
1 orabktest running /orabak/zone/orabktest
root@rac1 # zlogin -C orabktest
[Connected to zone 'orabktest' console]
104/104
Select a Language
0. English
1. Simplified Chinese
2. Traditional Chinese
Please make a choice (0 - 2), or press h or ? for help: 0
What type of terminal are you using?
1) ANSI Standard CRT
2) DEC VT52
3) DEC VT100
4) Heathkit 19
5) Lear Siegler ADM31
6) PC Console
7) Sun Command Tool
8) Sun Workstation
9) Televideo 910
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: 3
q Host Name for ce0:2 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Enter the host name which identifies this system on the network. The name
must be unique within your domain; creating a duplicate host name will cause
problems on the network after you install Solaris.
A host name must have at least one character; it can contain letters,
digits, and minus signs (-).
Host name for ce0:2 orabktest
设置共享目录
root@rac1 # zonecfg -z orabktest
zonecfg:orabktest> add fs
zonecfg:orabktest:fs> set dir=/orabak/backup
zonecfg:orabktest:fs> set special=/orabak/backup
zonecfg:orabktest:fs> set type=lofs
zonecfg:orabktest:fs> end
zonecfg:orabktest> commit
zonecfg:orabktest>
root@rac1 #
root@rac1 #