centos6.x 配置 vnc server

环境:  centos6.x 桌面环境 用户rootshell

安装vnc服务端软件

yum install -y tigervnc-server

配置vnc

vncserver :1

设置密码后会自动生成相关配置文件vim

以下后端

root@localhost ~]# vncserver :1
You will require a password to access your desktops.
Password:
Verify:
xauth: (stdin):1:  bad display name "localhost:1" in "add" command
New 'localhost:1 (root)' desktop is localhost:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log

配置防火墙

vnc服务默认使用5900之后端口centos

:1使用5901
:2使用5902  ##以此类推

查看使用哪一个端口app

netstat -tupln|grep vnc
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      5969/Xvnc


开启5901端口 tcp

lokkit -p 5901:tcp


配置开机启动启动vnc服务

 vim /etc/sysconfig/vncservers

添加 工具

VNCSERVERS="1:root"

配置开机自动启动ui

chkconfig vncserver on


vnc工具链接

如今就能够经过vnc工具链接了spa

地址格式 IP:1code


其余经常使用命令

vncserver -list   #查看vnc进程列表
vncserver -kill :1  关闭进程:1


附:realvnc下载地址 http://www.realvnc.com/download/viewer/

相关文章
相关标签/搜索