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系统
    

  • 相关阅读:
    需要返回对象时候,不要以引用形式返回
    成对使用new和delete,传值传引用
    赋值重载的约定(1)
    oracle操作字符串:拼接、替换、截取、查找
    Oracle CASE WHEN 用法介绍
    oracle中如何对字符串进行去除空格的方法
    日期显示
    Oracle Cursor用法总结
    每天一个linux命令(26):用SecureCRT来上传和下载文件
    每天一个linux命令(25):linux文件属性详解
  • 原文地址:https://www.cnblogs.com/zhouwanchun/p/10682542.html
Copyright © 2011-2022 走看看