(转)centos6.5安装VNC
在Linux下用VNC远程桌面是个很不错的玩意。但在CentOS中默认没有安装VNC的。可以用下面语句查询,如果出现下面情况说明没有安装vnc
#rpm -q tigervnc tigervnc-server
package tigervnc is not installed
package tigervnc-server is not installed
yum install tigervnc tigervnc-server
然后就等待安装完成。
[root@www.linuxidc.com ~]# vncserver
You will require a password to access your desktops.
Password:<输入vnc登录密码>
Verify:<再次输入vnc登录密码>
#twm &
gnome-session &
[root@GUOKE ~]# vi /root/.vnc/xstartup
#!/bin/sh
[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
修改用户配置文件:/etc/sysconfig/vncservers
VNCSERVERS="2:root"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 32"
[root@GUOKE ~]# vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display: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.redhat.com/faq/docs/DOC-7028
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 32"
chmod 777 /root/.vnc/xstartup
5、防火墙开端口,netstat -antpl查看可以发现有三个端口在监听。
vi /etc/sysconfig/iptables 找到下面的语句:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
在这之后填加:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT
重起防火墙
service iptables restart
/etc/init.d/vncserver start
然后在windows中用vnc客户端登录


(转)centos6.5安装VNC的更多相关文章
- CentOS6.4安装VNC
http://jingyan.baidu.com/article/ca2d939dd1dabbeb6c31ce24.html 一.安装 VNC 默认情况下,CentOS 6.4 是没有安装的. 检查是 ...
- Centos6.x 安装vnc
一.安装gnome桌面环境 如果系统已经安装了gnome桌面环境,此步省略. # 安装fontforge,避免字体出现方框乱码 yum install fontforge -y # 安装gnome桌面 ...
- centos6.5安装VNC、远程及启动关闭
标签: centos vnc 远程桌面 安装 详解 0.说明 安装服务的过程当中,最好是在联网环境下操作.由于涉及到远程连接的问题,系统的防火墙需要关闭,或者是做好相应的过滤策略.参考了网上很多大牛的 ...
- Centos6 安装vnc
Centos6 安装vnc 1. 安装 使用yum方式安装 yum install tigervnc-server tigervnc #启动 vncserver #重启动 /etc/init.d/vn ...
- rhel7配置tiger vnc详解 centos6配置安装vnc-server
参考网站:http://blog.51cto.com/xjsunjie/1963463 结合 https://blog.csdn.net/wamath/article/details/760 ...
- centos6和7安装vnc
centos6安装vnc yum安装 yum groupinstall -y "Desktop" yum install -y tigervnc-server tigervnc-s ...
- Centos6.8安装并配置VNC
一般服务器都会在IDC或云端,为了可以看到服务器的图形化界面,需要安装配置VNC,本例为Centos6.8上安装配置VNC. [root@hostname ~]#yum install -y tige ...
- CentOS-6.5x64:VNC安装配置
1.安装软件前首先检查下系统是否已经安装了这个软件: rpm -qa tigervnc-server 2.根据前面命令的查询,显示系统还是没有安装VNC服务器端软件,那么我们就使用命令进行安装一下: ...
- centos6.5 安装、启动vnc
一.安装vnc 1.确保当前账号是root2.查看本机是否已经安装vncserver rpm -qa|grep tigervnc 3.安装vncserver yum -y install tigerv ...
随机推荐
- 使用express.js框架一步步实现基本应用以及构建可扩展的web应用
最近过年在家有点懈怠,但是自己也不断在学习新的前端技术,在家琢磨了express.js的web框架. 框架的作用就是提高开发效率,快速产出结果.即使不使用框架,我们也会在开发过程中逐渐形成构成框架. ...
- MVC View显示详解(RenderBody,RenderPage,RenderSection,Partial)
一.Views文件夹 -> Shared文件夹下的 _Layout.cshtml 母版页 @RenderBody 当创建基于_Layout.cshtml布局页面的视图时,视图的内容会和布局页面合 ...
- unity 双面shader
Shader "Custom/DoubleFace" { Properties { _Color ("Main Color", Color) = ...
- 纯js实现html转pdf
项目开发中遇到了一个变态需求,需要把一整个页面导出为pdf格式,而且要保留页面上的所有的表格.svg图片和样式.简而言之,就是希望像截图一样,把整个页面截下来,然后保存成pdf.咋不上天呢--查了一下 ...
- python报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 0 解决方案
环境:mac+python 2.7 场景描述:在使用python修改excel内容修改表格内容为中文保存时报以下错误 此时已经设置了utf-8了 但保存时仍然报错错 此时将python中的中文使用un ...
- 中国大学MOOC中的后台文件传输
早期版本的中国大学MOOC一旦被挂起后,应用在完成当前下载任务后无法继续添加新任务,当然也无法将缓存状态写入数据库.这个问题能否顺利解决直接关系到用户体验. 顺便吐槽下,凡是使用了后台文件传输还提示你 ...
- 深入浅出妙用 Javascript 中 apply、call、bind
这篇文章实在是很难下笔,因为网上相关文章不胜枚举. 巧合的是前些天看到阮老师的一篇文章的一句话: "对我来说,博客首先是一种知识管理工具,其次才是传播工具.我的技术文章,主要用来整理我还不懂 ...
- JAVA中的数据结构 - 真正的去理解红黑树
一, 红黑树所处数据结构的位置: 在JDK源码中, 有treeMap和JDK8的HashMap都用到了红黑树去存储 红黑树可以看成B树的一种: 从二叉树看,红黑树是一颗相对平衡的二叉树 二叉树--&g ...
- PropertyChangeSupport的使用
使用目的 当你需要监听对象属性的变化时,可以使用PropertyChangeSupport类来管理监听器,可以在一些关联属性的场合使用. 使用示例,以下为BetaConfig对象添加了管理属性监听器的 ...
- Javascript—②函数
新手Perfect教程之Javascript②教程-函数 前言:上回我们是从hello world开始的,本期将会讲"函数" 在学自定义函数之前,先了解几个已经定义好的函数: 1 ...