您的位置:首页 > 运维架构 > Linux

linux下安装VNC

2016-08-05 14:00 316 查看
VNC-viewerlinux下安装和配置VNC-viewer
http://www.realvnc.com/download/get/1795/details/随便填一下带*号的就可以下载了

操作目的:1、实现Win7上图形化远程 CentOS
2、实现Win7与CentOS数据传输
安装:yum –y intsll vnc *vnc-server*

配置:vi /etc/sysconfig/vncservers

[root@Linux ~]# vim/etc/sysconfig/vncservers
修改为以下形式:
# The VNCSERVERS variable is a list ofdisplay:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see this URL:
# http://kbase. href="http://www.linuxidc.com/topicnews.aspx?tid=10" target=_blank>RedHat.com/faq/docs/DOC-7028
# Use "-nolisten tcp" to preventX connections to your VNC server via TCP.
# Use "-localhost" to preventremote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option inthe
# `man vncviewer' manual page.
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
第三步、设置vnc链接密码
[root@Linux ~]# vncpasswd /admin123 # 输入两次密码
第四步、重启vncserver
[root@Linux ~]# service vncserver restart

第五步、要么设置防火墙规则,要么关闭防火墙
[root@Linux ~]# service iptables stop

[root@localhost ~]# iptables -I INPUT -ptcp --dport 5901 -j ACCEPT
[root@localhost ~]# iptables -I INPUT -ptcp --dport 5902 -j ACCEPT

第六步、在win7 下载 VNC-Viewer
下载好运行并输入 ip:桌面号 eg: 192.168.0.6:1 接着提示输入密码 OK。
至此已经可以实现win7下图形界面访问CentOs 桌面。

2、实现Win7与CentOS数据传输
用的时SSH Secure File Transfer Client
打开并输入 : Host Name : 192.168.0.6
User Name :Your name
点击链接 提示输入密码 OK

至此 文章开始的两个功能都已实现!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux 远程控制 VNC