在使用ssh连接的远程服务器(Ubuntu)上安装Oracle 11g

当我尝试使用oracle用户远程连接(使用ssh)后运行oracle的安装程序,我得到这个错误。

[oracle@htrtret database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 1195 MB Passed Checking swap space: must be greater than 150 MB. Actual 4094 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation,at which time they will be rechecked. Continue? (y/n) [n] y Rechecking installer requirements.... Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-10-26_07-29-52AM. Please wait ...Error in CreateOUIProcess(): 13 : Permission denied 

你可以用X转发来完成它:

 ssh -X <hostname> 

您需要在要连接的计算机上运行X服务器,并确保在服务器的sshd_config中设置了“X11Forwarding yes”。

只需安装二进制文件,对吧? 如果你有一个现有的安装

  1. tar和gzip ORACLE_HOME并将其扫描
  2. 将它解包到你想要新的ORACLE_HOME的位置
  3. cd $ORACLE_HOME/clone/bin
  4. perl clone.pl ORACLE_HOME=/my/oracle/home ORACLE_BASE=/my/oracle/base ORACLE_HOME_NAME=MyOraHome

这是大规模部署的无头技术。

确保你有所有的先决条件。 要做到这一点的基本方法是添加Oracle Yum服务器和yum install oracle-validated

问题是从一个不可写目录(默认的tmp)写入一些数据从oracle的。所以改变它使用出口TMP = $ HOME / tmp。

我试图启用X11转发运行oracle安装程序。现在我得到这个错误:

Xlib:连接到服务器拒绝的“localhost:10.0”Xlib:PuTTY X11代理:错误的身份validation协议尝试在线程“main”中的exceptionjava.lang.InternalError:无法使用'localhost:10.0'连接到X11窗口服务器DISPLAYvariables的值。 sun.awt.X11GraphicsEnvironment.access上的sun.awt.X11GraphicsEnvironment.initDisplay(本机方法)在sun.awt.X11GraphicsEnvironment上的$ 000(X11GraphicsEnvironment.java:53)$ 1.run(X11GraphicsEnvironment.java:142)at java.security.AccessController在java.lang.Class.forName0(Native Method)上的java.lang.Class.forName(Class.java:164)处的.doPrivileged(Native方法)在sun.awt.X11GraphicsEnvironment(X11GraphicsEnvironment.java:1 31) .awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:68)at java.awt.Window.init(Window.java:270)at java.awt.Window。(Window.java:318)at java.awt.Frame。 (Frame.java:419)at oracle.ewt.popup.PopupFrame。(Unknown Source)at oracle.ewt.lwAWT.BufferedFrame。(Unknown Source)at oracle.sysman.oio.oioc.OiocOneClickInstaller。(OiocOneClickInsta ller.java: 328)at oracle.sysman.oio.oioc.OiocOneClickInstaller。(OiocOneClickIns taller.java:168)

要使用graphics安装程序进行安装,需要以下内容:

  • 安装在您的工作站上的X11服务器。 对于Windows,您可以使用: Xming
  • 在远程服务器上启用ssh X11转发。 检查/etc/ssh/sshd_config是否具有以下选项X11Forwarding yes
  • 为oracle用户configuration的xauth,或者以oracle用户身份直接连接
  • 在PuTTY中启用X11转发。

如果您使用sudo连接到oracle用户,则使用以下内容创build/etc/profile.d/sudo-oracle.sh文件:

 function sudo { local u=oracle local SUDO_BIN=/usr/bin/sudo if [[ "x$1" == "xsu" && ( "x$2" == "x$u" || "x$3" == "x$u" ) ]] then echo X11 authentication from user $USER to user $u $SUDO_BIN -H -u $u xauth add $(xauth list|grep :$(echo ${DISPLAY: -4:2})) fi $SUDO_BIN $@ } 

然后使用以下命令login到oracle帐户

 sudo su - oracle