以前对Solaris平台下的diskless clients作的实验,实现如下:
一、实验环境
server:windows2000p里用VMWare装Solars9 for x86
osserver:Solaris8 for sparc
client:ultra 10,MAC:8:0:20:e3:c8:4c,约定hostname:test20,IP:192.168.1.20
说明:这里的server是指提供服务器的操作环境,而osserver是指供client端调用的运行环境。需要网络支持。
二、实现过程
1、安装server
该部分安装省略,只是有一点要主要,因为client端在服务器上的工作目录是建在/export目录下,因此在分区时/export分区要足够大。一般来说,每个diskless client所需的空间至少为1.4G,我的分区如下:
# df -k
文件系统 千字节 用了 可用 容量 挂接在
/dev/dsk/c0d0s0 2955526 2300525 595891 80% /
/dev/dsk/c0d0p0:boot 10484 1508 8976 15% /boot
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 234716 20 234696 1% /var/run
swap 234696 0 234696 0% /tmp
/dev/dsk/c0d0s7 1636974 1043126 544739 66% /export
2、拷贝osserver images
#mkdir /install/sparc_8
这里的/install/sparc_8是指要存放images的目录,需要自己先建,也可在其他分区中,只要空间够就行。
需要Solaris8 for sparc的三张光盘:software 1/2 2/2,language。在光盘的Tools目录下:
software 1/2:
#./setup_install_server /install/sparc_8
software 2/2:
#./add_to_install_server /install/sparc_8
language:
#./add_to_install_server /install/sparc_8
3、增加支持client端的osserver
格式为#/usr/sadm/bin/smosservice add -H hostname:898 -- -o hostname -x mediapath=path -x platform=instruction-set.machine-class.Solaris-version -x cluster=cluster-name -x locale=locale-name
这里的instruction-set、machine-class和class.Solaris-version的设置如下:
------------------------------------------------------------------------------------------
instruction machine-class Solaris-version
sparc sun4d,sun4c,sun4m,sun4u Solaris_9,Solaris_8,Solaris_2.7,Solaris_2.6
i386 i86pc Solaris_9,Solaris_8,Solaris_2.7,Solaris_2.6
------------------------------------------------------------------------------------------
对应cluster,sun4u必须用SUNWCXall(ultra 10就属于sun4u),但有另一种说法是对应于运行安装的软件包的类型有关
Entire Solaris Software Group Plus OEM - SUNWCXall
Entire Solaris Software Group - SUNWCall
Developer Solaris Software Group - SUNWCprog
End User Solaris Software Group - SUNWCusr
Core Solaris Software Group - SUNWCreq
目前还不是很清楚,等以后弄明白后在补上。
#/usr/sadm/bin/smosservice add -H test53:898 -- -o test53 -x mediapath=/install/sparc_8 -x platform=sparc.sun4u.Solaris_8 -x cluster=SUNWCXall -x locale=zh.GBK
可用命令#/usr/sadm/bin/smosservice list查看:
# smosservice list
Authenticating as user: root
键入 /? 取得说明,请按 <enter> 来接受 [ ] 指定的缺省
请输入以下字符串值: password ::
装入工具: com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53
登录 test53 为用户 root 成功。
下载 com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53 成功。
平台
--------------------------------------------------------------------------------
sparc.sun4u.Solaris_8
4、增加diskless client
#/usr/sadm/bin/smdiskless add -- -i 192.168.1.20 -e 8:0:20:e3:c8:4c -n test20 -x os=sparc.sun4u.Solaris_8 -x root=/export/root/test20 -x swap=/export/swap/test20 -x swapsize=64 -x tz=PRC local=zh.GBK
查看如下:
# smdiskless list
Authenticating as user: root
键入 /? 取得说明,请按 <enter> 来接受 [ ] 指定的缺省
请输入以下字符串值: password ::
装入工具: com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53
登录 test53 为用户 root 成功。
下载 com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53 成功。
用户机 根区
交换区
转储区
--------------------------------------------------------------------------------
test20 test53:/export/root/test20
test53:/export/swap/test20
5、运行client
在运行client前先确保rpc.bootparamd进程已经运行
# ps -ef|grep rpc.bootparamd
root 307 1 0 3月 21 ? 0:00 /usr/sbin/rpc.bootparamd
root 1033 966 0 11:03:50 pts/1 0:00 grep rpc.bootparamd
没有的话,start it!
在client端启动时按stop+a,进入ok提示符:
ok boot .net
之后就慢慢等着系统启动吧,呵呵。
6、删除diskless client
#/usr/sadm/bin/smdiskless delete -- -o test53 -n test20
可以检查
# smdiskless list
Authenticating as user: root
键入 /? 取得说明,请按 <enter> 来接受 [ ] 指定的缺省
请输入以下字符串值: password ::
装入工具: com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53
登录 test53 为用户 root 成功。
下载 com.sun.admin.osservermgr.cli.OsServerMgrCli 自 test53 成功。
用户机 根区
交换区
转储区
--------------------------------------------------------------------------------
7、删除osserviver
#/usr/sadm/bin/smosservice delete -H test53:898 -- -x rmplatform=sparc.all.Solaris_8
需要提醒的是rmplatform不能定义为原来定义的sparc.sun4u.Solaris_8,要不系统提示找不到要删除的类型。
各命令具体含义请参看man联机手册。当然,你也可以共享某些目录或文件。
laoxia 回复于:2003-04-29 09:24:57 |
啊就好 |
duxf 回复于:2003-04-29 09:27:31 |
谢谢 |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/