CentOS部署XRDP与VNC实现远程访问

问题描述

在Oracle部署过程中,我们可以通过如下两种方法实现部署:

  1. 图形安装 => 通过图形界面一步一步的按照导向完成安装过程;
  2. 静默安装 => 通过预先配置好的响应文件实现静默安装过程;

前者比较大众化适合青铜、黄金、钻石玩家,后者属于王者高手的自动化部署。前者需要在服务器安装图形化相关组件才可以远程访问。方法有许多,我比较喜欢用XRDP与VNC实现远程访问。这样可以通过windows远程桌面轻松实现图形化管理与相关操作,Windows不需要额外部署xmanager等工具。

问题解决

  • CentOS YUM源更新
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all
yum makecache
  • CentOS 图形界面
yum -y groupinstall "X Window System"
yum upgrade -y
yum update grub2-common grub2-pc-modules
yum groupinstall "GNOME Desktop"
  • XRDP服务部署
yum -y install epel-release
yum -y install xrdp

# XRDP配置
vi /etc/xrdp/xrdp.ini

# XRDP启动与开机启动
systemctl start xrdp
systemctl enable xrdp
  • tigervnc-server服务部署
yum -y install tigervnc-server

# VNC配置
vi /etc/sysconfig/vncservers
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 1024x768"

# VNC密码设置
vncpasswd root

注意事项

  • fwupdate-efi部署出现如下错误:
file /boot/efi/EFI/centos from install of fwupdate-efi-12-5.el7.centos.x86_64 conflicts with file from package grub2-common-1:2.02-0.65.el7.centos.2.noarch

解决方案:

升级新版本的grub2-common
yum upgrade -y
yum update grub2-common grub2-pc-modules
卸载旧版本的grub2-common
rpm -e grub2-common-2.02-0.65.el7.centos.2.noarch grub2-pc-modules-1:2.02-0.65.el7.centos.2.noarch
最后再执行fwupdate-efi即可

猜你喜欢

转载自blog.csdn.net/weixin_38623994/article/details/106239063