溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

如何在azure云上準(zhǔn)備oracle11g的vnc安裝環(huán)境

發(fā)布時(shí)間:2021-07-29 13:45:49 來(lái)源:億速云 閱讀:131 作者:小新 欄目:數(shù)據(jù)庫(kù)

這篇文章主要介紹如何在azure云上準(zhǔn)備oracle11g的vnc安裝環(huán)境,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

1,先檢查一下服務(wù)器是否已經(jīng)安裝了VNC服務(wù),沒(méi)有安裝,檢查服務(wù)器的是否安裝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軟件

這個(gè)是生成圖形界面鎖需要的組件:

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遠(yuǎn)程連接到服務(wù)器的桌面窗口初始化大小,默認(rèn)是800x600你也可以設(shè)置成你習(xí)慣的模式比如1280x960:

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

5,設(shè)置vncserver密碼

設(shè)置成yueworld,啟動(dòng)vnc之前必須設(shè)置密碼:

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

6,啟動(dòng)停止vncserver

啟動(dòng)命令servicevncserver start:

[root@hch_test_pd_121_129 ~]# service vncserver start                                                         
正在啟動(dòng) VNC 服務(wù)器: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                                                         
關(guān)閉 VNC 服務(wù)器:1:root                  [確定]
[root@hch_test_pd_121_129 ~]#

重啟命令servicevncserver restart:

[root@hch_test_pd_121_129 ~]# service vncserver restart                                                       
關(guān)閉 VNC 服務(wù)器:1:root                  [確定]
正在啟動(dòng) VNC 服務(wù)器: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啟動(dòng)命令
將/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:

如果黑屏了,后臺(tái)日志報(bào)如下錯(cuò)誤:

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

然后去服務(wù)器檢索 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去選擇默認(rèn)的,讓vnc加載默認(rèn)圖形界面程序 就ok了

8,改變xstartup的權(quán)限

這是很多人容易忽視的問(wèn)題,也是造成連接成功后黑屏的原因之一。

在CentOS中,xstartup的文件路徑為:/root/.vnc/ (可以通過(guò)locatexstartup來(lái)查看xstartup的文件路徑)

所以需要執(zhí)行:chmod 777/root/.vnc/xstartup來(lái)賦予權(quán)限。之后再重啟下vncserver。

9,本地windows安裝vnc viewer,遠(yuǎn)程訪問(wèn)

在windows下安裝vnc客戶端,下載地址:http://pan.baidu.com/s/1skADLrZ;軟件包名稱,RealVNC_cngr.rar,在本機(jī)windows下安裝好,之后進(jìn)行打開(kāi)開(kāi)始連接,連接地址顯示如下,D:\study\csdn\0801.png:

如何在azure云上準(zhǔn)備oracle11g的vnc安裝環(huán)境

輸入密碼后,然后進(jìn)去后,進(jìn)“應(yīng)用程序”—“系統(tǒng)工具”—“終端”,把終端拖到桌面上,雙擊桌面的終端,就可以開(kāi)始安裝Oracle了,如下D:\study\csdn\0802.png所示:

如何在azure云上準(zhǔn)備oracle11g的vnc安裝環(huán)境

以上是“如何在azure云上準(zhǔn)備oracle11g的vnc安裝環(huán)境”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI