如何在azure云上准备oracle11g的vnc安装环境

40次阅读
没有评论

共计 3811 个字符,预计需要花费 10 分钟才能阅读完成。

这篇文章主要介绍如何在 azure 云上准备 oracle11g 的 vnc 安装环境,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

1,先检查一下服务器是否已经安装了 VNC 服务,没有安装,检查服务器的是否安装 VNC 的命令如下

yum 或者 rpm 包 2 种安装方式都 check 下:

[root@hch_test_pd_121_129 ~]# ps -eaf|grep vnc 
root 15895 15846 0 15:04 pts/1 00:00:00 grep vnc
[root@hch_test_pd_121_129 ~]#
[root@hch_test_pd_121_129 ~]# rpm -qa | grep vnc
[root@hch_test_pd_121_129 ~]#

2,安装 vnc 软件

yum 安装命令:

yum install tigervnc tigervnc-server –y 
yum install -y libvncserver*

顺利安装完,check 下:

[root@hch_test_pd_121_129 ~]# rpm -qa | grep vnc 
tigervnc-1.1.0-16.el6.centos.x86_64
libvncserver-devel-0.9.7-7.el6_6.1.x86_64
tigervnc-server-1.1.0-16.el6.centos.x86_64
libvncserver-0.9.7-7.el6_6.1.x86_64
[root@hch_test_pd_121_129 ~]#

3,安装 gnome 软件

这个是生成图形界面锁需要的组件:

yum install -y gnome* 
yum install libXfont -y
yum install xorg-x11-xfs 
yum install xorg-x11-xfs-utils 
yum install xorg-x11-xinit 
yum install xorg-x11-xdm 
yum install xorg-x11-fonts*

4,配置 vncservers

配置 vncservers,这里显示 vnc 远程连接到服务器的桌面窗口初始化大小,默认是 800×600 你也可以设置成你习惯的模式比如 1280×960:

[root@hch_test_pd_121_129 ~]# vim /etc/sysconfig/vncservers 
 
VNCSERVERS= 1:root 
VNCSERVERARGS[1]= -geometry 800x600

5,设置 vncserver 密码

设置成 yueworld,启动 vnc 之前必须设置密码:

[root@hch_test_pd_121_129 ~]# vncpasswd 
Password:
Verify:
[root@hch_test_pd_121_129 ~]#

6,启动停止 vncserver

启动命令 servicevncserver start:

[root@hch_test_pd_121_129 ~]# service vncserver start 
正在启动  VNC  服务器:1:root xauth: creating new authority file /root/.Xauthority
 
New  hch_test_pd_121_129:1 (root)  desktop is hch_test_pd_121_129:1
 
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/hch_test_pd_121_129:1.log
 
 [确定]
[root@hch_test_pd_121_129 ~]#

停止命令 servicevncserver stop:

[root@hch_test_pd_121_129 ~]# service vncserver stop 
关闭  VNC  服务器:1:root [确定]
[root@hch_test_pd_121_129 ~]#

重启命令 servicevncserver restart:

[root@hch_test_pd_121_129 ~]# service vncserver restart 
关闭  VNC  服务器:1:root [确定]
正在启动  VNC  服务器:1:root
New  hch_test_pd_121_129:1 (root)  desktop is hch_test_pd_121_129:1
 
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/hch_test_pd_121_129:1.log
 
 [确定]
[root@hch_test_pd_121_129 ~]#

7,配置 xstartup 启动命令
将 /root/.vnc/xstartup 命令配置成如下:

[root@hch_test_pd_121_129 ~]# more /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 
[root@hch_test_pd_121_129 ~]#

PS1:

使用的是 gnome 图像界面,则需要注释掉以下两行,

xterm -geometry80x24+10+10 -ls -title “$VNCDESKTOP Desktop”   
twm 

并添加以下这行:

gnome-session 

PS2:

如果黑屏了,后台日志报如下错误:

Sat May 7 15:05:35 2016
 vncext: VNC extension running!
 vncext: Listening for VNC connections on all interface(s), port 5901
 vncext: created VNC server for screen 0
/root/.vnc/xstartup: line 4: /etc/X11/xinit/xinitrc: No such file or directory
/root/.vnc/xstartup: line 4: exec: /etc/X11/xinit/xinitrc: cannot execute: No such file or directory

然后去服务器检索 xinitrc 检索不到的话,如下所示:

[root@xxx rpms]# ll /etc/X11/xinit/xinitrc
ls: cannot access /etc/X11/xinit/xinitrc: No such file or directory
[root@xxx rpms]# find / -name xinitrc
[root@xxx rpms]#

采用的方案就是,注释掉 /root/.vnc/xstartup 里面的 exec /etc/X11/xinit/xinitrc,让 vncserver 去选择默认的,让 vnc 加载默认图形界面程序 就 ok 了

8,改变 xstartup 的权限

这是很多人容易忽视的问题,也是造成连接成功后黑屏的原因之一。

在 CentOS 中,xstartup 的文件路径为:/root/.vnc/(可以通过 locatexstartup 来查看 xstartup 的文件路径)

所以需要执行:chmod 777/root/.vnc/xstartup 来赋予权限。之后再重启下 vncserver。

9,本地 windows 安装 vnc viewer,远程访问

在 windows 下安装 vnc 客户端,下载地址:http://pan.baidu.com/s/1skADLrZ;软件包名称,RealVNC_cngr.rar,在本机 windows 下安装好,之后进行打开开始连接,连接地址显示如下,D:\study\csdn\0801.png:

输入密码后,然后进去后,进“应用程序”—“系统工具”—“终端”,把终端拖到桌面上,双击桌面的终端,就可以开始安装 Oracle 了,如下 D:\study\csdn\0802.png 所示:

以上是“如何在 azure 云上准备 oracle11g 的 vnc 安装环境”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注丸趣 TV 行业资讯频道!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-04发表,共计3811字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)