Quick How-To on vncserver for Oracle DBA

I don’t normally use vncserver, I prefer SSH X11 tunneling/forwarding due to it’s inherited security, but sometimes there have been issues with X11/SSH and it’s nice to know an alternative. This quick how-to is meant for an Oracle DBA looking for a quick way to run GUI tools from the Oracle stack, such as runInstaller, dbca, dbua, etc.. It is not meant to serve as a step by step guide to setup a secure, reusable vncserver setup in your environment, I do however provide some additional references where you can find additional information (see the end of this post).

Lets get to it then — the good news is that vncserver should already be installed on your RHEL / OEL. All you have to do is start it up and tell it the display number like so:

[root@rac1 ~]# su - oracle
rac1.XRACP1-> vncserver :12

You will require a password to access your desktops.

Password:
Verify:

New 'rac1.mydomain.com:12 (oracle)' desktop is rac1.mydomain.com:12

Creating default startup script /u01/app/oracle/.vnc/xstartup
Starting applications specified in /u01/app/oracle/.vnc/xstartup
Log file is/u01/app/oracle/.vnc/rac1.mydomain.com:12.log

rac1.XRACP1-> ps -ef | grep vnc
oracle   31123     1  0 13:04 pts/1    00:00:00 Xvnc :12 -desktop rac1.mydomain.com:12 (oracle) -httpd /usr/share/vnc/classes -auth /u01/app/oracle/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /u01/app/oracle/.vnc/passwd -rfbport 5912 -pn
oracle   31158     1  0 13:04 pts/1    00:00:00 vncconfig -iconic
oracle   32309 31078  0 13:05 pts/1    00:00:00 grep vnc
rac1.XRACP1->

If you want to kill vncserver use “vncserver -kill :12” command where :12 is the display number you specified when starting it:

vncserver -kill :12

rac1.XRACP1-> ps -ef | grep vnc
oracle    9597     1  1 17:50 pts/3    00:00:00 Xvnc :12 -desktop rac1.mydomain.com:12 (oracle) -httpd /usr/share/vnc/classes -auth /u01/app/oracle/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /u01/app/oracle/.vnc/passwd -rfbport 5912 -pn
oracle   10065     1  0 17:50 pts/3    00:00:00 vncconfig -iconic
oracle   10303  9514  0 17:50 pts/3    00:00:00 grep vnc

rac1.XRACP1-> vncserver -kill :12
Killing Xvnc process ID 9597

rac1.XRACP1-> ps -ef | grep vnc
oracle   14396  9514  0 17:52 pts/3    00:00:00 grep vnc
rac1.XRACP1->

That’s all to it, next you can access the display via http://host:58XX where XX is the screen number you specified when starting the vncserver:

http://rac1.mydomain.com:5812

REFERENCE:
Note: 551711.1 Linux OS Service ‘vncserver’
Note: 735767.1 How to Setup VNC Server with Clipboard Support on RHEL/OEL
APRESS Book: Linux Recipes for Oracle DBAs

September 16, 2009

Posted In: Linux, Operations

Tags: