2007년 8월 28일 화요일

Zone Configuration, Booting, Configuring IP (#Solaris)

ZONE CONFIGURATION

The following commands are basic guidelines to configure a simple zone.

1. Make a directory to accommodate a zone, changing its level to 700 is required since the global zone
should not be seen from child zone
2. Use "zonecfg" commands to create a zone
3. Network settings and File system settings are required (fs,net)
4. verify, commit, exit is required to save zone settings.
5. The information of the zone is saved under "/etc/zones" in the form of .xml files


[jemin][$PWD] # mkdir /export/sample_server
[jemin][$PWD] # chmod 700 /export/sample_server
[jemin][$PWD] # zonecfg -z sample_server
sample_server: 그런 영역은 구성되지 않음
새 영역 구성을 시작하려면 'create'을(를) 사용하십시오.
zonecfg:sample_server> create
zonecfg:sample_server> set zonepath=/export/sample_server
zonecfg:sample_server> add net
zonecfg:sample_server:net> set physical=e1000g0
zonecfg:sample_server:net> set address=192.168.40.1
zonecfg:sample_server:net> end
zonecfg:sample_server> add fs
zonecfg:sample_server:fs> set dir=/goodies -This is a directory in child zone
zonecfg:sample_server:fs> set special=/usr/local -This is a directory in global zone that will be mounted as "/goodies" in child zone. Working with this directory has direct effect on the mounted directory in child zone
zonecfg:sample_server:fs> add options [rw,nodevices]
zonecfg:sample_server:fs> set type=lofs
zonecfg:sample_server:fs> end
zonecfg:sample_server> verify
zonecfg:sample_server> commit
zonecfg:sample_server> exit
[jemin][$PWD] #

ZONE INSTALLATION

[jemin][$PWD] # zoneadm -z sample_server install


ZONE BOOTING

Booting zones require two terminals

1. On the first terminal,
[jemin][$PWD] # zlogin -C sample_server

2. On the second terminal
[jemin][$PWD] # zoneadm -z sample_server boot

3. If the booting process is successful, installing process of the zone shows up which looks similar to installing process of the solraris OS. Choosing appropriate options will successfully load zones to be active.


CONFIGURING IP of the ZONE

There is no limit in allocating IP to the zone. However, allocating IP to a zone is only possible from the global zone. This process can be implemented using "ifconfig" command

[jemin][$PWD] # ifconfig e1000g0:1 "IP address/netmask" up

댓글 없음: