Install Oracle DB 11g R2 on Oracle Linux R5

Environment:

Oracle Enterprise Linux R5 U3 64bit

Oracle 11g R2 64bit

Process (Local安裝):

1. 詳讀Oracle_11g_R2_Linux_x86_64/database/doc/install.112/e10860.pdf

2. Login as root

3. xhost +

4. 檢查memory, disk space

5. 是否安裝了所有Oracle Database所需的必要軟體, 如有缺少, 可從Oracle Linux安裝光碟安裝。例:

rpm -q sysstat

rpm -ivh sysstat-x.x.x.rpm

6. 建立所屬帳號及群組

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

/usr/sbin/useradd -g oinstall -G dba oracle

passwd oracle

7. 設定Kernel Parameters

8. 建立安裝目錄

mkdir -p /opt/u01/app

chown -R oracle:oinstall /opt/u01/app/

chmod -R 775 /opt/u01/app/

9. su – oracle

10. 進入安裝光碟, 執行 ./runInstaller, 會出現GUI安裝介面

11. Skip receiving email→Create and configure a database→Desktop Class→選擇安裝路徑(Step 8所建立的路徑) , Enterprise Edition, Unicode(AL32UTF8), Global database name (SID), 密碼→下一步…→修正所有缺少的requirement→進行安裝→完成

12. su – root

13. 至相對應的目錄執行 ./orainstRoot.sh及./root.sh

14. 開啟https://localhost:1158/em, 如出現登入畫面表示安裝成功

15. 在etc/profile加上環境變數

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
  umask 022
fi
xhost +
ORACLE_BASE=/opt/u01/app/oracle 
ORACLE_SID=SID名稱 
export ORACLE_BASE ORACLE_SID 
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 
export ORACLE_HOME 
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin: 
export PATH

16. 如果要設自動啟動, 請參考Oracle 11.1.0 Auto-Startup on Linux

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s