Windows vnc连接Linux系统
2014-06-18 18:47
369 查看
1. 首先检查Linux系统是否安装了vnc [root@mailsysconfig]# rpm -qa|grep vnc
vnc-server-4.1.2-14.el5_3.1如果是这样证明系统已经是安装vnc的2. 启动vncserver: [root@mail~]# vncserver
第一次启动会让你输入用户名和密码,重复输入两次即可
3. 编辑[root@mail ~]# vi /root/.vnc/xstartup 文件,并且加上777权限文件内容如下:#!/bin/sh# Uncomment thefollowing two lines for normal desktop:unsetSESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/.vnc/xstartup ] && exec /etc/.vnc/xstartup[ -r$HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solidgreyvncconfig-iconic term -geometry80x24+10+10 -ls -title "$VNCDESKTOP Desktop" twm &gnome-session&4. 编辑[root@mail ~]# vi /etc/sysconfig/vncservers 文件将# VNCSERVERS="2:myuser"#VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd-localhost"修改为:VNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry800x600"5. vnc的端口号一般为5801,5901,6001使用netstat –nat 查看端口是否启动6. 在防火墙上打开5801,5901,6001三个端口在[root@mail ~]# vi /etc/sysconfig/iptables 文件中加入:-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5801 -j ACCEPT
-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5901 -j ACCEPT
-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 6001 -j ACCEPT如果报错或者找不到iptables这个文件,则使用如下方法:在命令行中执行:/sbin/iptables-I INPUT -p tcp --dport 5801 -j ACCEPT/etc/rc.d/init.d/iptablessave 这样iptables就会执行保存到/etc/sysconfig/目录下 然后重启iptabes , /etc/rc.d/init.d/iptablesrestart
7. 关闭防火墙:/etc/init.d/iptables stop查看防火墙状态:/etc/init.d/iptables status启动防火墙:/etc/init.d/iptables start8. 启动vnc:vncserver :1 或者 service vncserver start重启vnc: service vncserver restart杀死vnc服务:vncserver –kill:19. 注意到vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,只能用kill命令暴力杀死进程10. windows客户端连接vnc:打开vnc客户端输入服务器的ip和端口号即可连接11.让系统启动时自启动vncserver
使用VNC连接登录到RedHat Linux图形界面,点击“系统”——“管理”——“服务器设置”——“服务”,在“后台服务”中找到VNCSERVER后勾选它,点击保存即可。
vnc-server-4.1.2-14.el5_3.1如果是这样证明系统已经是安装vnc的2. 启动vncserver: [root@mail~]# vncserver
第一次启动会让你输入用户名和密码,重复输入两次即可
3. 编辑[root@mail ~]# vi /root/.vnc/xstartup 文件,并且加上777权限文件内容如下:#!/bin/sh# Uncomment thefollowing two lines for normal desktop:unsetSESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/.vnc/xstartup ] && exec /etc/.vnc/xstartup[ -r$HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solidgreyvncconfig-iconic term -geometry80x24+10+10 -ls -title "$VNCDESKTOP Desktop" twm &gnome-session&4. 编辑[root@mail ~]# vi /etc/sysconfig/vncservers 文件将# VNCSERVERS="2:myuser"#VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd-localhost"修改为:VNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry800x600"5. vnc的端口号一般为5801,5901,6001使用netstat –nat 查看端口是否启动6. 在防火墙上打开5801,5901,6001三个端口在[root@mail ~]# vi /etc/sysconfig/iptables 文件中加入:-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5801 -j ACCEPT
-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5901 -j ACCEPT
-ARH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 6001 -j ACCEPT如果报错或者找不到iptables这个文件,则使用如下方法:在命令行中执行:/sbin/iptables-I INPUT -p tcp --dport 5801 -j ACCEPT/etc/rc.d/init.d/iptablessave 这样iptables就会执行保存到/etc/sysconfig/目录下 然后重启iptabes , /etc/rc.d/init.d/iptablesrestart
7. 关闭防火墙:/etc/init.d/iptables stop查看防火墙状态:/etc/init.d/iptables status启动防火墙:/etc/init.d/iptables start8. 启动vnc:vncserver :1 或者 service vncserver start重启vnc: service vncserver restart杀死vnc服务:vncserver –kill:19. 注意到vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,只能用kill命令暴力杀死进程10. windows客户端连接vnc:打开vnc客户端输入服务器的ip和端口号即可连接11.让系统启动时自启动vncserver
使用VNC连接登录到RedHat Linux图形界面,点击“系统”——“管理”——“服务器设置”——“服务”,在“后台服务”中找到VNCSERVER后勾选它,点击保存即可。
相关文章推荐
- windows上通过vnc连接虚拟机中linux系统
- windows上通过vnc连接虚拟机中linux系统
- windows上通过vnc连接虚拟机中linux系统
- 利用vnc远程连接linux系统
- 用vnc在Windows中远程连接Linux图形界面【zz】
- 使用VNC在windows下连接linux
- Windows的VNC客户端连接Linux无法复制粘贴
- 用vnc实现windows远程连接linux桌面
- windows下利用vnc远程连接linux桌面
- 用vnc在Windows中远程连接Linux图形界面
- 在mac下使用终端命令通过ssh协议连接远程linux系统,代替windows的putty
- VNC、SSH远程连接Linux系统设置及常见使用问题
- windows远程桌面访问Linux系统 (XRDP+VNC )
- Windows和Linux系统下perl连接SQL Server数据库的方法
- 实现Windows远程连接Linux系统通过telnet连接通讯
- Windows使用VNC连接linux桌面
- Windows、android连接Linux VNC
- 详细图文教程:如何使vmware虚拟机里的linux系统连接windows
- VMware下的Linux系统中Windows的共享目录,不支持创建软连接