300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > centos安装并配置VNC Server图形化程序

centos安装并配置VNC Server图形化程序

时间:2020-01-09 09:15:59

相关推荐

centos安装并配置VNC Server图形化程序

本文详解在CentOS下安装并配置VNC Server图形化程序

文章目录

一、VNC Server下载二、VNC Server安装三、VNC Server配置四、关闭防火墙和开机自启五、注意事项

一、VNC Server下载

VNC Server图形化程序下载可在VNC进行下载。

官网下载地址为: /en/connect/download/vnc/linux/

选择“Linux”->“RPM X64”进行下载。

二、VNC Server安装

1、用管理员身份运行以下命令:

[root@localhost user]# yum install xterm

输出:

已加载插件:fastestmirror, langpacks00000000000000000000000000000Loading mirror speeds from cached hostfile* base: mirrors.* extras: mirrors.* updates: mirrors.base | 3.6 kB00:00extras | 2.9 kB00:00updates| 2.9 kB00:00(1/4): base/7/x86_64/group_gz| 153 kB 00:00(2/4): extras/7/x86_64/primary_db| 247 kB 00:00(3/4): updates/7/x86_64/primary_db| 16 MB 00:00(4/4): base/7/x86_64/primary_db | 6.1 MB 00:00正在解决依赖关系--> 正在检查事务---> 软件包 xterm.x86_64.0.295-3.el7_9.1 将被 安装--> 正在处理依赖关系 libXaw.so.7()(64bit),它被软件包 xterm-295-3.el7_9.1.x86_64 需要--> 正在检查事务---> 软件包 libXaw.x86_64.0.1.0.13-4.el7 将被 安装--> 解决依赖关系完成依赖关系解决================================================================================Package 架构 版本源大小================================================================================正在安装:xterm x86_64295-3.el7_9.1 updates456 k为依赖而安装:libXawx86_641.0.13-4.el7 base 192 k事务概要================================================================================安装 1 软件包 (+1 依赖软件包)总下载量:647 k安装大小:1.7 MIs this ok [y/d/N]: yDownloading packages:警告:/var/cache/yum/x86_64/7/base/packages/libXaw-1.0.13-4.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEYlibXaw-1.0.13-4.el7.x86_64.rpm 的公钥尚未安装(1/2): libXaw-1.0.13-4.el7.x86_64.rpm | 192 kB 00:00xterm-295-3.el7_9.1.x86_64.rpm 的公钥尚未安装(2/2): xterm-295-3.el7_9.1.x86_64.rpm | 456 kB 00:00--------------------------------------------------------------------------------总计 3.9 MB/s | 647 kB 00:00从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥导入 GPG key 0xF4A80EB5:用户ID: "CentOS-7 Key (CentOS 7 Official Signing Key) <security@>"指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5软件包: centos-release-7-9..0.el7.centos.x86_64 (@anaconda)来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7是否继续?[y/N]:yRunning transaction checkRunning transaction testTransaction test succeededRunning transaction正在安装 : libXaw-1.0.13-4.el7.x86_64 1/2 正在安装 : xterm-295-3.el7_9.1.x86_64 2/2 验证中: libXaw-1.0.13-4.el7.x86_64 1/2 验证中: xterm-295-3.el7_9.1.x86_64 2/2 已安装:xterm.x86_64 0:295-3.el7_9.1作为依赖被安装:libXaw.x86_64 0:1.0.13-4.el7完毕!

切换到.rpm文件所在的文件夹,执行命令:

[root@localhost 下载]# rpm -i VNC-Server-6.9.1-Linux-x64.rpm

输出:

** Moving /usr/bin/Xvnc to /usr/bin/Xvnc.conflict** Moving /usr/share/man/man1/Xvnc.1.gz to /usr/share/man/man1/Xvnc.1.gz.conflict** Moving /usr/bin/vncpasswd to /usr/bin/vncpasswd.conflict** Moving /usr/share/man/man1/vncpasswd.1.gz to /usr/share/man/man1/vncpasswd.1.gz.conflictTesting if SELinux enabled... [Enabled]Installing SELinux policy module realvnc-server for SELinux version 17 - this may take a while... [OK]Installing SELinux policy module realvnc-server-cups for SELinux version 17 - this may take a while... [OK]Updating /etc/pam.d/vncserverNOTICE: common configuration in /etc/pam.d contains the following modules:pam_faildelay.sopam_fprintd.soThe default vncserver PAM configuration only enables pam_unix. See `man vncinitconfig' for details on any manual configuration required.Looking for font path... catalogue:/etc/X11/fontpath.d,built-ins (from xset).Generating private key... doneInstalled systemd unit for VNC Server in Service Mode daemonStart or stop the service with:systemctl (start|stop) vncserver-x11-serviced.serviceMark or unmark the service to be started at boot time with:systemctl (enable|disable) vncserver-x11-serviced.serviceInstalled systemd unit for VNC Server in Virtual Mode daemonStart or stop the service with:systemctl (start|stop) vncserver-virtuald.serviceMark or unmark the service to be started at boot time with:systemctl (enable|disable) vncserver-virtuald.serviceInstalled 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-servicedFor VNC Server in Virtual Mode daemon:firewall-cmd --zone=public --permanent --add-service=vncserver-virtuald

三、VNC Server配置

1、 打开安装好的软件,可以按照下图进行操作。

2、登陆账户,或者输入激活码,激活软件。

3、配置密码和加密方式。

4、设置可远程控制的Linux用户。

5、查看配置并确认配置,其中“Conputer IP address”为远程连接时的IP。

6、再次确认之后就完成了,打开角的VNC Server软件,可以看到如下界面,表示配置成功,其中红色方框内的IP地址就是远程连接时需要输入的IP。

四、关闭防火墙和开机自启

VNC图形化程序默认开机自启,我们只需要关闭防火墙即可。

1、打开“防火墙”,可以按照下图进行操作。

2、在“配置”处选择“永久”。

3勾选"vnc-server",重启系统。

全部配置步骤已经完成,可以用VNC客户端进行连接了。

五、注意事项

1、主机IP地址可能变化,IP改变后需用新的IP地址进行连接,建议将主机IP设为固定值,方便连接;

2、将网络设置为“自动连接”,主机重启之后也可以直接进行连接;

3、局域网内进行连接时,需将主机端和客户端的IP地址设置到同一网段下,否则会连接失败;

4、若仍连接失败,可以关闭防火墙,然后进行连接,关闭防火墙可参考下面这篇文章:

CentOS 7开启、查看和关闭防火墙: /weixin_44934909/article/details/125055529

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。