ChinaUnix.net
 >> ChinaUnix.net > Solaris

9月11日

作者:mmmmn     发表时间:2002/09/11 06:19pm

到下午6点20

一、想查看一个目录如/var中的各个目录所占有的磁盘空间情况
du -k -s /var  

二、如何搞定x86丢失root密码的问题
方法1:
如果要是还有另外一台机器,就用那台机器把你丢root密码的盘mount上来,然后修改passwd,shadow,这样就搞定了,我修改过无数,真是屡试不爽,其实就是很爽。
方法2:
我以前做过一次,但是都忘了怎么做了(我被暴打),只好告诉大家大概的方法了
用install光盘引导,然后开始会询问你要不要从分区,还有一些其它问题,反正全选no,然后就可以得到一个shell,剩下的工作就不用说了吧,和sparc的一样,建一个目录,然后mount,然后改passwd,shadow
方法3:
在安装的过程中随便哪个对话的时候,在空白的地方点鼠标右键,然后选console就出一个终端控制台

三、gcc编译的时候说找不到.h文件是缺少什么?
如果安装的是package的话,应该有这些库和头文件的,是在不行,再去下载glibc和libstdc++这两个包,装上试试。

四、如何弹出软盘?
eject floppy
不过不像光驱,你别指望软盘自己弹出来。

五、windows or solaris共存的问题
多系统安装指南:
http://multiboot.solaris-x86.org/

六、用磁带备份40多个G的数据需要多久?
磁带备份速度首先是驱动器的速度,现在有速度比较快的磁带机,比如LTO的能达到每秒15M还是非压缩的,如果你用多驱动器的带库做备份,那速度就更快了;不过如果你备份的是网络数据,那对你的网络带宽也有要求了。

七、DNS做泛域名解析应该怎么做?
比如域名为 mydomain.com,要做到我随便ping mail.mydomain.com或是 www.mydomain.com或是ftp.mydomain.com都指向同一个地址
应该可以,你试一下加入这条记录
* IN CNAME www  
这样加的,也行:
* IN  A   x.x.x.x

八、新安装的netscape浏览器,运行的时候报错
运行netscape,出错信息如下:
Xlib:connection to ":0.0" refused by Server.
Xlib:client is not authorized to connect to Server.
Error:can't open display: :0.0.
请问该如何解决?  
 xhost +
或设置DISPLAY变量  

九、在iplanet服务器上怎么增加对php文件的支持
Linux下的php + iplanet6/solaris也差不多:)
安装好的iplanet (以下是iplanet 6)
下载php
http://us3.php.net/do_download.php?download_file=php-4.2.2.tar.gz
http://benoit.noss.free.fr/php/install-php4.html(简单的说明)
Compile PHP as follows:
在php的源代码目录下
../configure --with-nsapi=/path_to/iplanet_home --enable-libgcc
make
make install
Add LD_LIBRARY_PATH=<libdir> to your Netscape server startup script
where <libdir> is the full path to the directory where libstdc++.so.2.10.0 is located (usually /usr/local/lib)
编译是个漫长的过程(需要flex,gcc,glib ....)

For iPlanet Enterprise 6.x on SunOS 5.8
The following is what I did to get PHP 4.06 to run on our server.
--------------------------------------
add to the obj.conf file
<Object name="default">
AuthTrans fn=php4_auth_trans
..
..
..
..#NOTE
..#This next line should happen after
..#all 'ObjectType' and before all 'AddLog' lines
Service fn="php4_execute" type="magnus-internal/x-httpd-php"
..
..
..
</Object>
<Object name="x-httpd-php">
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
Service fn=php4_execute
</Object>
--------------------------------------
add to the magnus.conf file
Init fn="load-modules" shlib="/your/path/from/root/libphp4.so" funcs="php4_init,php4_close,php4_execute,php4_auth_trans"
Init fn="php4_init" LateInit="yes"
--------------------------------------
add to the mime.type file
type=magnus-internal/x-httpd-php exts=php,php3,php4,phtml
--------------------------------------
Restart the server, NOT THE BOX THAT THE SERVER RUNS ON , to apply changes.
This can be done through iPlanet Admin Server or by telnet.....

测试页
test.php
<? echo("Hello World"); ?>

十、请问怎样设置solaris系统的屏保啊,比如等待时间,密码等等。
点击面板中桌面样式启动桌面样式配置,选择屏幕一项

十一、solaris 中如何做第二个启动盘? 
系统装好后,用dd备份到2号盘,有问题时,交换2个盘,不用改其他参数。
用disksuite做mirror,再按race的方法做,做别名用devalias,改启动盘用setenv boot-device

十二、如果硬盘的逻辑名是c0t6d0s0,请问t6和d0是指什么啊?
在scsi上没有Primary 和 Slave 的概念。
但在ide设备上有Primary 和 Slave 之分。
c:controller;
t:targer;
d:disk
s:slice(partition)

十三、 gcc-3.2-sol8-intel-local 这种文件安装有出错怎么办??
If you have .gz file but gzip says it is not in gzip format, it is likely that your browser downloaded the file and gunzipped it but did not take off the .gz. You can correct this problem by editing your browser's helper application for .gz files. For example, you might just need to do something like
mv gcc-2.8.1-sol7-sparc-local.gz gcc-2.8.1-sol7-sparc-local
pkgadd -d gcc-2.8.1-sol7-sparc-local (as root)

replacing the gcc file example with whatever file you are trying to work on.

As in the second example, is also possible that the file was downloaded and the .gz was removed, but the file was not gunzipped. In this case, you need to do

mv xv-3.10a-sol8-sparc-local xv-3.10a-sol8-sparc-local.gz gunzip xv-3.10a-sol8-sparc-local.gz pkgadd -d xv-3.10a-sol8-sparc-local (as root).

It is also possible that a .gz file was downloaded, but is not the correct size. Check the .gz file size with the file lists in the File Sizes link at the left on the sunfreeware.com page.


十四、解释一下/etc/passwd文件
Each line entry in this file contains the following seven fields separated
by colons:
loginID:x:UID:GID:comment:home_directory:login_shell  

十五、怎么在不重启动的情况下,重启动inetd服务
ps -ef | grep inet #获得inetd_id
kill -HUP inetd_pid

十六、关于crontab的执行问题
Please note that cron doesn't know any environment.
Do you have in your perl-script at beginning with #!/bin/perl,
if not, add it.

十七、关于solaris的密码问题
solaris 的密码好像默认最长是8位,请问怎样修改可以增加密码最大的位数?
对的,solaris允许你设超过8位的密码,但是它只验证前8位

十八、soaris 下 ,字符串转化为16进制数的函数是啥
strtol base =16

十九、系统默认最大进程数 
[1] The maxusers variable is automatically set by Solaris according to the
amount of physical memory available in the system. The automatic
minimum value for maxusers is 8, and the automatic maximum is 1024.
[2]  The maxusers parameters is set a little less than the amount of RAM in the
system, in megabytes.

二十、比较两个文件有什么不同的命令是什么?
diff 的结果看了让人头大,小文件还可以,大的晕眼。
我用mgdiff,  


  


此文章相关评论:
该文章有12个相关评论如下:(点这儿可以发表评论)
littletiger 发表于: 2002/09/11 06:35pm
老大的总结真是越来越及时了  表扬  10 分!:)
 
czc9 发表于: 2002/09/11 10:26pm
我对以下这个方法有点疑问,
1,是否要拆硬盘挂到另一台机器上
2,拆了硬盘挂到另一台机器上后是否要在bios里设置一下,启动后再mount,我从来没有试过
“二、如何搞定x86丢失root密码的问题
方法1:
如果要是还有另外一台机器,就用那台机器把你丢root密码的盘mount上来,然后修改passwd,shadow,这样就搞定了,我修改过无数,真是屡试不爽,其实就是很爽。”
 
boot 发表于: 2002/09/12 10:59am
mmmmn病了岳萌萌说的
 
ultra-guest 发表于: 2002/09/12 11:00am
听说mmmmn病了。。
 
南非蜘蛛 发表于: 2002/09/12 12:00pm
[quote][b]下面引用由[u]czc9[/u]在 [i]2002/09/11 10:26pm[/i] 发表的内容:[/b]
我对以下这个方法有点疑问,
1,是否要拆硬盘挂到另一台机器上
2,拆了硬盘挂到另一台机器上后是否要在bios里设置一下,启动后再mount,我从来没有试过
“二、如何搞定x86丢失root密码的问题
...
[/quote]
scsi硬盘不需要在BIOS里设置,IDE的设置一下就可以了
 
pech 发表于: 2002/09/12 03:24pm
MMMMMMMMMMMMMMM没事吧!
 
solarwind 发表于: 2002/09/12 08:24pm
应该定义个固定的格式.
[solaris][sparc|intel][2.8|2.6][system|software|tools...]
Q:********************
A:************
看起来,整理起来也方便。
 
南非蜘蛛 发表于: 2002/09/14 07:55pm
我打算做个FAQ的发布程序,不知道有没有必要
 
中原一片红 发表于: 2002/09/15 01:45pm
有~~
期待.........
 
asfasf 发表于: 2002/09/16 09:56am
同意做个FAQ,支持
 
netbackup 发表于: 2002/09/16 11:34am
支持!
什么时候做好?!
 
sam2 发表于: 2002/09/17 11:32am
du -k -s /var  
这个只是查看/VAR目录的总占用情况,而不是把/var下的每个目录的空间情况都列出来吧....
 
 

Copyright © ChinaUnix.net  *  转载请注明出处及作者