Not Equal C && !=C && 不等于西
RSS icon Email icon Home icon
  • Create tablespace on NFS based LINUX + Oracle

    Posted on February 8th, 2010 Sean Add comments

         When the first time to create tablespace on SQLplus, it shows:

    “ORA-27040: file create error, unable to create file. Linux-x86_64 Error: 13: Permission denied”

    So I just change my home directory to “777”, then getting the error

    “ORA-27054: NFS file system where the file is created or resides is not mounted with correct options”

         After check the “autofs” settings, I found the content of file “auto.home” has problem which is something wrong with NFS mount options. The solutions is change the original content

    * -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp oracle.server.com:/users/&

    to

    * -rw,bg,hard,intr,rsize=32768,wsize=32768,suid,nfsver=3,tcp oracle.server.com:/users/&

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    918 views
  • SSH + X11 display after su to another user

    Posted on January 26th, 2010 Sean Add comments

         Sometimes we need to run the X11 application window via SSH. For example, I am user “A”, and SSH to host “example”. To be possible running X11 application window, we need to type the command:

    #ssh -Y A@example

         In addition to the SSH restriction, we need to run an X application as someone other than yourself. For example, the Virtualbox can be only run by user “B”. If the user “A” can sudo to become user “B” or “A” is the root, in order to allow user “B” access to user “A”’s display, B needs to import “A”’s .Xauthority cookie. We can use xauth to accomplish this and it’s a quick one-liner before sudo su - B:

         A@example:~#xauth extract – :`echo $DISPLAY |awk -F: ‘{print $2}’` | sudo su – B -c “/usr/bin/xauth merge -”
         A@example:~#sudo su – B
         B@example:~#VirtualBox &

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    441 views
  • VI中替换命令的具体用法

    Posted on January 12th, 2010 Sean Add comments

          VI中替换命令可以简单的写成以下命令:

    :[range]s /[st1]/[st2]/g

    其中:

    • [range]表示替换命令的查找范围:
      • 1. “%” 表示所有行
      • 2. “.” 表示当前行
      • 3. “$” 表示最末行
      •      例如,:%s/[st1]/[st2]   表示查找文件中所有[st1]的字符串,并替换成[st2]
                      :-5,+5s/[st1]/[st2]   表示查找目前行的前五行和后五行中[st1]的字符串,并替换成[st2]

    • “s”表示替换命令
    • [st1]表示要查找的字符串
    • [st2]表示希望把匹配的字符串变成的字符串
    • “g”表示可选项,放在命令末尾,表示对搜索字符串的每次出现进行替换;不加 g,表示只对搜索字符串的首次出现进行替换;g 放在命令开头,表示对正文中所有包含搜索字符串的行进行替换操作。
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    482 views
  • 在Ubuntu中远程访问其他Unix/Linux的X window

    Posted on June 4th, 2009 Sean Add comments

         Ubuntu自带的工具中,有一个很有用的远程控制软件,叫Terminal Server Client(TSC)。以前只介绍过怎么使用这个软件远程控制Windows系统,但最近由于经常在Ubuntu下需要一个类似Xmanager的东西访问Unix/Linux的X seesion,TSC就又变得很重要了。
         对于远程访问X window,通常情况下都使用X Display Manager Control Protocol (XDMCP)。所以,在TSC的设定中,protocol一项要选择XDMCP,而非像访问Windwos系统时所需要的RDP。不过,默认下Ubuntu的TSC是不包含XDMCP的,也就是说,protocol选项中XDMCP是不可选的,必须安装Xnest来激活:

         安装完Xnest,再打开TSC,输入服务器地址,Protocol选择XDMCP,然后连接,here you go……

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    581 views
  • 在Ubuntu中将CD或DVD制作成ISO文件的简单方法

    Posted on May 24th, 2009 Sean Add comments

         工作中,经常会发生一些情况,需要去备份一张CD或者DVD。在Windows下通常需要一些软件,将CD或者DVD压缩成ISO文件。而在Ubuntu中,可以通过打几行很简单的命令快速实现:

    1. 1. 首先确定光驱在Ubuntu下的位置:

      使用以下命令:
      df -h

      在我的Ubuntu中,显示如下

    2. 2. 通过上一步,确定光驱的位置是 /dev/sr0,就可以开始制作ISO文件:

      # cat /dev/sr0 > myISO.iso

    3. 3. 上一步中myISO.iso就是制作出的CD或者DVD的备份,可以轻松的使用任何虚拟光驱导入ISO文件
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    746 views