vncserver修改启动端口为1521

修改端口:
[root@oracle net]# vim /usr/bin/vncserver
[root@oracle net]# 
222 #$vncPort = 5900 + $displayNumber;
223 $vncPort = 1520 + $displayNumber;


再重启vncserver:
[root@oracle net]# service vncserver restart
Shutting down VNC server: 1:root                           [  OK  ]
Starting VNC server: 1:root 
New 'pldb1:1 (root)' desktop is pldb1:1


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/pldb1:1.log


                                                           [  OK  ]

[root@oracle net]# 


查看日志,看到启用的是1521端口
[root@oracle net]# tail -fn 3000 /root/.vnc/pldb1:1.log


Xvnc TigerVNC 1.1.0 - built Oct 30 2014 12:46:27
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11500000, The X.Org Foundation


Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension VNC-EXTENSION
Initializing built-in extension GLX


Mon Feb  1 14:45:41 2016
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 1521
 vncext:      created VNC server for screen 0

你可能感兴趣的:(vncserver修改启动端口为1521)