標籤:conf 檔案內容 locate 遠端連線 command 64bit icon art pass
作業系統:Centos6.9(64Bit)
Oracle:11g 、11.2.0.4.0版本
Ip地址:172.16.220.139
廢話不多說了,下面記錄安裝過程:
1)安裝案頭環境
[[email protected] ~]# yum -y groupinstall "X Window System"[[email protected] ~]# yum -y groupinstall "Desktop" [[email protected] ~]# yum -y groupinstall "General Purpose Desktop"[[email protected] ~]# startx //或者使用"init 5"命令來啟動圖形介面;關閉圖形介面則需要執行"init 3"命令 執行上面startx命令後(可以放在後台執行,或者ctrl+z;bg 1;disown -a),就是把伺服器的桌面圖案啟動了。使用VNC串連後,就會發現已經是桌面圖案了。
2)修改centos系統以桌面圖案啟動
[[email protected] ~]# cat /etc/inittab......#id:3:initdefault: //以文字模式啟動系統id:5:initdefault: //以桌面圖案啟動系統
3)VNC遠端桌面連線環境安裝
[[email protected] ~]# ps -eaf|grep vnc [[email protected] ~]# rpm -qa | grep vnc安裝VNC軟體[[email protected] ~]# yum install -y tigervnc tigervnc-server[[email protected] ~]# yum install -y libvncserver*[[email protected] ~]# rpm -qa | grep vnc libvncserver-0.9.7-7.el6_6.1.x86_64tigervnc-server-1.1.0-24.el6.x86_64libvncserver-devel-0.9.7-7.el6_6.1.x86_64tigervnc-1.1.0-24.el6.x86_64安裝gnome軟體,即安裝產生圖形介面鎖需要的組件:[[email protected] ~]# yum install -y gnome* [[email protected] ~]# yum install libXfont -y[[email protected] ~]# yum install xorg-x11-xfs [[email protected] ~]# yum install xorg-x11-xfs-utils [[email protected] ~]# yum install xorg-x11-xinit [[email protected] ~]# yum install xorg-x11-xdm [[email protected] ~]# yum install xorg-x11-fonts* 配置vncservers配置vncservers,這裡顯示vnc遠端連線到伺服器的桌面視窗初始化大小,預設是800x600你也可以設定成你習慣的模式比如1280x960:[[email protected] ~]# vim /etc/sysconfig/vncservers......VNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry 800x600"設定vncserver密碼啟動vnc之前必須設定密碼:[[email protected] ~]# vncpasswd Password:Verify:啟動停止vncserver[[email protected] ~]# service vncserver start/stop/restart預設監聽連接埠是:5901[[email protected] ~]# ps -ef|grep vncroot 3950 1 0 01:15 pts/0 00:00:00 /usr/bin/Xvnc :1 -desktop vm01:1 (root) -auth /root/.Xauthority -geometry 800x600 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -pnroot 3958 3957 0 01:15 pts/0 00:00:00 vncconfig -iconicroot 4145 3323 0 01:30 pts/0 00:00:00 grep vnc[[email protected] ~]# lsof -i:5901COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEXvnc 3950 root 5u IPv4 55672 0t0 TCP *:5901 (LISTEN)[[email protected] ~]# 配置xstartup啟動命令將/root/.vnc/xstartup檔案內容複寫成下面的內容[[email protected] ~]# cp /root/.vnc/xstartup /root/.vnc/xstartup.bak[[email protected] ~]# vim /root/.vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop:unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &gnome-session &--------------------------------------------------------------------針對上面開機檔案內容:1)如果使用的是gnome映像介面,則需要注釋掉以下兩行, xterm -geometry80x24+10+10 -ls -title “$VNCDESKTOP Desktop” & twm & 並添加以下這行: gnome-session &2)如果黑屏了,後台日誌報如下錯誤: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檢索不到的話,如下所示:[[email protected] ~]# ll /etc/X11/xinit/xinitrcls: cannot access /etc/X11/xinit/xinitrc: No such file or directory[[email protected] ~]# find / -name xinitrc[[email protected] ~]# 採用的方案就是,注釋掉 /root/.vnc/xstartup 裡面的exec /etc/X11/xinit/xinitrc,讓vncserver去選擇預設的,讓vnc載入預設圖形介面程式 就ok了--------------------------------------------------------------------改變xstartup的許可權這是很多人容易忽視的問題,也是造成串連成功後黑屏的原因之一。 在CentOS中,xstartup的檔案路徑為:/root/.vnc/ (可以通過locatexstartup來查看xstartup的檔案路徑) 所以需要執行:chmod 777/root/.vnc/xstartup來賦予許可權。之後再重啟下vncserver。最後在本地windows安裝vnc viewer,遠端存取在windows下安裝vnc用戶端,:https://pan.baidu.com/s/1hrSIr4K提取密碼:dqdtVNC遠端連線資訊(下面ip是VNC服務端的地址):VNC Server: 172.16.220.139:5901Encrytion:Let VNC Server choose然後輸入vncpasswd的密碼即可完成VNC遠端連線!
Centos 6.9下部署Oracle 11G資料庫環境的操作記錄