通过web方式访问linux VNC

1.首先吧项目部署在tomcat下

2.开启linux服务器的远程vnc服务

[root@xhu-master 0428]# vncserver

New 'xhu-master:1 (root)' desktop is xhu-master:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xhu-master:1.log

3.修改vnc登陆密码

[root@xhu-master 0428]# vncpasswd
Password:
Verify:

扫描二维码关注公众号,回复: 1365126 查看本文章

4. 查找vnc启动的端口号

[root@xhu-master 0428]# ps -ef |grep vnc
root       968     1  0 04:23 pts/1    00:00:00 Xvnc :1 -desktop xhu-master:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root      3850 22188  0 04:25 pts/1    00:00:00 grep vnc

5901 则是我们需要的端口号,默认的是5900,我的机器上启动了2次

5.修改 index.jsp 主要是改ip和vnc端口

6. tomcat vpn 技术(也许你的tomcat本身不需要配置,在open ssl-vpn 已经配置过了,需要调查一下)

http://www.chinabaike.com/2011/0116/166520.html

猜你喜欢

转载自8366.iteye.com/blog/1044524
VNC