栏目搜索
 
 
 
 
你的位置:首页 > 操作系统 > Unix >
 

Solaris 8.0 +Oracle 9.2.0 +VRTSvcs 双机安装文档

日期:2006-03-24 00:00:00  点击:  作者:  来源:    【我要投稿】   【加入我的收藏夹】

本文章地址:http://www.netbarguide.com/OS/Unix/20060322/yPvsa.html [点此复制地址]

Solaris 8.0 +Oracle 9.2.0 +VRTSvcs 双机安装文档
文档类型:技术文档
完成日期:09/25/2004
作者:viking_lee
Email:viking_lee2004@hotmail.com
硬件平台
SUN 280 2台(SPARC Ⅲ /1G ROM /36G DISK/QLOGIC HBA)
NSTOR Fible 磁阵
2、 软件平台
Solaris 8.0 for 64 bit
Patch for Solaris 8.0
Oracle 9.2.0 for SPARC SUN Enterprise
VRTS Volume Manager
VRTSvcs
VRTSvcs Agent for Oracle
Patch for Nstor
3、 安装流程
A 安装Solaris 8.0
B 安装Solaris 8.0 补丁包
C 安装Nstor 补定丁包
D 安装Volume Manager
E 安装 Oracle 9.2.0
F 安装 VRTSvcs
G 安装 VRTSvcs Agent for Oracle
H 配置 VRTSvcs

A安装Solaris 8.0
此部分的工作想必不用再说了,在SUN的服务器上安装操作系统
注意的是,在安装Solaris 8.0时,我选择的是全部安装。安装的是OEM版本的。
B安装Solaris 8.0 补丁包
此步骤是必须的。可以在SUN网站上下载最新的补定丁包,名字为8_recommended.zip。使用命令unzip 8_recommended.zip 将此包解压。如果些包在光盘上,要先将其复制到硬盘上。可如下操作:
#cd cdrom/cdrom0 (进入光盘路径)
#cp 8_recommended.zip /tmp (将补丁包复制到/tmp目录下)
#unzip 8_recommended.zip (解压包)
解压完成后,会在当前目录中形成一个8_recommended目录,进入此目录,进行补丁包的安装。使用如下命令:./install_cluster。
时间的长短要与机器有关。大约需要2个小时左右。在安装完成后,重启机器。
C 安装Nstor 补定丁包
在本例中,磁阵使用的是Nstor(太科公司)的光纤磁阵。HBA卡使用的是Qlogic的HBA。本例中,有一个特点,在SUN 上安装Qlogic HBA卡驱动后,会出现问题,所以只安装了Nstor公司提供的补丁。目的是让SUN280找到光纤磁阵。由于各个案例中磁阵的品牌与型号不尽相同,因此,此部分的安装只是示例。还要具体按磁阵提供商支持。
1、拷贝/cdrom/sun/progs/SAN/SFS_base_packages.S8.tar.gz到/tmp
#cd /cdrom/cdrom0/sun/progs/SAN
#cp SFS*.S8.* /tmp
#cd /tmp
#gzcat *.gz |tar xvf -
#cd SFS_base_packages.S8
#pkgadd -d . (全部安装,d后面有个点,表示当前目录下所有文件)

2、拷贝/cdrom/cdrom0/sun/install/bin/unpack-patches到/usr/sbin下
#cp /cdrom/cdrom0/sun/install/bin/unpack-patches /usr/sbin
#cd /cdrom/cdrom0/sun/install
#./setup-standard.sh (执行/cdrom/cdrom0/sun/install/setup-standard.sh)

3、解开/cdrom/cdrom0/sun/patch/SAN/8的patch包到/tmp/8
#cd /cdrom/cdrom0/sun/patch/SAN/8
#unpack-patches (命令输入后,会提示把包解压到/tmp/8,选择Y)

4、拷贝/cdrom/cdrom0/sun/patch/SAN/111847-08.zip到/tmp
#cd /cdrom/cdrom0/sun/patch/SAN
#cp 111847-08.zip /tmp
解开111847-08.zip包
#cd /tmp
#unzip 11*
#patchadd 111847-08

5、安装/tmp/8中的patch
#cd /tmp/8
#./install_patches

6、重启
sync
reboot (或shutdown –y –i6 –g0)
重启后,机器即可查看到磁阵了。为了验证,可采用如下方法:
#format
会提示检测出几块盘,0为本硬盘,1为外挂磁阵。光纤磁阵的表示方式为:c3t3d1s2(本例中的光纤磁阵,S2表示是光纤磁盘)
为了作双机,我没有采用format命令手工分区,而是安装完VolumeManager 后,采用它完成的。

D 安装Volume Manager
此软件的安装过程如下:
#cd /cdrom/cdrom0
#cd /VOLMUE_MANAGER
#./INSTALLVM
按提示完成安装。
要启动些软件,以root用记身份启动。#vea
本人的使用过程如下:

1、 新建磁盘组
点开主机,就是启动后,看到标有IP地址的机器,右键disk groups,选择new disk group,在提示下进行 ,输入新的磁盘组的名字,选择采用哪块磁盘。此处要注意的是,一定要选择外挂的磁阵。因为此后的Oracle要安装在上面。本例中,磁盘组的名字为TH_ora,以后在配置VRTSvcs时,需要用到。
2、 新建卷
磁盘组建立后,可在Disk Groups 下面出现新建的组。右键组,选择新建卷,按提示完成卷的建立工作。本例是卷名字 ora,此名字后面将会在VRTSvcs的配置中使用到。
3、 挂载卷
右键卷名,选择文件系统中新的文件系统。把卷做成ufs文件系统。
右键卷名,选择文件系统中挂载文件系统,把卷挂载到系统中。本例中为把卷挂到/oracle目录中。在挂载时,不要选择自动。以后VRTSvcs会完成此工作。
4、 后续工作
在完成上述3项后,在系统中就可以看到/oracl目录了,可使用#df –k 查看其使用情况及是否挂载成功。
在系统加入oracle用户 及dba组后,要回到此处,把卷的属性改为user 为oracle group 为dba,并将其权限改为0755。为了安装oracle 数据库准备。
5、 磁盘切换
为了测试磁盘是否可以切换,作如下测试:(目的是为了切换oracle之用)
在已经挂载/oracle的机器上,先将/oracle卸载。然后点TH_ora右键,选择Deport Disk Group。目的是让此机器把磁盘导出,让另一台机器可以导入磁盘。在另一台机器上启动volume manager ,此时,在disk groups 下是可以看到一个磁盘组的,右键这个磁盘组,只有一个选项可用,即为Import disk group。选择此选项,导入磁盘。此时,Volume 下就可以看到ora卷了,但此时,机器并没有挂载卷,要手工挂载上。方法如第3步。挂工完成后,可使用#df –k 查看其状态。如果可以看到,说明已成功。然后使用同样的方法,将其导出,再在第一台机器上导入,准备安装oracle 数据库。
注意:如果第二台机器上已存在/oracle目录,在挂载时,可能会挂载不上,此时,先删除/oracle目录,然后挂载,即可。

E 安装 Oracle 9.2.0
1、使用admintool工具添加dba组和 oinstall组及oracle用户。Oracle用户的主目录为/export/home/oracle。
或者:
#groupadd dba
#groupadd oinstall
#useradd oracle –d /export/home/oracle –g oinstall –G dba
#passwd oracle
#cd /export/home/
#chown oracle oracle
2、修改oracle用户的.profile文件
以oracle用户登录系统
$ls –al
vi .profile (修改文件,加入以下内容)
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
ORACLE_BASE=/oracle/apps/oracle
ORACLE_HOME=/oracle/apps/oracle/OraHome
ORACLE_SID=orcl
LD_LIBRARY_PATH=/usr/lib:/usr/dt/lib:/usr/openwin/lib:$ORACLE_HOME/lib
PATH=/usr/bin:/usr/dt/bin:/usr/openwin/bin:$ORACLE_HOME/bin:/usr/dt/bin

:wq!
$重新以oracle用户登录,使环境变量成效。
3、 修改/etc/system文件
在修改前,先备份一份/etc/system文件。
# cd /etc
#cp system system.back
#vi system (加入以下内容)
set shmsys:shminfo_shmmax=1073741824
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmns=100
set semsys:seminfo_semmsl=100
set semsys:seminfo_semmni=100
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767

:wq!
# 以上加入内容要根据自己机器的情况编写。
#sync
#reboot
4、 安装oracle数据库
以oracle 用户身份登录,
$cd /cdrom/cdrom0
$./runInstaller 按提示进行安装。Oracle 9.2.0.1 是三张光盘,在安装完第一张后,要求换盘,
此时,要退出cdrom。$ cd /
$eject
完成安装。测试数据库。
$sqlplus /nolog
SQL>connect / as sysdba
SQL>startup
SQL> select * from sys.dba_tablespaces;
如果有数据反回,说明数据库启动成功。
关闭数据库
SQL> shutdown immediate

F 安装 VRTSvcs
安装过程与安装一盘软件相同,在本例中,安装的4 .0版本,与3 .5有所不同。按提示安装即可完成。
注意:
1、 在安装前,在两台机器上编写.rhosts文件
在里面写入两台主机的名字
本例中如下
sun280A
sun280B
+
里面有一个+号,在双机配置完成后,去掉+号。
2、 在两台机器的/etc/inet/hosts里面加入对方机器名,目的是让两台机器能ping通主机名。
本例中如下 (sun280B)
127.0.0.1 localhost
10.10.10.1 sun280B loGhost
10.10.10.11 sun280A
(sun280A)
127.0.0.1 localhost
10.10.10.11 sun280A loghost
10.10.10.1 sun280B

3、 安装
#cd /cdrom/cdrom0
# ./INSTALLER
按提示安装即可,在安装过程中会提示输入Cluster名字(本例中为ORA_CLU),ClusterID号(本例中为1),系统名字:此处要写两台主机名字,(本例中为sun280A sun280B),然后选择心跳网卡等。按提示即可完成安装。其中会要求输入虚拟IP 地址。是用来管理CLUSTER的。本例中为10.10.10.10。
本次测试在两台机器上分别安装上了VRTSvcs,在另一台机器输入Cluster名字与ID时,要与第一台机器的一样。
安装完成后重启机器

G 安装 VRTSvcs Agent for Oracle

本例中,此软件要用admintool来安装。用pkgadd 无法安装。
#admintool 启动工具,在Browes 选择Software,在启动界面中EDIT中选择ADD,在弹出的界面中输入cd path,本例中为/cdrom/cdrom0/CLUSTER_SERVER_AGENTS/ORCLE_AGENT/PKGS
确定后即可安装。
两台机器都要安装ORACEL_AGENT。
重启机器。

H 配置 VRTSvcs
在配置之前有两步工作要做,第一,为VCS中加入一类类型,要使用图形界面的CLUSTRE监控软件。
#hagui
启动后,要导入oracle类型。在文件选 项中,选择导入。
在路径中输入:/etc/VRTSvcs/conf/OracleTypes.cf
第二:由于我们在第一台机器上安装oracle数据库。其监听文件中的地址为第一台机器的主机名,所以要修这时,把主机名改为CLUSTER的虚拟地址。
要修改listener.ora。此文件存放于ORACLE_HOME/network/admin下
在此文件中将HOST=sun280A 变为HOST=10.10.10.10(CLUSTER 虚拟IP)

配置VCS可以采用Web 方式。
Word)进入配置界面。
1、 选择Groups>>>>Add Service Group>>>> New Group Name (oracle,示例),在节点中选择sun280A sun280B ,在自启动栏选择对勾,分配优先级。本例中为样sun280A为5,sun280B为10 (本人没有弄懂是数值大优先级高还是数值小优先级高)next >>>>manually>>>>Resource Name(diskgroups);resource type (DdiskGroup);Attributes for Selected Type中DiskGroup 编辑,在Value中写入TH_ora。保存。点完成。
这样 ,就建立了第一个组。此组的意思是让VCS自动切换我们外挂上的磁盘。还记得TH_ora了吧。就是我们外挂的磁阵用Volume Manager分出来的。
2、 进行oracle组。在左边点新建资源。按1的方式建立卷的名字:ora。类型选择volume。
3、 新建资源,建立名字为oracle_mount的资源名字,类型选择Mount
4、 新建资源,名字为oracleDB,类型为oracle。(如果在配置之前不进行导入的话,在类型里面是看不到oracle这项的)。
这样,我们就建立了4个资源。Disk>>>Vol>>>Mou>>>DB
意思为:当磁盘挂载后,建立卷,然后挂载/oracle,然后启动oracle数据库。
不过还有一项工作要做,就是让这四项资源相关连。
5、 资源连接
进行diskgroups后,在界面右边有4项,为别为:oracleDB,oracle_mount,ora,diskgroups。
先点击oracleDB,在界面左侧,点击 link resource ,选择 oracle_mount。
同理点击 oracle_mount,在界面左侧,点击 link resource ,选择 ora。
点击 ora,在界面左侧,点击 link resource ,选择 diskgroups。

6、 完成后,不要忘记保存。
到此,基本上已配置完成。
这是本人的首次测试Oracle数据库双机。有不托之处,请大家指正。
同时,感谢chinaUnix,让我们有学习交流的机会。!!!

首先要用jsn老兄的方法把你的/etc/hostname.rtls0 以及hosts、/etc/netmasks、/etc/netmasks、/etc/nsswitch.conf设置好。

然后注意看8139驱动的说明

Install method
a. Power-off your PC and insert your RTL8139 adapter.
b. Boot-up you Solaris/x86 and login as "root".
c. Copy the "rtls099.zip" into the temporary location in your hard-driver.
d. UNZIP the "rtls099.zip" and you will get 2 files, "rtls" and "Install".
e. If the PCI ID for your RTL8139 adapter is not VID_10EC_DID_8139 or VID_1113_DID_1211 or VID_1186_DID_1301, you can modify the "Install" file to match your PCI ID, VID_ABCD_DID_WXYZ for example, modify the "pci1186,1301" to "pciABCD,WXYZ".
f. Run the "Install" from File Manager to install the driver, and
it will modify 2 files, "/etc/name_to_major" and "/etc/driver_aliases"
g. You need to create the "/etc/hostname.rtls0" file and modify some
other related files to make your networking environments working well.
h. You can execute "touch /reconfigure" then "shutdown -i5 -g0", so that
Solaris will reboot and scan changed
hardware environment.
i. You can execute "ifconfig -a" to make sure the RTL8139 driver is up.

其实这句英文我只有
e. If the PCI ID for your RTL8139 adapter is not VID_10EC_DID_8139 or VID_1113_DID_1211 or VID_1186_DID_1301, you can modify the "Install" file to match your PCI ID, VID_ABCD_DID_WXYZ for example, modify the "pci1186,1301" to "pciABCD,WXYZ".
f. Run the "Install" from File Manager to install the driver, and
it will modify 2 files, "/etc/name_to_major" and "/etc/driver_aliases"
这里一开始没看明白我以为没什么用处。但是我大错特错了;(因为这里太重要了。
从F.可以知道,安装这个驱动他们会设置/etc/name_to_major和/etc/driver_aliases两个文件。当我们安装完后,需要把/etc/driver_aliases里的
rtls "pci1186,1301"
rtls "pci10ec,8139"
rtls "pci1113,1211"

设置为
#rtls "pci1186,1301"
rtls "pci10ec,8139"
#rtls "pci1113,1211"
然后重起
如果还不好使还有Install里的


# update
# /etc/driver_aliases
# /etc/name_to_major

这个#去掉。肯定能好使:)

good luck!

最近刚刚发布的 Solaris 10 操作系统,号称Sun公司的真正意义上的里程碑式操作系统,带
来了诸多突破性技术,如 Solaris Containers、动态跟踪 (DTrace)、预测性自我修复和ZFS动态
文件系统等。
比较感兴趣的是Solaris Container,也就是N1 Grid Container--网格?!现在好像比较
流行这个,Oracle 10g 也是Grid的意思。。。。
这个Solaris Container号称可以让每个 Solaris 10 创建多达 8192 个的安全、无故障软件
分区,相对于SunFire 3800/4800/6800/4900/6900/12K/15K/25K的硬件分区好像更夸张一点,感觉
有点像PC上的VMware。IBM最近的P5系列也是,好像现在各大厂商都热衷于这个,叫什么server
virtualization

开始上手:

root@b1000:/# uname -a
SunOS b1000 5.10 s10_63 sun4u sparc SUNW,Sun-Blade-1000

刚装完的系统,只有一个global zone
root@b1000:/# zoneadm list -vc
ID NAME STATUS PATH
0 global running /

首先创建一个目录,用来存放新的soft zone的文件。
root@b1000:/# mkdir -p /zone/zone1
root@b1000:/# ls -ld /zone/zone1
drwxr-xr-x 2 root other 512 Dec 4 14:42 /zone/zone1

创建一个zone1的软分区:
root@b1000:/# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/zone/zone1
zonecfg:zone1> set autoboot=true
zonecfg:zone1> add net
zonecfg:zone1:net> set address=192.168.0.101
zonecfg:zone1:net> set physical=eri0
zonecfg:zone1:net> end
zonecfg:zone1> info
zonepath: /zone/zone1
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: 192.168.0.101
physical: eri0
zonecfg:zone1> verify
zonecfg:zone1> commit
zonecfg:zone1> ^D
root@b1000:/#

创建完成,查看zone1的信息:
root@b1000:/# zonecfg -z zone1 info
zonepath: /zone/zone1
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: 192.168.0.101
physical: eri0
root@b1000:/# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 configured /zone/zone1

安装操作系统文件刚刚配置完成的zone1:
root@b1000:/# zoneadm -z zone1 install
/zone/zone1 must not be group readable.
/zone/zone1 must not be group executable.
/zone/zone1 must not be world readable.
/zone/zone1 must not be world executable.
could not verify zonepath /zone/zone1 because of the above errors.
zoneadm: zone zone1 failed to verify
root@b1000:/# ls -ld /zone/zone1
drwxr-xr-x 2 root other 512 Dec 4 14:42 /zone/zone1
root@b1000:/# chmod 0700 /zone/zone1
root@b1000:/# ls -ld /zone/zone1
drwx------ 2 root other 512 Dec 4 14:42 /zone/zone1
root@b1000:/# zoneadm -z zone1 install
Preparing to install zone <zone1>.
Copying <2365> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <994> packages on the zone.
Initializing package <57> of <994>: percent complete: 5%
......
.....
...
这里大约需要二十分钟左右
Initialized <994> packages on zone.
Zone <zone1> is initialized.
Installation of these packages generated errors: <SUNWj5rt SUNWnsb SUNWmpatchmgr>
Installation of these packages generated warnings: <SUNWmoznav SUNWmozgm SUNWwbmc
SUNWmga SUNWdclnt SUNWlvma SUNWlvmg SUNWrmui SUNWpmgr>
The file </zone/zone1/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
root@b1000:/# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 installed /zone/zone1

启动这个zone:
root@b1000:/# zoneadm -z zone1 boot

进入zone1的Console:
root@b1000:/# zlogin -C zone1
[Connected to zone 'zone1' console]
[NOTICE: Zone booting up]

SunOS Release 5.10 Version s10_63 64-bit
Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: zone1
The system is coming up. Please wait.




Select a Language

0. English
1. SimplifIEd Chinese
2. Traditional Chinese

Please make a choice (0 - 2), or press h or ? for help:

接下来的和平时安装系统一样,设置主机名,时区,域名解析方式等等,


System identification is completed.

rebooting system due to change(s) in /etc/default/init


[NOTICE: Zone rebooting]


SunOS Release 5.10 Version s10_63 64-bit
Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: MyWeb
The system is coming up. Please wait.
starting rpc services: rpcbind done.
syslog service starting.
Dec 4 15:18:42 MyWeb sendmail[8940]: My unqualified host name (MyWeb) unknown; sleeping for retry
Dec 4 15:19:42 MyWeb sendmail[8940]: unable to qualify my own domain name (MyWeb) -- using short name
WARNING: local host name (MyWeb) is not qualified; see cf/README: WHO AM I?
/etc/mail/aliases: 12 aliases, longest 10 bytes, 138 bytes total
Dec 4 15:19:42 MyWeb sendmail[8941]: My unqualified host name (MyWeb) unknown; sleeping for retry
Dec 4 15:19:42 MyWeb sendmail[8942]: My unqualified host name (MyWeb) unknown; sleeping for retry

STSF Font Server Daemon.

Standard Type Services Framework 0.11.1
Copyright (c) 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
STSF is Open Source Software. Word:
Dec 4 15:21:53 MyWeb login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.10 s10_63 May 2004
# df -k
Filesystem kbytes used avail capacity Mounted on
/ 10080200 2702923 7276475 28% /
/dev 10080200 2702923 7276475 28% /dev
/lib 10080200 2702923 7276475 28% /lib
/platform 10080200 2702923 7276475 28% /platform
/sbin 10080200 2702923 7276475 28% /sbin
/usr 10080200 2702923 7276475 28% /usr
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 2737048 48 2737000 1% /var/run
swap 2737000 0 2737000 0% /tmp
# ifconfig -a
lo0:1: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
eri0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.101 netmask ffffff00 broadcast 192.168.0.255
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 9054 8810 0 15:20:20 ? 0:00 /usr/lib/saf/sac -t 300
root 8906 8802 0 15:18:39 ? 0:00 /usr/sbin/nscd
root 8802 8802 0 15:18:27 ? 0:00 zsched
root 9055 8810 0 15:20:20 console 0:00 -sh
root 8810 8802 0 15:18:38 ? 0:00 init
root 8899 8802 0 15:18:39 ? 0:00 /usr/lib/autofs/automountd
daemon 8833 8802 0 15:18:39 ? 0:00 /usr/lib/crypto/kcfd
root 8895 8802 0 15:18:39 ? 0:00 /usr/sbin/syslogd
daemon 8858 8802 0 15:18:39 ? 0:00 /usr/sbin/rpcbind
root 8904 8802 0 15:18:39 ? 0:00 /usr/sbin/cron
root 8911 8802 0 15:18:40 ? 0:00 /usr/sbin/inetd -s
root 8967 8963 0 15:19:43 ? 0:00 /usr/sadm/lib/smc/bin/smcboot
root 8964 8963 0 15:19:43 ? 0:00 /usr/sadm/lib/smc/bin/smcboot
root 8949 8802 0 15:19:43 ? 0:00 /usr/lib/utmpd
root 8965 8802 0 15:19:43 ? 0:00 /usr/lib/im/htt -port 9010 -s
yslog -message_locale C
root 8963 8802 0 15:19:43 ? 0:00 /usr/sadm/lib/smc/bin/smcboot
root 8966 8965 0 15:19:43 ? 0:00 htt_server -port 9010 -syslog
-message_locale C
root 9030 8802 0 15:19:45 ? 0:00 /usr/lib/dmi/snmpXdmid -s MyW
eb
root 9058 8802 0 15:20:20 ? 0:00 /usr/lib/ssh/sshd
root 9057 9054 0 15:20:20 ? 0:00 /usr/lib/saf/ttymon
daemon 8974 8802 0 15:19:44 ? 0:02 /usr/lib/ST/stfontserverd
root 9028 8802 0 15:19:45 ? 0:00 /usr/lib/dmi/dmispd
root 9059 8802 0 15:20:43 ? 0:00 /usr/lib/sendmail -bd -q15m
root 9022 8802 0 15:19:45 ? 0:00 /usr/lib/snmp/snmpdx -y -c /e
tc/snmp/conf
root 8999 8802 0 15:19:44 ? 0:00 /usr/dt/bin/dtlogin -daemon
root 9042 8802 0 15:19:46 ? 0:00 /usr/sfw/sbin/snmpd
smmsp 9060 8802 0 15:20:43 ? 0:00 /usr/lib/sendmail -Ac -q15m
root 9069 9055 0 15:22:47 console 0:00 ps -ef
不用的Sendmail停掉
# mv /etc/rc2.d/S88sendmail /etc/rc2.d/s88sendmail
# /etc/init.d/sendmail stop
# prtdiag -v
prtdiag can only be run in the global zone
哦,prtdiag不能在zone里用

prtconf有信息出来:
# prtconf
System Configuration: Sun Microsystems sun4u
Memory size: 1024 Megabytes
System Peripherals (Software Nodes):

prtconf: devinfo facility not available

# exit

按 ~ 然后按 . 退出zone1的Console,回到global zone,也就是真正的B1000
MyWeb console login: ~.
[Connection to zone 'zone1' console closed]
root@b1000:/#
root@b1000:/#
root@b1000:/# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
1 zone1 running /zone/zone1


root@b1000:/# telnet 192.168.0.101
Trying 192.168.0.101...
Connected to 192.168.0.101.
Escape character is '^]'.
login: root
Password:
Not on system console
Connection to 192.168.0.101 closed by foreign host.
忘改/etc/default/login了。。。。。。。。。。。


总结:
1. 提高了系统的利用率,可以一个当N个使唤
2. 应用系统可以跑在互不干扰的动态系统域里
3. 完全可以把一个zone的root密码告诉别人,用来练手不错,整瘫了大不了
zoneadm -z zone1 uninstall再zoneadm -z zone1 install就ok了
4. 应该还有许多好玩的功能待发掘。。。。

参考资料: