zoukankan      html  css  js  c++  java
  • RHEL7安装配置VNC

    RHEL7安装配置VNC

    作者:Eric
    微信:loveoracle11g
    
    
    安装配置VNC服务程序
    [root@zhouwanchun yum.repos.d]# cd ~
    [root@zhouwanchun ~]# yum -y install tigervnc*
    [root@zhouwanchun ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service
    
    
    编辑vnc服务的配置文件,将所有的修改为root用户
    [root@zhouwanchun ~]# vim /etc/systemd/system/vncserver@:3.service
    32 [Unit]
     33 Description=Remote desktop service (VNC)
     34 After=syslog.target network.target
     35 
     36 [Service]
     37 Type=forking
     38 # Clean any existing files in /tmp/.X11-unix environment
     39 ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
     40 ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
     41 PIDFile=/root/.vnc/%H%i.pid
     42 ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
     43 
     44 [Install]
     45 WantedBy=multi-user.target
    
    
    [root@zhouwanchun ~]# firewall-cmd --permanent --zone=public --add-port=5903/tcp
    success
    [root@zhouwanchun ~]# firewall-cmd --reload
    success
    
    
    [root@zhouwanchun ~]# vim /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.10.70   zhouwanchun.example.com
    
    
    [root@zhouwanchun ~]# vncserver
    
    You will require a password to access your desktops.
    
    Password:
    Verify:
    
    New 'zhouwanchun.example.com:1 (root)' desktop is zhouwanchun.example.com:1
    
    Creating default startup script /root/.vnc/xstartup
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/zhouwanchun.example.com:1.log
    
    
    [root@zhouwanchun ~]# systemctl status vncserver@:3.service
    vncserver@:3.service - Remote desktop service (VNC)
       Loaded: loaded (/etc/systemd/system/vncserver@:3.service; disabled)
       Active: inactive (dead)
    
    
    [root@zhouwanchun ~]# systemctl start vncserver@:3.service
    [root@zhouwanchun ~]# systemctl enable vncserver@:3.service
    ln -s '/etc/systemd/system/vncserver@:3.service' '/etc/systemd/system/multi-user.target.wants/vncserver@:3.service'
    
    
    [root@zhouwanchun ~]# systemctl status vncserver@:3.service
    vncserver@:3.service - Remote desktop service (VNC)
       Loaded: loaded (/etc/systemd/system/vncserver@:3.service; enabled)
       Active: active (running) since Thu 2017-12-07 23:25:07 CST; 10s ago
     Main PID: 5008 (Xvnc)
       CGroup: /system.slice/system-vncserver.slice/vncserver@:3.service
               ‣ 5008 /usr/bin/Xvnc :3 -desktop zhouwanchun.example.com:3 (root) -auth /root/.Xauthority -geometry 1024x768 -rfbwait 30...
    
    Dec 07 23:25:04 zhouwanchun.example.com systemd[1]: Starting Remote desktop service (VNC)...
    Dec 07 23:25:07 zhouwanchun.example.com systemd[1]: Started Remote desktop service (VNC).
    
    
    使用VNC远程连接RHEL7.0系统
    

  • 相关阅读:
    用python写一个北京市的个税计算器
    排序算法(冒泡、选择)-python代码展示
    封装系统内置功能的函数(字符串)
    福彩习题
    打印等腰三角形
    1.冒泡排序法
    腾讯云:搭建 Node.js 环境
    python开发环境搭建
    基于 Ubuntu 搭建 FTP 文件服务
    TensorFlow — 相关 API
  • 原文地址:https://www.cnblogs.com/zhouwanchun/p/10682542.html
Copyright © 2011-2022 走看看