如何通過vnc 安裝遠端linux下的oracle

paulyibinyi發表於2008-06-19

linux 版本:redhat 企業版 4

在安裝包有vnc-server-4.0-8.1.i386.rpm
在作業系統安裝完成後一般會自動安裝的所以不需要再次安裝

1.把vncserver 裝在oracle使用者下

[root@rac1 user01]# su - oracle
[oracle@rac1 ~]$ pwd
/home/oracle
[oracle@rac1 ~]$ vncserver

You will require a password to access your desktops.

Password:                        --這裡輸入密碼oracle
Verify:                                 --驗證密碼oracle
xauth:  creating new authority file /home/oracle/.Xauthority

New 'rac1.cn:2 (oracle)' desktop is rac1.cn:2                        紅色2代表埠號 vnc客戶端登入時需要用到

Creating default startup script. /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/rac1.cn:2.log

2.開啟防火牆 用root使用者登入

vi /etc/sysconfig/iptables
找到下面語句

A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

修改為

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT

表示埠為5900到5903可以訪問

用root身份重新啟動防火牆

[root@rac2 ~]# /sbin/service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules:                          [  OK  ]

預設登入的是twm視窗不好看 需要設定成gnome模式

vi /home/oracle/.vnc/xstartup  如下所示:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

startkde &
wq 儲存退出

unset 和exec前面的#要去掉

最後一行換成startkde

重新啟動VNC server
[oracle@rac1 ~]$ /sbin/service vncserver restart
Shutting down VNC server:                                  [  OK  ]
rm: cannot remove `/var/lock/subsys/vncserver': Permission denied
Starting VNC server:                                       [  OK  ]
touch: cannot touch `/var/lock/subsys/vncserver': Permission denied

重新啟動linux 伺服器後

在windows xp 安裝vnc for windows 客戶端

裝完後選擇 run vnc viewser

server  欄輸入 192.168.1.242:2  就是vncserver 生成的埠號

就ok了 就可以實現遠端安裝了

 


 

 

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-351881/,如需轉載,請註明出處,否則將追究法律責任。

相關文章