歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> 在Linux下安裝Oracle11gR2

在Linux下安裝Oracle11gR2

日期:2017/3/3 13:56:59   编辑:Linux技術

目錄

目錄
下載Linux鏡像文件
創建虛擬機
安裝CentOS
開始Oracle11g安裝
創建目錄掛載光盤
配置yum源
創建用戶
創建安裝目錄
解壓並安裝

1.下載Linux鏡像文件

這裡我使用的是CentOS-6.5-x64,可以在下面這個地址下載
CentOS6.5
選擇CentOS-6.5-x86_64-bin-DVD1to2.torrent 這個下載即可。

2.創建虛擬機




網絡選擇橋接,其他選項默認即可
創建完虛擬機後,設置裡面選擇使用ios鏡像文件:CentOS-6.5-x86_64-bin-DVD1.iso

3.安裝CentOS

按照下圖一步一步來即可

選擇跳過

一直下一步,這裡選擇yes

選擇左下角的Configure Network,選中網卡eth0,edit

勾選connect automatically,Apply

下一步,時區選擇上海
選擇第一項,使用所有空間

選擇最小化安裝,下面選擇自定義

在base System中選擇base,這樣可以最快速度安裝,然後下一步 開始安裝

安裝完成後重啟。

4.開始Oracle11g安裝

建議大家連接到xshell下進行。

1.創建目錄,掛載光盤

[code]mkdir    /mnt/cdrom
mount  /dev/cdrom /mnt/cdrom


2.配置yum源

[code]vi /etc/yum.repos.d/CentOS-Debuginfo.repo

修改baseurl和enabled
[code][debug]
name=CentOS-6 - Debuginfo
baseurl=file:///mnt/cdrom
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6
enabled=1

3.創建用戶

最後需要輸入兩次密碼確認
[code]groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

4.創建安裝目錄

[code]mkdir -p /u01/app
chown -R oracle:oinstall /u01 
chmod -R 775 /u01

5.解壓並安裝

將Oracle11gR2的安裝包上傳到tmp目錄下
以oracle用戶登錄,解壓tmp目錄下的兩個zip文件
到database目錄下運行安裝
[code]su - oracle
cd /tmp
unzip  linux.x64_11gR2_database_1of2.zip
unzip  linux.x64_11gR2_database_2of2.zip
cd /tmp/database
./runInstaller

如果一打開圖形界面就提示不能解析主機名,以root用戶登錄
在vim /etc/hosts 下加入一行
192.168.1.1(你的IP) oracle(你的主機名)
如果安裝界面亂碼,修改
[code] vi /etc/sysconfig/i18n   改為 LANG="en_US.UTF-8"
 使設置生效
 source /etc/sysconfig/i18n 
 臨時修改
 export LANG=en_US

如果你使用的是xshell遠程登錄,有可能不能顯示GUI界面(5.0以上的版本可能有這個問題),分享一個4的xmanager吧
http://pan.baidu.com/s/1eStyxgu
[code][oracle@sc database]$ ./runInstaller 
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 27982 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 1983 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-05-16_07-19-44PM. Please wait ...

出現下面的畫面,你就成功了!
Copyright © Linux教程網 All Rights Reserved