当前位置:Linux教程 - Linux资讯 - 新手必读(solaris基础和常用知识三)

新手必读(solaris基础和常用知识三)

  新手必读(solaris基础和常用知识)                   作者:boycw 转载时间:2002-12-25    101 Q: 我们有一个产品在移植到SOLARIS的过程中出现了大量难以理解的问题,请给  我们现场支援一下,非常感谢!使用Forte Develop6编译C++程序的时候出现  以下信息:   "mit/../teglobal.h", line 39: Warning (Anachronism): Attempt to redefine TRUE without using #undef.  "mit/../teglobal.h", line 40: Warning (Anachronism): Attempt to redefine FALSE without using #undef.  >> Assertion: (../links/prepeXPression.cc, line 65)  while processing mit/multilock.cpp at line 0.     请问是什么意思,难道编译器还要assert吗?  A: CC 编译器要求被编译的文件以两个新行结束,请在相关头文件末尾加上新行。     102 Q: solaris的问题:激活小键盘上的Numlock,激活中文输入法,按小键盘上的0  键,中文输入法自行关闭,请问是何原因?  A: You can solve the problem you metioned by trying the following three   ways:  1. Make sure using GB locale, instead of GBK.  2. Visit http://sunsolve.sun.com to get the "recommended patches"  package for the your solaris platform, and add it.  3. If possible, you can change the solaris platform from solaris 2.7   to solaris 2.8     103 Q: 有关在SOLARIS上使用NETSCAPE问题  问题描述:  1.在SOLARIS2.6上安装NETSCAP4.04后,安装提示成功后,运行netscape,出现以  下错误信息:  xlib:connection to "0.0" refused by server  xlib:client is not authorized to server  can't open display : :0.0  2.在SOLARIS2.6上安装Acroread后,如何设置能直接点击打开.pdf文件,而无需  每次要先启动Acroread,然后再打开? 请问上述问题如何解决?  A: 1. You run the command:  #xhost :0.0  and then, you can use NETSCAPE In the terminal, in which the   netscape is launched, please set the envrionment DISPLAY as :0.0  2. Actually, I don't know how to configure it. If you are interested  in it. You can read some topics in AnswerBook2 User Collection.     104 Q: syslogd 如何支持汉字? syslogd 好像会把汉字拆分成两个字节,并去掉高位  如何解决?  A: How the background service provider syslogd supports character set   depends on the locale environment it starts. So, if you want Chinese   characters transferring by syslog. You can restart syslogd in   Chinese environment by issuing the following commands:  # LANG=zh; export LANG # set the locale environment in Chinese.  # kill -9 `cat /etc/syslog.pid` # to kill the former syslogd  # /usr/sbin/syslogd     If you want syslogd to support Chinese characters whenever the   machine boot. Put the attacted file in the /etc/rc3.d Directory.Make   sure this file's mode is "rwxr-xr-x" and the owner is root.     105 Q: 我的工作站的交换分区分的太小了,除重装系统外,是否有其它办法将空间调  整一下。  A: You can extend your swap region by issueing the following command:  #mkfile -m   #swap -a   Note: the should be the full path name.     106 Q: 用vi打开一个script文件,发现里面有非法字符^M,在vi命令行如何全程替代  掉该字符?我试了一下用以下命令来做,却不行:0,$s/^M//  A: 1,$s/^M//g ,其中,^M是 ctrl+V ,ctrl+M,或者,用下面这个命令。  %unix2dos $filename > $newfilename     107 Q: How to add space to a filesystem in solaris2.5.7 ? When I patchadd a   patch,It tell me that there is no sufficient filesystem capacity.  A: It seems like your root partition too small. Please check it   availiable size. If it is small, I think you would better to   reinstall the system. Please store all the data in the disk.  In the new installation, you need really to partitions, one is for   swap, and another is for /. The swap partition /tmp needs about 200M   to 500M. Then all the left should be given to /.     108 Q: 请教关于Solaris Patch的问题。我们在安装一些软件时,经常需要先安装一  些Patch,有一事不明,向您请教一下,比如某个软件需要Patch : 107546-02,  现在我的机器上已经安装107546-08,是不是就不用再安装107546-02了Patch  后面的那部分是什么意思?是不是大的数字可以包含小的数字的功能了? 同一  个Patch的不同版本之间会不会有冲突?  A: You are right. If you have installed a bigger version of the same   patch, it not necessary for you to install the smaller one. The   bigger version will override the earlier one if it installed before.   You need not worry about any collision.     109 Q: 关于sun的SunNet 我目前想了解关于sun的SunNet。我从sun的网站上了解到  SunNet已经被合并入到Solstice里了,我目前想试着把我做得程序集成到  SunNet或Solstice里,我看了Slostice得White Paper,但里边只提到了一点点  相关得Api,我从哪里,怎么才能到比较完全得文档呢?     A: To my knowledge, you can go to the following for a detailed info:  http://www.sun.com/software/solstice/em-prodUCts/network/sunnetmgr.Html.     110 Q: 关于SUN机器root口令丢失问题,如何解决?  A: 办法如下:  利用SOLARIS的启动盘来启动,然后把硬盘mount上去,修改硬盘上原etc目录  下的shadow文件,将root项里的passWord域内容删除,变成无密码。然后重新  启动主机,以无密码的root登陆后,重新设置root口令。具体步骤如下:  1.把你的solaris光盘放进cdrom  2.键入stop+a  3.当出现'ok'字样时,键入boot cdrom -s  4.cd /tmp/root  5.mkdir /tmp/root/xxx (xxx是什么鬼东西就无关紧要了)  6.mount /dev/dsk/c0t0d0s0 /tmp/root/xxx (在这里c0t0d0s0是你的root盘)  7.运行csh  8.setenv TERM vt220  9.cp /tmp/root/xxx/etc/shadow /tmp/root/xxx/shadow/shadow.bak  10.vi /tmp/root/xxx/shadow,并且将root项里的password域删除即可。  11.重启动,你就可以以无密码的root登陆了,登录后,更改root的密码。     111 Q: In solaris 2.6. when i use command "killall" ,all process started in   CDE will be killed and the eviroment will change to CDE login. I   looked up the man manual about "killall" ,it told me that "only root   can use the command".But I really use it with common id.In   solaris7 and solairs 8, with common id,i can't use the common.can   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=`/sb
[1] [2] 下一页 

(出处:http://www.sheup.com)


上一页 [1] [2]