天天看点

Linux下开启VNCserver服务(远程连接)

实验环境:centos6.8

可支持 linux连linux linux连Windows

1、检查系统是否安装了vnc 和 vncserver, rpm -qa | grep vnc如果没有安装那就行自行下载安装(我这里用yum安装了,vncserver安装需要安装依赖包xorg-x11-fonts-misc)

(1)安装vnc yum -y install vnc

(2)安装vncserver依赖包 yum -y install xorg-x11-fonts-misc

(3)安装vncserver yum -y install tigervnc-server

2、配置vncservers文件

[root@oracle ~]# vim /etc/sysconfig/vncservers

VNCSERVERS="1:root" (本行注释去掉并改为当前格式)

VNCSERVERARGS[1]="-geometry 1024x768"(本行雷同上一个括号)

3、配置xstartup文件

编辑配置之前,需要使用vncserver命令创建默认配置文件

[root@oracle ~]# vncserver

输入口令:123456 (密码要求最少六位)

确认口令:123456

Linux下开启VNCserver服务(远程连接)

[root@oracle ~]# vim /root/.vnc/xstartup

gnome-session & set starting GNOME desktop (在最后增加这一行,表使用gnome界面,否则是xfce界面)

然后保存退出:x

Linux下开启VNCserver服务(远程连接)

4、设置远程登录口令

[root@oracle ~]# vncpasswd

Password: 123456

Verifu: 123456

Linux下开启VNCserver服务(远程连接)

5、启动vncserver服务

(1)主服务器启动 service vncserver start

Linux下开启VNCserver服务(远程连接)

继续阅读