AIX上启动xmanager界面

在aix上安装oracle,用图形界面进行安装,首先的一点是要让oracle用户能启动xwindow。由于之前一直在HP平台下,对AIX还不是很熟悉,此文章是以为记。

我们假定root可以启动xclock:
我们用xstart通过root登录之后,我们查看通道:

此时,运行xclock可以启动:

然后我们su到oracle用户:

进行环境变量设置:

此时,在oracle用户下运行xclock就能运行。如果此时还报错:

这一般是.Xauthority这个文件的权限问题了。我们回到root用户,将这个文件设置成755的权限,让oracle能访问就可以了。

更进一步的研究发现,.Xauthority这个文件其实是在用户用xstart登录的时候自动创建的。如果我们直接是oracle用户开启xstart登录,在xstart登录的时候,我们在xstart的log中可以看到(见下粗体部分):
[01:28:44] Stop timer (TIMER_SHUTDOWN).
[01:28:44] Connection closed.
[01:26:37] Connecting to '192.168.1.64'...
[01:26:37] Connected.
[01:26:37] Version exchange initiated...
[01:26:37] server: SSH-2.0-OpenSSH_5.2
[01:26:37] client: SSH-2.0-nsssh2_3.0.0010 NetSarang Computer, Inc.
[01:26:37] SSH2 is selected.
[01:26:37] Algorithm negotiation initiated...
[01:26:37] key exchange: diffie-hellman-group14-sha1
[01:26:37] host key: ssh-dss
[01:26:37] outgoing encryption: aes128-cbc
[01:26:37] incoming encryption: aes128-cbc
[01:26:37] outgoing mac: hmac-sha1
[01:26:37] incoming mac: hmac-sha1
[01:26:37] outgoing compression: none
[01:26:37] incoming compression: none
[01:26:37] Host authentication initiated...
[01:26:37] Hostkey fingerprint:
[01:26:37] ssh-dsa 1024 cd:38:5b:87:87:76:d2:5a:51:f7:18:b4:d0:02:47:dc
[01:26:37] Accepted. Verifying host key...
[01:26:38] Verified.
[01:26:38] User authentication initiated...
[01:26:38] Sent user name 'oracle'.
[01:26:38] Sent password.
[01:26:38] Access granted.
[01:26:38] Sent X11 forwarding request...
[01:26:38] Succeeded.
[01:26:38] Sent the command line.
[01:26:38] /usr/bin/X11/xterm -ls -display $DISPLAY
[01:26:38] Start timer (TIMER_SHUTDOWN, 180).
1356-364 /usr/bin/X11/xauth: creating new authority file /home/oracle/.Xauthority
[01:26:38] An X11 channel (id=1) has opened.
[01:26:38] Stop timer (TIMER_SHUTDOWN).
input method doesn't support my preedit type
[01:27:26] An X11 channel (id=2) has opened.
[01:27:32] An X11 channel (id=2) has closed.
[01:27:44] An X11 channel (id=1) has closed.
[01:27:44] All X11 channels are closed.
[01:27:44] Start timer (TIMER_SHUTDOWN, 60).

也就是说,在/home/oracle下创建了这个文件,而这个文件的宿主是oracle的,我们不需要去export root的这个文件,也不需要改root的这个文件的权限让oracle用户去读。

而且,让人生气的是,当我们用root用户再次登录的时候,.Xauthority这个文件的之前我们给了755的权限,再次登录的时候,再次变成了600的权限:

这个文件应该是每次某个用户登录的时候,如果没有,则创建之,如果有,则重写之,权限为600。

所以,最简单的方式还是直接用oracle用户启动xstart(而不是通过root启动xstart在su到oracle),自动在oracle用户的主目录下生成.Xauthority文件,然后export一下DISPLAY之后,就能直接用了。

相关文章

6条评论

  1. 在aix下面,觉得还是用vncviewer安装oracle比较方便一点

  2. Xmanger was blcok by firewall…… crying. I am now in HK. I need to go in the data center to install it. Any other way to install oracle without xmanager or VNC

回复 成都SEO 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据