环境: centos6.x 桌面环境 用户rootshell
yum install -y tigervnc-server
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
vim /etc/sysconfig/vncservers
添加 工具
VNCSERVERS="1:root"
配置开机自动启动ui
chkconfig vncserver on
如今就能够经过vnc工具链接了spa
地址格式 IP:1code
vncserver -list #查看vnc进程列表 vncserver -kill :1 关闭进程:1
附:realvnc下载地址 http://www.realvnc.com/download/viewer/