vnc远程连接CentOS6.4
来源:互联网 发布:吉林大学网络大专 编辑:程序博客网 时间:2024/06/05 18:21
本人是用CCProxy工具代理上网安装vnc,前提是配置好CentOS能联网使用yum命令。
一、安装 TigerVNC Server
1.查找vnc
[wangmeng@localhost ~]$ yum search tigervnc-serverLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * base: centos.ustc.edu.cn * extras: centos.ustc.edu.cn * updates: centos.ustc.edu.cn========================= N/S Matched: tigervnc-server =========================tigervnc-server.i686 : A TigerVNC servertigervnc-server-applet.noarch : Java TigerVNC viewer applet for TigerVNC servertigervnc-server-module.i686 : TigerVNC module to Xorg Name and summary matches only, use "search all" for everything.
2.第一行即是我们要安装的VNS服务器,第二行是客户端,执行
# yum install tigervnc-server.i686
3.回车后会有一次安装确认,输入y后回车即可安装,安装完毕后返回到命令行输入光标,执行
# vncserver
会提示输入验证密码,至少6位,该密码是客户端连接时用到的。
二、配置图形界面
1.修改配置文件,激活图形界面,执行命令:
# vi /root/.vnc/xstartup注释掉这行#twm & // 注释该行末尾增加一行gnome-session & // 增加该行:wq
然后修改vnc配置文件
vi /etc/sysconfig/vncservers
只需要两类内容就可以了,一个是定义用户,一个是定义用户登录情况:
VNCSERVERS="1:root 2:wangmeng"VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp"VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp"
说明:
第一行为服务配置,当前只配置了一个VNC服务,使用用户root启动,如果还需要使用其他用户登陆,可以修改VNCSERVERS的值如:“1:root 2:tiger”(tiger为系统另一存在用户)。第二行可以注释,是配置窗口分辨率的,需要去掉后面的-localhost
接下来分别使用命令行模式先后登录root和river用户,登录后设定vncserver密码,登录后的操作如下:
vncpasswdPassword输入密码Verify再次输入密码启动vnc服务:/sbin/service vncserver start 设置防火墙:iptables -I INPUT -p tcp --dport 5901:5902 -j ACCEPTiptables -I INPUT -p udp --dport 5901:5902 -j ACCEPT
三、启动VNC服务
1.执行命令
# /etc/init.d/vncserver start或# service vncserver start启动后提示:Starting VNC server: no displays configured [FAILED]
VNC Server随系统自动启动
执行命令
# sudo chkconfig --level 345 vncserver on
4.停止VNC服务
执行命令
# /etc/init.d/vncserver stop或# service vncserver stop
查看已经打开的vnc服务,关闭服务
# vncserver -list
执行情况如下:
[wangmeng@localhost ~]$ vncserver -listTigerVNC server sessions:X DISPLAY # PROCESS ID:1 24216[wangmeng@localhost ~]$ vncserver -kill :1Killing Xvnc process ID 24216[wangmeng@localhost ~]$
重启vnc服务
# /sbin/service vncserver restart
一般连接问题处理
[root@localhost wangmeng]# /etc/init.d/vncserver stop关闭 VNC 服务器:1:root 2:wangmeng [失败][root@localhost wangmeng]# vncserver -kill :1Can't find file /root/.vnc/localhost.wangmeng:1.pidYou'll have to kill the Xvnc process manually[root@localhost wangmeng]# /etc/init.d/vncserver stop关闭 VNC 服务器: [确定][root@localhost wangmeng]# vncserverxauth: (stdin):1: bad display name "localhost.wangmeng:1" in "add" commandNew 'localhost.wangmeng:1 (wangmeng)' desktop is localhost.wangmeng:1Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost.wangmeng:1.log[root@localhost wangmeng]#
另摘录网上一篇vnc文章 linux tigervnc-server安装使用 和 Redhat上VNC Server配置。
0 0
- vnc远程连接CentOS6.4
- VNC远程连接CentOS6.5桌面笔记
- Xmanager远程连接CentOS6.4
- VNC linux远程连接
- VNC远程连接桌面
- vnc vncserver 远程连接
- vnc远程连接树莓派
- 使用VNC远程连接服务器
- ubuntu vnc 远程连接桌面
- VNC 远程连接 CentOS桌面
- 使用VNC连接远程服务器
- vnc连接远程linux桌面
- 使用 xmanager 4 远程连接 centos6.3
- linux(centOS6.x)使用vnc连接
- centos学习2-安装显卡驱动& VNC Server ---为了远程 centos6.4
- 使用Xmanager 远程连接 CentOS6
- 怎样利用VNC远程连接LINUX桌面
- windows 通过vnc远程连接Ubuntu
- leetcode 第20-21题 Valid Parentheses & Generate Parentheses
- SQL MSSQL 常用代码大全
- Snooker 2060
- 22、TCP 报文的格式,字段的意义
- RMI简单实例与Spring集成RMI
- vnc远程连接CentOS6.4
- boost::serialization(1)基础
- Zend Studio 10.6.1 正式版
- 关于AndEngine显示全屏问题
- java常用的四种数据库连接池
- [连载]JavaScript讲义(03)--- JavaScript面向对象编程
- 对高内聚,低耦合的理解
- sun.misc.BASE64Encoder找不到jar包的解决方法
- LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏