zoukankan      html  css  js  c++  java
  • rhel7配置tiger vnc详解 centos6配置安装vncserver 风行天下

    参考网站:http://blog.51cto.com/xjsunjie/1963463     结合  https://blog.csdn.net/wamath/article/details/76003128

    centos7安装

    https://www.cnblogs.com/aphelion/p/5212550.html

     重置vnc密码:

    直接输入vncpasswd进行重置密码。

    下载viewer

    http://download.canadiancontent.net/VNC_Viewer.html

    centos6安装配置vnc-server

    https://www.cnblogs.com/wangmo/p/7866719.html

    VNC( Virtual Network Computing)允许Linux系统,实现可以像Windows中的远程桌面访问那样访问Linux桌面。本文配置是在rhel7.3服务器环境下运行。

    个人综合编辑

     首先查看服务器是否安装了VNC

    [root@test ~]# rpm -qa tigervnc tigervnc-server

     没安装的话会直接出现

    package tigervnc is not installed

    package tigervnc-server is not installed

     如果没有安装X-Windows 桌面的话要先安装Xwindows,VNC需要服务器运行在图形界面。

    [root@test ~]# yum check-update

    [root@test ~]# yum groupinstall "X Window System"

    [root@test ~]# yum install gnome-classic-session gnome-terminal nautilus-open-terminal 

    control-center liberation-mono-fonts

    [root@test ~]# unlink /etc/systemd/system/default.target

    [root@test ~]# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

    [root@test ~]# reboot

     1、安装VNC packages:

    [root@test ~]# yum install -y tigervnc-server 

     2、修改配置信息

    把example config 文件从/lib/systemd/system/vncserver@.service复制过来

    复制 cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

     修改vim /etc/systemd/system/vncserver@:1.service  

    ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i -geometry 1280x720"
    PIDFile=/root/.vnc/%H%i.pid

    如果是其他用户的话,将USER替换即可

    ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"

    PIDFile=/home/<USER>/.vnc/%H%i.pid

    3、重加载 systemd

    [root@test ~]# systemctl daemon-reload

    4、为VNC设置密码

    [root@test ~]# vncpasswd

    如果有iptable防火墙的话,可以放行VNC的端口

    如果是用rhel 7.3 默认防火墙,则需要

    [root@test~]# firewall-cmd --permanent --add-service vnc-server

    或者通过放行端口:

    sudo firewall-cmd --permanent --zone=public --add-port=5901-5905/tcp

    [root@test~]# systemctl restart firewalld.service

    5、设置默认启动并开启VNC

    [root@test ~]# systemctl enable vncserver@:1.service

    [root@test ~]# systemctl start vncserver@:1.service

     这样就配置好了,然后在Windows 客户端下载一个VNC Viewer 的软件,就可以VNC图形远程连接了。

    6、使用下面命令查看该服务是否正确运行

    sudo systemctl status vncserver@:1.service -l

  • 相关阅读:
    docker容器的应用
    KVM虚拟机迁移
    centos6.5虚拟机快照技术
    centos6.5网络虚拟化技术
    centos6.5制作OpenStack云平台Windows7镜像
    centos6.5远程桌面连接(VNCSPice)
    centos6.5kvm虚拟化技术
    centos7安装Jenkins及其卸载(yum和rpm安装)
    CentOS 7安装JDK
    [leetcode]Reverse Nodes in k-Group
  • 原文地址:https://www.cnblogs.com/yaok430/p/9054618.html
Copyright © 2011-2022 走看看