database's docs

3.8.0 RAC-安装oracle 11g r2软件


1. 安装oracle 11.2.0.3

1) 创建oracle目录

在各节点上,以root身份执行以下命令

mkdir /u01/app/oracle
chown -R oracle.oinstall /u01/app/oracle

接下来的操作只需要在db-oracle-node1上执行

2) 下载oracle 11g release 2.0.3

11.2.0.3版本需要在oracle 支持网站中的最新补丁集中才能找到,需要oracle的客户支持账号,文件名称是

  • p10404530_112030_Linux-x86-64_1of7.zip
  • p10404530_112030_Linux-x86-64_2of7.zip
  • p10404530_112030_Linux-x86-64_3of7.zip
  • p10404530_112030_Linux-x86-64_4of7.zip
  • p10404530_112030_Linux-x86-64_5of7.zip
  • p10404530_112030_Linux-x86-64_6of7.zip
  • p10404530_112030_Linux-x86-64_7of7.zip 如果前面在grid infrastructure下载过,此处无需重复下载

3) 准备oracle 11g release 2.0.3软件

# 以oracle身份执行
mkdir /u01/app/oracle/oracle-software
mv p10404530_112030_Linux-x86-64_1of7.zip /u01/app/oracle/oracle-software/
mv p10404530_112030_Linux-x86-64_2of7.zip /u01/app/oracle/oracle-software/

# 以root身份执行
chown oracle.oinstall /u01/app/oracle/oracle-software/p10404530_112030_Linux-x86-64_1of7.zip
chown oracle.oinstall /u01/app/oracle/oracle-software/p10404530_112030_Linux-x86-64_2of7.zip

# 以oracle身份执行
cd /u01/app/oracle/oracle-software
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip

4) 确保cvu_config中的/CV_ASSUME_DISTID为OEL6

vim /u01/app/oracle/oracle-software/database/stage/cvu/cv/admin/cvu_config
**************************************
CV_ASSUME_DISTID=OEL6
**************************************

5) 配置db_install.rsp文件

cp db_install.rsp db_install.rsp.bak
vim /u01/app/oracle/oracle-software/database/response/db_install.rsp
**************************************
# 仅安装软件
oracle.install.option=INSTALL_DB_SWONLY

# 配置主机名
ORACLE_HOSTNAME=db-oracle-node1

# 指定inventory,否则使用默认值
INVENTORY_LOCATION=

# 默认语言是en
SELECTED_LANGUAGES=en

# 指定oracle 软件安装目录
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

# 指定oracle base目录
ORACLE_BASE=/u01/app/oracle

# 指定安装版本
oracle.install.db.InstallEdition=EE

# 制定dba和oper组
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper

# 指定节点名称
oracle.install.db.CLUSTER_NODES=db-oracle-node1,db-oracle-node2

# 拒绝安装更新
DECLINE_SECURITY_UPDATES=true

# 跳过更新
oracle.installer.autoupdates.option=SKIP_UPDATES
**************************************

6) 环境检查

# 关闭防火墙
service itpables stop

# 生成key做ssh互信,每个节点都执行以下命令
ssh-keygen
ssh-copy-id db-oracle-node1
ssh-copy-id db-oracle-node2

7) silent 安装oracle 11g r2 software

# 可以关注-ignorePrereq,但此处不需要添加,因为我们确实需要检查环境是否满足
./runInstaller -silent -responseFile /u01/app/oracle/oracle-software/database/response/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 25652 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 991 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-29_09-44-02AM. Please wait ...[oracle@db-oracle-node1 database]$ You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2016-12-29_09-44-02AM.log
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-12-29_09-44-02AM.log' for more details.

As a root user, execute the following script(s):
        1. /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Execute /u01/app/oracle/product/11.2.0/dbhome_1/root.sh on the following nodes:
[db-oracle-node1, db-oracle-node2]

Successfully Setup Software.

# 在各节点执行以下节点
sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /u01/app/oracle/product/11.2.0/dbhome_1/install/root_db-oracle-node1.oratest.com_2016-12-29_10-03-18.log for the output of root script

# 执行完毕后在主节点按下enter键结束oracle安装