本文以RealVNC为例描述如何图形化安装!

二、RealVNC 服务端(VNC-Server)

1、下载 RealVNC 服务端

下载 VNC-Server For Linux :

https://www.realvnc.com/en/connect/download/vnc/linux/

上传 VNC-Server-6.6.0-Linux-x64.rpm 至服务器 /u01 目录下:

2、命令安装 RealVNC 服务端

执行如下安装命令:

[root@oracle11g u01]# yum install -y xterm
[root@oracle11g u01]# rpm -ivh VNC-Server-6.6.0-Linux-x64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:realvnc-vnc-server-6.6.0.41938-1 ################################# [100%]
Testing if SELinux enabled... [Disabled]
Updating /etc/pam.d/vncserver

NOTICE: common configuration in /etc/pam.d contains the following modules:
   pam_faildelay.so
   pam_fprintd.so
The default vncserver PAM configuration only enables pam_unix. See
`man vncinitconfig' for details on any manual configuration required.

Looking for font path... C:\Users\ADMINI~1\AppData\Local\Temp\Mxt110/usr/share/fonts/misc/,built-ins (from xset).
Installed systemd unit for VNC Server in Service Mode daemon
Start or stop the service with:
  systemctl (start|stop) vncserver-x11-serviced.service
Mark or unmark the service to be started at boot time with:
  systemctl (enable|disable) vncserver-x11-serviced.service

Installed systemd unit for VNC Server in Virtual Mode daemon
Start or stop the service with:
  systemctl (start|stop) vncserver-virtuald.service
Mark or unmark the service to be started at boot time with:
  systemctl (enable|disable) vncserver-virtuald.service

Installed firewalld service configuration. To enable access to VNC services from the public zone, use the following commands:
For VNC Server in Service Mode:
  firewall-cmd --zone=public --permanent --add-service=vncserver-x11-serviced
For VNC Server in Virtual Mode daemon:
  firewall-cmd --zone=public --permanent --add-service=vncserver-virtuald

根据上面的提示,我们可知道 RealVNC Server 支持两种运行模式(Server 模式 和 Virtual 模式)。

  • Server 模式是指主机启动进入图形模式后,无论登录与否,多个远端都可以通过VNC访问主机当前的X11图形环境,所有远端共享当前主机上的同一个图形管理器会话,主机上的图形环境下的操作或者某个远端对主机图形环境下的远程操作,包括主机在内以及所有远端都能同时看见。

  • Virtual模式则有点类似于云桌面方式,即远端通过VNC远程连接到主机后,主机上的VNC Server开启一个幕后的图形环境会话专供这个远端远程控制使用,每个连接到主机的远端,都拥有一个各自独立的远程图形环境会话,互不干扰,主机自己的图形环境会话也是独立的,不受远端的干扰。

VNC Server 以 Server 模式运行,执行如下命令:

systemctl start vncserver-x11-serviced.service
systemctl stop vncserver-x11-serviced.service
systemctl enable vncserver-x11-serviced.service
systemctl disable vncserver-x11-serviced.service

VNC Server 以 Virtual 模式运行,执行如下命令:

systemctl start vncserver-virtuald.service
systemctl stop vncserver-virtuald.service
systemctl enable vncserver-virtuald.service
systemctl disable vncserver-virtuald.service

3、设置 RealVNC 许可证

安装成功后,可在命令行输入vnclicensewiz即可调出许可证设置界面,登录已经注册的账号密码,如果没有注册,可注册一个账号并获得30天的免费使用授权。

注册地址:https://www.realvnc.com/en/connect/trial/

$ sudo vnclicensewiz
3.1、填写账号密码

3.2、选择授权组

3.3、给主机命名,默认读取 /etc/hostname 中的内容

3.4、点击“done,完成设置

4、RealVNC 认证模式

RealVNC 的配置文件基本都位于/etc/vnc目录下。RealVNC 支持三种认证模式,分别是 VNCAuth 认证模式、Windows 系统认证模式 和 UnixAuth 认证模式。

  • VNCAuth 认证模式:

    这种认证模式是RealVNC自有的认证方式,只需要提供密码即可远程登录,不需要用户名,比较方便;

  • Windows 系统认证模式:

    针对安装在Windows上 的 VNC Server而言,可以使用Windows系统的账户认证;

  • UnixAuth 认证模式:

    针对安装在Unix/Linux上的VNC Server而言,可以使用Unix/Linux系统的账户认证。

作者:Jeebiz  创建时间:2020-06-12 10:30
 更新时间:2024-08-20 17:39