Sunday, November 20, 2011

Solaris Zone Part 3 ( whole Solaris zone )

 Creating whole solaris zone



Big zone no files are shared between this type of zone and global zone, need more space because more files and packages will be installed.

Solaris Zone Part 1 ( Concepts and theory )
Solaris Zone Part 2 ( Sparse Solaris zone )
Solaris Zone Part 3 ( whole Solaris zone )
Solaris Zone part 4  ( Zone Configuration )

➊  Select the disk that will be used for Solaris zone, also select the mount point and add them to /etc/vfstab file.

 bash-3.00# vi /etc/vfstab 

add the following to the file
 /dev/dsk/c1d0s0 /dev/rdsk/c1d0s0    /workzone/apache    ufs   1     yes   - 
where the :
/dev/dsk/c1d0s0 is the name of the disk.
/workzone/apache is the mount point 



➋ at the command prompt type
 bash-3.00# zonecfg -z zone2

↪ where zonecfg is the command used to set up zone configuration, zone2 is the name of the zone.

➌ type create command to create the zone
 zonecfg:zone1>create -b  
➍ set zonepath parameter
 zonecfg:zone1>set zonepath=/workzone/zone2
↪ zonepath is the Path that the zone will be installed, the directory you select must have 700 permission. type chmod 700 /yourdirectory to change directory path.

➎ set autoboot parameter 
 zonecfg:zone1> set autoboot=true 
↪ to boot the zone automatically


➏ add network configuration
 zonecfg:zone1> add net 
↪ add network configuration

➐ set the physical network card
 zonecfg:zone1:net> set physical=e1000g1
↪ the network card name is used for the physical interface.

➑ set IP address
 zonecfg:zone1:net> set address=10.109.9.234
↪ the ip address of zone

 zonecfg:zone1:net> end 

➒ verify your configuration
 zonecfg:zone1> verify 
↪ Determine whether the resources and properties specified are valid

➓ save your configuration
 zonecfg:zone1> commit 
↪ save your configuration

 zonecfg:zone1> exit 

➊➊ check zone status 

 zoneadm list -cv 
ID NAME       STATUS   PATH              BRAND  IP    
   0 global      running  /               native  shared  
   - zone2     installed /workzone/zone2        native  shared 
↪ to see the zone status, you can see zone1 status is configured.
zone status can be :
1- Configured
2- Incomplete
3- Installed
4- Ready
5- Running


➊➋ to install the zone at the command prompt type
 bash-3.00# zoneadm -z zone2 install 
↪ this will take some time, now check zone status

➊➌ check zone status
 bash-3.00# zoneadm list -cv   

 ID NAME STATUS PATH BRAND IP
 0 global running / native shared 
 - zone2 installed /workzone/zone1 native shared 

↪ you can see that zone status is changed from confiugrd to installed

➊➍ now boot solaris zone, at the command prompt type:-
 bash-3.00# zoneadm -z zone2 boot 

➊➎ check your zone status :-
bash-3.00# zoneadm list -cv 

 ID NAME       STATUS   PATH              BRAND  IP    
   0 global      running  /               native  shared  
   3 zone2      running  /workzone/zone1        native  shared  
↪ it is now running. the zone status has changed form configured => installd => running

↪ use the command zlogin -C zone1 to complete the zone configuration:-
bash-3.00# zlogin -C zone1 
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: 
 Select 13

1- the first screen will ask you about hostname:- type the host name. then press (esc+2)
2- select No for Kerberos Security then press (esc+2).
3- select your Name service type then press (esc+2)
4- select your country and password ... etc .

the zone is rebooting now, after rebooting login to your zone normally.

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes