2 solaris基础和常用知识( 九 )


you tell me why i can execute "killall" successfully in solaris 2.6?
A: Just see the access mode of /usr/sbin/killall. If you can use it
with a common account identity, the access mode should be x-rsx-rx-r.
If you can not use it in a common account identity, the mode should
be x-r--r--r. You can change the mode as you like, whenever in 2.6,
or 2.7 or 2.8.

112 Q: I downloaded the SDM2.3 from the Download Center of "www.sun.com"
,read the White Paper and web detailed describing.But it is only the
OutLook of the software. I need the detailed document about how to
integrated my own network management application to Solstice.
A: I transfer this messag to Sun Service in Guangdong.

113 Q: 请问有没有磁盘管理工具 。我们有一台E450,有5块硬盘,想做RAID,但是没有工
具.
A: If the machine"s OS is solaris 2.8, the storage management software
is also installed in you machine. You can make the RAID by issuing
the command family: /usr/sbin/meta*; If you are not so familiar with
these commands. I can do it for you. or you can use solstice
disksuite, it is a GUI tool.

114 Q: 怎样强制更改NIS客户端的本地NIS数据表?有时候NIS客户端和NIS服务器端有
时会出现不一致的情况.NIS服务器和NIS slave 服务器也会出现这种情况 。
A: 你可以用yppush和 ypxfr 来做这种工作 , 更常见的方法是把它们写进cron,定
期更新 , 具体步骤请查阅Answerbook.


115 Q: 为了将工作站设为从DHCP动态分配IP,并且将主机名由"unknown"改为原名
修改了/etc/init.d/rootusr,将dhcpinfo后面三行(不是四行)注释掉;
hostname=`/sbin/dhcpinfo Hostname`
# case $? in
# 0) [ -z "$hostname" ] && hostname="unknown"
# 2) try_dhcp=no
esac
重启后 , 提示:
/sbin/rcs:ysntax error at line 143 : "esac" unexpected
INIT:cannot creat /var/adm/utmp or /var/adm/utmpx
INIT:SINGLE USER MODE
输入root口令后 , 只能运行在单用户模式 , 且vi、ls等都不能用(#vi:not found)
如何才能打开/etc/init.d/rootusr文件进行修改 , 恢复正常状态 。
A: 请找一个SOLARIS的安装启动盘 , 使用以下方法可以修改rootusr文件 , 步骤如
下:
1.把你的solaris光盘放进cdrom
2.键入stop a
3.当出现"ok"字样时,键入boot cdrom -s
4.cd /tmp
5.mkdir /tmp/xxx (xxx是什么东西无关紧要 , 随便取一个名字 , 如test)
6.mount /dev/dsk/c0t0d0s0 /tmp/xxx (在这里c0t0d0s0是你的root盘)
7.运行csh
8.setenv TERM vt220
9.vi /tmp/xxx/etc/init.d/rootusr,把esac那行也注释掉即可 。
10.把solaris光盘拿出 , reboot , 重启动即可 。

116 Q: 一台Ultra60工作站 , 其固定IP为10.11.105.247,用ifconfig hme0 dhcp
start总是失败 , 如下所示 。
# netstat -a|grep 4999
# ifconfig hme0 dhcp start
May 7 20:11:11 hwMusa01 dhcpagent[478]: ERROR! Address 10.11.105.147
is already in use ifconfig: internal error in DHCP agent
# netstat -a|grep 4999
localhost.4999 *.* 0 0 0 0 LISTEN
localhost.4999 localhost.1023 32768 0 32768 0 TIME_WAIT

抓包发现是dhcp服务器offer的IP地址10.11.105.147被decline了 。手工运行
dhcpagent , 提示4999端口被使用了 。以前此工作站曾配置为固定IP:
10.11.105.147 , 但现在已改为10.11.105.247并重启过多次 。请问 , 可能是什
么原因导致dhcp失败??

A: 导致问题出现的原因是 , 由于客户机在申请原来的被保留分配的IP时 , 服务器
发现这个IP不能够被使用(已经有其它机器使用了这个IP地址) 。使客户机申
请失败 , 并且使其中的某些进程不能正常退出 , 继续占用了端口4999而使后面
的申请不能进行 。办法是找到占用端口4999的进程 , 杀掉即可 。找到这个进程
的办法是 , 这个申请进程是带有dhcp字样的 。
# ps -e | grep dhcp

推荐阅读