Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338884
  • 博文数量: 94
  • 博客积分: 1500
  • 博客等级: 上尉
  • 技术积分: 1020
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-11 09:23
文章分类
文章存档

2011年(76)

2010年(18)

分类:

2010-11-10 21:29:51

 
1) Q:现在遇到这样一个问题,telnet一台SUN机时报下面的错误:

  No utmpx entry. You must exec "login" from the lowest level "shell".

  我做了下面的处理后:

  cd /var/adm

  mv utmpx utmpxbak

  touch utmpx

  telnet 恢复了正常,可在该机器的终端下执行login 命令时,又报了上面相同的错误。而且重新启动机器以后,telnet时还是报相同的错误!

  A:进入单用户模式,清空(不是删除)这两个文件

  # cat /dev/null > /var/adm/wtmpx

  # cat /dev/null > /var/adm/utmpx

  之后,重新启动系统

  找了很多国外的论坛,都是这么说的:

  The problem comes if utmp or wtmp file becomes corrupted . You need to initialize these and reboot the system to correct the error.

  These files are log files and can be initialized without affecting the system, as long as you reboot the system after truncating the files. Perform these steps:

  1. Bring the system into System Maintenance mode.

  2. Make copies of the files /etc/utmp, /etc/utmpx, /etc/wtmp, and

  /etc/wtmpx before proceeding with the next step.

  3. Delete the contents of these files by executing the following

  commands:

  # > /etc/utmp

  # > /etc/wtmp

  # > /etc/utmpx

  # > /etc/wtmpx

  4. Shutdown the system:

  # shutdown -y -g0

  Restart the system

  2) Q:我用setenv PATH=$PATH:/path/to/my/program的方式来赋值,总显示语法或者修饰符有问题。

  如果用setenv PATH=/path/to/my/program就可以成功赋值。

  请教各位老手,如果我想在CSehll下实现bash里面export PATH=$PATH:/path/to/my/program的赋值,应该怎么写啊?

  没用过CShell,请各位多指点,谢谢。

  A:CShell别用等号

  setenv PATH "$PATH":/path/to/my/program

  3) Q:系统是SUN 280R,我在#提示符下输入init s回车后屏幕闪了几下,然后就成了白屏,强行重启也没反应

  A:关掉电源,从光盘启动,进去看看是怎么回事

  boot cdrom s 就是从光盘启动后进入系统

  4) Q: 在sunfree的网站上,比如我想安装libiconv-1.8

  那么libiconv-1.8-sol10-intel-local.gz 与 libiconv-1.8.tar.gz

  有什么区别呢?

  A: 第一个是编译好的适合solaris系统的binary格式package文件

  安装,可以用pkgadd命令直接添加的

  后边的source文件,还没有编译

  安装,需要configure,make,make install的过程

  5) Q: 求助:vmware下安装solaris10之后不能改分辨率和刷新率

  A: 用kdmconfig命令,然后选择Xsun,即可调整分辨率

  6) Q: fsck -F ufs -y /dev/rdsk/c1t0d0s6

  A: fsck 修复文件系统

  命令格式:fsck raw-device 等同于DOS的chkdsk命令

  例子:fsck /dev/rdsk/c0t1d0s0

  ufs UNIX文件系统。是Solaris缺省的文件系统。

  -F好像是一个修复参数

  -F ufs 是文件格式

  -y 不要你敲y了,全部自动yes

  fsck是对news过程的一个恢复

  这两个操作是对裸设备文件的。

  7) Q: 在solaris9上怎样设置oracle10g随系统启动时自动启动?

  A: 设定自启动

  1. 先在/etc/init.d目录下,作下一个shell文件,

  其中/export/home/oracle/product/8.1.7 是你Oracle的安装目录

  ,oracle是安装用户

  # vi /etc/rc2.d/dbora

  #!/bin/sh

  ORA_HOME=/export/home/oracle/product/8.1.7

  ORA_OWNER=oracle

  if [ ! -f $ORA_HOME/bin/dbstart ]

  then

  echo "Oracle startup: cannot start"

  exit

  fi

  case "$1" in

  'start') # Start the Oracle databases and Net8 listener

  su $ORA_OWNER -c "$ORA_HOME/bin/dbstart" &

  su $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" &

  # Next line for Oracle 8.1.7

  auto-boot 是 true,原因是我的 bootpath 总是指向第一块硬盘,改成第二块硬盘就好了。

  24)Q: 普通用户在console登录,输入口令后几秒钟又返回到登录窗口,root可以登录

  进去以后用su - 普通用户可以,并且没有输入密码的提示,有点怪!!!
 
 
 
 
原文出处:
阅读(1136) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~