鸿 网 互 联 www.68idc.cn

当前位置 : 服务器租用 > 操作系统维护 > solaris > >

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

来源:互联网 作者:佚名 时间:2015-06-03 08:40
新手必读(solaris基础和常用知识) 作者 boycw 转载时间: Q: 我们有一个产品在移植到SOLARIS的过程中出现了大量难以理解的问题 请给 我们现场支援一下 非常感谢!使用Forte Develop 编译C++程序的时候出现 以下信息 mit/ /teglobal h line : Warning (Anach

  新手必读(solaris基础和常用知识)
                   作者boycw 转载时间:
  
   Q: 我们有一个产品在移植到SOLARIS的过程中出现了大量难以理解的问题请给
  我们现场支援一下非常感谢!使用Forte Develop编译C++程序的时候出现
  以下信息
  mit//teglobalh line : Warning (Anachronism): Attempt to redefine TRUE without using #undef
  mit//teglobalh line : Warning (Anachronism): Attempt to redefine FALSE without using #undef
  >> Assertion: (/links/ line )
  while processing mit/multilockcpp at line
  
  请问是什么意思难道编译器还要assert吗?
  A: CC 编译器要求被编译的文件以两个新行结束请在相关头文件末尾加上新行
  
   Q: solaris的问题激活小键盘上的Numlock激活中文输入法按小键盘上的
  键中文输入法自行关闭请问是何原因?
  A: You can solve the problem you metioned by trying the following three
  ways:
   Make sure using GB locale instead of GBK
   Visit to get the recommended patches
  package for the your solaris platform and add it
   If possible you can change the solaris platform from solaris
  to solaris
  
   Q: 有关在SOLARIS上使用NETSCAPE问题
  问题描述:
  在SOLARIS上安装NETSCAP安装提示成功后运行netscape出现以
  下错误信息:
  xlib:connection to refused by server
  xlib:client is not authorized to server
  cant open display : :
  在SOLARIS上安装Acroread后如何设置能直接点击打开pdf文件而无需
  每次要先启动Acroread然后再打开? 请问上述问题如何解决?
  A: You run the command:
  #xhost :
  and then you can use NETSCAPE In the terminal in which the
  netscape is launched please set the envrionment DISPLAY as :
   Actually I dont know how to configure it If you are interested
  in it You can read some topics in AnswerBook User Collection
  
   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 `cat /etc/syslogpid` # 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/rcd directoryMake
  sure this files mode is rwxrxrx and the owner is root
  
   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
  
   Q: 用vi打开一个script文件发现里面有非法字符^M在vi命令行如何全程替代
  掉该字符?我试了一下用以下命令来做却不行$s/^M//
  A: $s/^M//g 其中^M是 ctrl+V ctrl+M或者用下面这个命令
  %unixdos $filename > $newfilename
  
   Q: How to add space to a filesystem in solaris ? When I patchadd a
  patchIt 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 M
  to M Then all the left should be given to /
  
   Q: 请教关于Solaris Patch的问题我们在安装一些软件时经常需要先安装一
  些Patch有一事不明向您请教一下比如某个软件需要Patch :
  现在我的机器上已经安装是不是就不用再安装了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
  
   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:
  products/network/l
  
   Q: 关于SUN机器root口令丢失问题如何解决?
  A: 办法如下
  利用SOLARIS的启动盘来启动然后把硬盘mount上去修改硬盘上原etc目录
  下的shadow文件将root项里的password域内容删除变成无密码然后重新
  启动主机以无密码的root登陆后重新设置root口令具体步骤如下
  把你的solaris光盘放进cdrom
  键入stop+a
  当出现ok字样时键入boot cdrom s
  cd /tmp/root
  mkdir /tmp/root/xxx (xxx是什么鬼东西就无关紧要了)
  mount /dev/dsk/ctds /tmp/root/xxx (在这里ctds是你的root盘)
  运行csh
  setenv TERM vt
  cp /tmp/root/xxx/etc/shadow /tmp/root/xxx/shadow/shadowbak
  vi /tmp/root/xxx/shadow并且将root项里的password域删除即可
  重启动你就可以以无密码的root登陆了登录后更改root的密码
  
   Q: In solaris 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 commandBut I really use it with common idIn
  solaris and solairs with common idi cant use the commoncan
  you tell me why i can execute killall successfully in solaris ?
  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 xrsxrxr
  If you can not use it in a common account identity the mode should
  be xrrr You can change the mode as you like whenever in
  or or
  
   Q: I downloaded the SDM from the Download Center of
  read the White Paper and web detailed describingBut 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
  
   Q: 请问有没有磁盘管理工具我们有一台E块硬盘想做RAID但是没有工
  具
  A: If the machines OS is solaris 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
  
   Q: 怎样强制更改NIS客户端的本地NIS数据表?有时候NIS客户端和NIS服务器端有
  时会出现不一致的情况NIS服务器和NIS slave 服务器也会出现这种情况
  A: 你可以用yppush和 ypxfr 来做这种工作更常见的方法是把它们写进cron
  期更新具体步骤请查阅Answerbook
  
  
   Q: 为了将工作站设为从DHCP动态分配IP并且将主机名由unknown改为原名
  修改了/etc/initd/rootusr将dhcpinfo后面三行(不是四行)注释掉;
  hostname=`/sb
网友评论
<