当前位置:   article > 正文

三步教你完成VNC远程连接

vnc怎么连接

VNC是一种简单方便的远程连接方式,在日常工作中,可以大大提高工作效率,能够减轻普通X-Windows配置的麻烦,按照本文三步,即可完成整个服务创建和连接的过程:

1.在服务器端安装vnc server:

  1. ######查看是否已经安装了vnc server######
  2. rpm -q vnc / vnc-server
  3. ######如果没有安装,执行下面命令安装######
  4. yum install vnc / vnc-server
  5. ######安装过程部分内容如下######
  6. Downloading packages:
  7. tigervnc-server-1.8.0-1.el7.x86_64.rpm | 213 kB 00:00:00
  8. Running transaction check
  9. Running transaction test
  10. Transaction test succeeded
  11. Running transaction
  12. 正在安装 : tigervnc-server-1.8.0-1.el7.x86_64 1/1
  13. 验证中 : tigervnc-server-1.8.0-1.el7.x86_64 1/1
  14. 已安装:
  15. tigervnc-server.x86_64 0:1.8.0-1.el7
  16. 完毕!

2.启动vnc server:

  1. ######安装完成后,启动vnc server,注意这里需要输入远程访问的密码######
  2. [root@mdw ~]# vncserver
  3. You will require a password to access your desktops.
  4. Password:
  5. Password must be at least 6 characters - try again
  6. Password:
  7. Verify:
  8. xauth: file /root/.Xauthority does not exist
  9. New 'mdw:1 (root)' desktop is mdw:1
  10. Creating default startup script /root/.vnc/xstartup
  11. Creating default config /root/.vnc/config
  12. Starting applications specified in /root/.vnc/xstartup
  13. Log file is /root/.vnc/mdw:1.log
  14. ######关闭防火墙######
  15. [root@mdw ~]# service firewalld stop
  16. Redirecting to /bin/systemctl stop firewalld.service

3.远程连接

  1. ######首先查看一下vnc server的端口号是多少,我这里是port 5901######
  2. [root@mdw .vnc]# ls
  3. config mdw:1.log mdw:1.pid nohup.out passwd xstartup
  4. [root@mdw .vnc]# cat mdw\:1.log
  5. Xvnc TigerVNC 1.3.1 - built Nov 16 2016 13:38:44
  6. Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
  7. See http://www.tigervnc.org for information on TigerVNC.
  8. Underlying X server release 11702000, The X.Org Foundation
  9. Thu Sep 28 14:00:32 2017
  10. vncext: VNC extension running!
  11. vncext: Listening for VNC connections on all interface(s), port 5901
  12. vncext: created VNC server for screen 0
  13. touch: 无法创建"/root/.cache/imsettings/log": 没有那个文件或目录
  14. gnome-session-is-accelerated: llvmpipe detected.
  15. ######打开vnc viewer远程连接,输入ip和对应端口号、密码即可######

打开vnc viewer远程连接,输入ip和对应端口号、密码即可

 

End~

转载于:https://my.oschina.net/javacy/blog/1544741

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/661118
推荐阅读
相关标签
  

闽ICP备14008679号