Chinaunix首页 | 论坛 | 博客
  • 博客访问: 848375
  • 博文数量: 72
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 435
  • 用 户 组: 普通用户
  • 注册时间: 2013-04-27 20:07
个人简介

郭一军,网名guoyJoe,尖峰在线培训创始人、Oracle OCM、ITPUB论坛Oracle认证版版主、2013最佳精华贴、Senior DBA、Oracle OCT、 ACOUG MEMBER、CSDN 认证专家、RHCE、在线技术分享的倡导者和实践者。 http://www.jianfengedu.com http://jianfengedu.taobao.com

文章分类
文章存档

2014年(72)

分类: Oracle

2014-06-19 10:39:01

转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/20647553

1丶配置安装VNC

[root@guodb2 Disk1]# yum install vnc*


2丶设VNC密码
[root@guodb2 Disk1]# vncserver


You will require a password to access your desktops.


Password:
Verify:


New \'guodb2:1 (root)\' desktop is guodb2:1


Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


3丶重新启动VNC服务
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server:                                  [  OK  ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: no displays configured                [  OK  ]

4丶登录报错如下



5丶查VNC端口
[root@guodb2 Disk1]# netstat -tupln |grep vnc
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      9748/Xvnc           
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      9748/Xvnc           

tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      9748/Xvnc    

    

6丶从上面可以看出0号端号被占用了,用1号端号登录



7丶正常登录VNC,但图形界面显示如下 



8丶修改VNC配置文件,注释原来的两行,添加最后两行
[root@guodb2 Disk1]# vi /etc/sysconfig/vncservers
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

 VNCSERVERS="1:root"
 VNCSERVERARGS[1]="-geometry 1400x750 -nolisten tcp "


9丶修改图形界面,全部注释掉,添加最后一行
[root@guodb1 yum.repos.d]# vi /root/.vnc/xstartup
#!/bin/sh


# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc


#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &


10丶重启VNC服务
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server: 1:root                           [  OK  ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: 1:root xauth:  creating new authority file /root/.Xauthority


New \'guodb2:1 (root)\' desktop is guodb2:1


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


                                                           [  OK  ]


11丶正常登录,并正常显示图形界面





阅读(3633) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~