zoukankan      html  css  js  c++  java
  • VNC配置

    简介

      VNC (Virtual Network Console)是虚拟网络控制台的缩写。它 是一款优秀的远程控制工具软件,由著名的 AT&T 的欧洲研究实验室开发的。VNC 是在基于 UNIXLinux 操作系统的免费的开源软件,远程控制能力强大,高效实用,其性能可以和 WindowsMAC 中的任何远程控制软件媲美。 在 Linux 中,VNC 包括以下四个命令:vncserver,vncviewer,vncpasswd,和 vncconnect。大多数情况下用户只需要其中的两个命令:vncserver 和 vncviewer。

    系统环境
    [root@controller ~]# cat /etc/redhat-release 
    CentOS Linux release 7.4.1708 (Core) 
    #安装
    [root@controller ~]# yum install tigervnc-server tigervnc-server-module -y
    #查看说明
    [root@controller ~]# cat /etc/sysconfig/vncservers 
    # THIS FILE HAS BEEN REPLACED BY /lib/systemd/system/vncserver@.service
    [root@controller ~]# cat /lib/systemd/system/vncserver@.service 
    [root@controller ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
    [root@controller system]# grep -vE '^#|^$' vncserver@:1.service 
    [Unit]
    Description=Remote desktop service (VNC)
    After=syslog.target network.target
    [Service]
    Type=forking
    User=root
    ExecStartPre=-/usr/bin/vncserver -kill %i
    ExecStart=/usr/bin/vncserver %i
    PIDFile=/root/.vnc/%H%i.pid
    ExecStop=-/usr/bin/vncserver -kill %i
    [Install]
    WantedBy=multi-user.target
    
    #注:用 root 的话用把/home/root/.vnc/%H%i.pid 改为/root/.vnc/%H%i.pid
    #设置密码
    [root@controller system]# vncpasswd 
    Password:
    
    [root@controller system]#  systemctl daemon-reload 
    [root@controller system]#  systemctl start vncserver@:1.service
    [root@controller system]#  systemctl enable vncserver@:1.service
    #查看端口
    [root@controller system]# ss -lnt|grep 590
    LISTEN     0      5            *:5901                     *:*                  
    LISTEN     0      5           :::5901                    :::*
      
    

     测试:win安装vnc客户端

    下载地址:https://www.realvnc.com/en/
    

    输入密码

    进入主机界面

  • 相关阅读:
    动态调整iframe的高度
    Binary Tree Zigzag Level Order Traversal
    Leetcode Anagrams
    二叉树层次遍历串成单链表
    leetcode 4sum
    leetcode 二叉树系列
    编程之美2.3
    Decode Ways
    leetcode graycode
    leetcode editdistance
  • 原文地址:https://www.cnblogs.com/Dev0ps/p/7921056.html
Copyright © 2011-2022 走看看