(转)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 ...
随机推荐
- [Linux] PHP程序员玩转Linux系列-怎么安装使用
现在服务器主流都是Linux系统,主流发行版是CentOS,最新的CentOS版本号是7.3,我公司使用的是CentOS6.5,所以,我还是主要去学习6.x版本的CentOS.桌面版的Linux系统中 ...
- 《半吊子全栈系列:Boostrap3》
前言:后端开发做网站 几年前,作为一名纯粹后端Java开发人员,对JS还没开窍,对于页面只停留在<十天学会DIV+CSS>这种程度,但是我又想做网站怎么办? 这时候Boostrap3出现了 ...
- pl/sql 导出oracle表结构
tools->export tables 是导出表结构还有数据 tools->export user objects是导出表结构 可以用tools->export tables ...
- 微信小程序,超能装的实例教程
序言 开始开发应用号之前,先看看官方公布的「小程序」教程吧!(以下内容来自微信官方公布的「小程序」开发指南) 本文档将带你一步步创建完成一个微信小程序,并可以在手机上体验该小程序的实际效果.这个小程序 ...
- HTTP严格安全传输(HTTP Strict Transport Security, HSTS)chromuim实现源码分析(二)
HTTP严格安全传输(HTTP Strict Transport Security, HSTS)chromuim实现源码分析(一) 下面来查看其他对保存HSTS信息的enabled_sts_hosts ...
- WebSocket浅析(一):实现群聊功能
首先WebSocket打破了传统的web请求响应模式,实现管道式的实时通信,并且可以持续连接. 相对于传统 HTTP 每次请求-应答都需要客户端与服务端建立连接的模式,WebSocket 是类似 So ...
- keepalived 安装配置
keepalived介绍 1. keepalived 是lvs 的扩展项目,因此它们之间具备良好的兼容性. 2. 通过对服务器池对象的健康检查,实现对失效机器/服务的故障隔离. 3. 负载均衡器之间的 ...
- linux 下rabbitmq 安装
准备工作: erlang环境 otp_src_19.0.tar.gz rabbitmq abbitmq-server-generic-unix-3.6.5.tar.xz # yum -y ins ...
- python 写的几道题
''' #乘法口诀''' for i in range(1,10): for j in range(1,i+1): print("%d*%d=%2d" % (i,j,i*j),en ...
- smarty实例登陆、显示、分页
1.先建立登陆页面,登陆页面的PHP文件和HTML文件是分开写的. 先建立一个登陆页的PHP文件, <?php include("../init.inc.php");//引入 ...