码迷,mamicode.com
首页 > 系统相关 > 详细

linux 操作系统安装配置vnc

时间:2014-11-03 01:33:45      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:linux vnc

                 在运维的工作过程中,有时候需要我们用VNC去连接Linux服务器,比如:财务装个金蝶的财务软件,而且还要求放在机房。这个变态的软件在启动的时候,需要我们去点击它的图形界面去启动它。这时,VNC就派上用场了。


一.配置文件

# The VNCSERVERS variable is a list of display:user pairs.

#

# Uncomment the lines below to start a VNC server on display :2

# as my ‘myusername‘ (adjust this to your own).  You will also

# need to set a VNC password; run ‘man vncpasswd‘ to see how

# to do that.  

#

# DO NOT RUN THIS SERVICE if your local area network is

# untrusted!  For a secure way of using VNC, see

# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.


# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.


# Use "-nohttpd" to prevent web-based VNC clients connecting.


# Use "-localhost" to prevent remote VNC clients connecting except when

# doing so through a secure tunnel.  See the "-via" option in the

# `man vncviewer‘ manual page.


# VNCSERVERS="2:myusername"

# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

VNCSERVERS="1:root"

VNCSERVERARGS[1]="-geometry 800x600"


二.启动

[root@demo ~]# /etc/init.d/vncserver restart 

Shutting down VNC server: 1:root                           [  OK  ]

Starting VNC server: 1:root 

New ‘demo:1 (root)‘ desktop is demo:1


Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/demo:1.log


                                                           [  OK  ]

2.查看进程:

[root@demo ~]# netstat -ntupl|grep vnc

tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      25350/Xvnc          

tcp        0      0 0.0.0.0:5802                0.0.0.0:*                   LISTEN      24658/Xvnc          

tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      25350/Xvnc          

tcp        0      0 0.0.0.0:5902                0.0.0.0:*                   LISTEN      24658/Xvnc          

tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      25350/Xvnc          

tcp        0      0 0.0.0.0:6002                0.0.0.0:*                   LISTEN      24658/Xvnc          

tcp        0      0 :::6001                     :::*                        LISTEN      25350/Xvnc          

tcp        0      0 :::6002                     :::*                        LISTEN      24658/Xvnc    


本文出自 “8055082” 博客,转载请与作者联系!

linux 操作系统安装配置vnc

标签:linux vnc

原文地址:http://8065082.blog.51cto.com/8055082/1570951

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!