当前位置 博文首页 > 小龙狗的博客:CentOS使用配置VNC远程连接

    小龙狗的博客:CentOS使用配置VNC远程连接

    作者:[db:作者] 时间:2021-07-09 22:02

    1. 安装图形界面

    执行命令

    [root@VM-0-9-centos home]# yum groupinstall "X Window System"
    [root@VM-0-9-centos home]#  yum groupinstall -y "GNOME Desktop"
    

    如果遇到问题如下

    Transaction check error:
      file /boot/efi/EFI/centos from install of fwupdate-efi-12-6.el7.centos.x86_64 conflicts with file from package grub2-common-1:2.02-0.65.el7.centos.2.noarch
    Error Summary
    -------------
    

    升级所有包后再进行安装即可

    [root@VM-0-9-centos home]# yum upgrade -y
    

    执行命令切换至图形化界面

    [root@VM-0-9-centos home]# init 5
    

    2. 安装VNC

    使用的VNC工具为开源软件 tigervnc

    2.1 VNC-Server

    [root@VM-0-9-centos home]# yum install tigervnc
    [root@VM-0-9-centos home]# yum install tigervnc-server
    

    启动服务

    vncserver :n
    

    这里的n是sessionnumber,不指定默认为1,也可以是2、3等等。第一次会提示输入密码,以后可以使用vncpasswd命令修改密码。

    2.2 VNC-Viewer

    VNC的默认端口是5900,而远程桌面连接端口则是5900+n(n是vncserver命令指定的)。如果使用“vncserver :1”命令启动VNC Server,那么下面的端口应该是5901。

    3. 参考

    [1] https://blog.csdn.net/baidu_37503452/article/details/84893520

    .
    .
    .
    .
    .
    .


    桃花仙人种桃树,又摘桃花换酒钱_

    cs
    下一篇:没有了