Centos-6.7下 - Oracle 11gR2静默详细安装过程及排错

INVENTORY_LOCATION=/opt/app/oraInventory SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1 ORACLE_BASE=/opt/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.isCustomInstall=false

oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall oracle.install.db.CLUSTER_NODES=

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

oracle.install.db.config.starterdb.globalDBName=ora11g.DB_2 oracle.install.db.config.starterdb.SID=ora11g

oracle.install.db.config.starterdb.characterSet=AL32UTF8 oracle.install.db.config.starterdb.memoryOption=true oracle.install.db.config.starterdb.memoryLimit=1500

oracle.install.db.config.starterdb.installExampleSchemas=false oracle.install.db.config.starterdb.enableSecuritySettings=true oracle.install.db.config.starterdb.password.ALL=oracle oracle.install.db.config.starterdb.password.SYS= oracle.install.db.config.starterdb.password.SYSTEM= oracle.install.db.config.starterdb.password.SYSMAN= oracle.install.db.config.starterdb.password.DBSNMP= oracle.install.db.config.starterdb.control=DB_CONTROL

oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL= oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

oracle.install.db.config.starterdb.dbcontrol.emailAddress= oracle.install.db.config.starterdb.dbcontrol.SMTPServer=

oracle.install.db.config.starterdb.automatedBackup.enable=false oracle.install.db.config.starterdb.automatedBackup.osuid= oracle.install.db.config.starterdb.automatedBackup.ospwd=

oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/data/oradata #指定存放数据文件目录

oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/data/recovery_area #指定快速恢复区目录

oracle.install.db.config.asm.diskGroup=asmdba oracle.install.db.config.asm.ASMSNMPPassword= MYORACLESUPPORT_USERNAME= MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=

DECLINE_SECURITY_UPDATES=true //一定要设为true PROXY_HOST= PROXY_PORT= PROXY_USER= PROXY_PWD=

5、开始静默安装:

以oracle用户身份登录系统安装Oracle,为避免出现中文乱码,装装前可以执行export LANG=\,显示英文, [root@DB_2database~]# su - oracle [oracle@DB_2~]$ cd /opt

[oracle@DB_2 opt~]$ cd database/ [oracle@DB_2 database~]$ export LANG=\

[oracle@DB_2 database~]$ ./runInstaller -silent -force -responseFile /home/oracle/etc/db_install.rsp

如果出现:

$ Exception in thread \ at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at java.awt.Toolkit$2.run(Toolkit.java:821) ...

这些错误提示,可能是环境变量还没有完全变为oracle下的,那么最好断开与主机的连接,然后重新使用oracle身份连接:ssh oracle@192.168.122.70;

如果出现:

Preparing to launch Oracle Universal Installer from/tmp/OraInstall2015-07-29_03-58-41PM. Please

wait ... [oracle@localhost database]$You can find the log ofthis install session at: //则表示安装顺利 如果出现:

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-29_03-58-41PM. Please

wait ... [oracle@localhostdatabase]$ //之后就没有反应

或者报错[FATAL] [INS-13013] Target environment do not meet some mandatoryrequirements 则需要按下面步骤进行:

安装命令中加入选项-ignorePrereq,详情请见

安装中,如果提示[WARNING]不必理会,此时安装程序仍在进行,如果出现[FATAL],则安装程序已经停止了。 大约需要五分钟左右......

如果需要查看安装日志信息了解安装进度,可以: cd $ORACLE_BASE/oraInventory/logs tail -100f installActions*.log

加上-ignorePrereq,再次尝试静默安装:

[oracle@DB_2database~]$ ./runInstaller -silent -force -ignorePrereq -responseFile /opt/database/response/db_install.rsp 说明:

-silent #指定静默安装方式

-ignorePrereq #如果哪块没有符合要求,不添加可能就安装不过去了 -force #软件可以安装在一个非空目录中 -responseFile #指定响应文件 StartingOracle Universal Installer...

CheckingTemp space: must be greater than 120 MB. Actual 6843 MB Passed

Checkingswap space: must be greater than 150 MB. Actual 929 MB Passed

Preparingto launch Oracle Universal Installer from

/tmp/OraInstall2016-03-06_02-24-49PM.Please wait ...[oracle@DB_m2 database]$ You can find the log of this installsession at:

/opt/app/oracle/oraInventory/logs/installActions2016-03-06_02-24-49PM.log

Thefollowing configuration scripts need to be executed as the \ #!/bin/sh

#Root scripts to run

/opt/app/oraInventory/orainstRoot.sh

/opt/app/oracle/product/11.2.0/dbhome_1/root.sh To execute the configuration scripts:

1. Open a terminal window 2. Log in as \ 3. Run the scripts

4. Return to this window and hit \key to continue

Successfully Setup Software.

安装完毕后会提示上述的信息,整个执行过程大部分时间都是在后台完成的,而且可能等待好一会儿才会有响应,所以需要耐心等待,通过监控

/opt/app/oracle目录的大小可以确定完成的情况,按照以上的配置完成安装后/opt/app/oracle目录的大小为4.1GB左右。 在最后会提示执行orainstRoot.sh,root.sh脚本,在新的会话窗口执行orainstRoot.sh,root.sh脚本,使用root用户执行orainstRoot.sh,root.sh: # /opt/app/oraInventory/orainstRoot.sh

Changing permissions of /opt/app/oraInventory. Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /opt/app/oraInventory to oinstall. The execution of the script is complete.

# /opt/app/oracle/product/11.2.0/dbhome_1/root.sh Check

/opt/app/oracle/product/11.2.0/dbhome_1/install/root_db_2016-05-04_01-50-04.log for the output of root script

执行结果也是没有前台显示出来。

配置监听程序:

$ORACLE_HOME/bin/netca /silent /responseFile /opt/database/response/netca.rsp

可能会出现以下错误:

UnsatisfiedLinkErrorexcepti native library: njni11

java.lang.UnsatisfiedLinkError:/soft/u01/app/oracle/product/11.2.0/db_1/lib/libnjni11.so:

libclntsh.so.11.1: cannot open shared objectfile: No such file or directory 可能是有些oracle依赖包没有安装:

检查以下RPM包是否安装(官方推荐必装包): binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64) compat-libstdc++-33-3.2.3-69.el6.i686 gcc-4.4.4-13.el6 (x86_64) gcc-c++-4.4.4-13.el6 (x86_64) glibc-2.12-1.7.el6 (i686) glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64) glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6 (i686) libgcc-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6 (x86_64) libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6 (x86_64) libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6 (x86_64) libaio-devel-0.3.107-10.el6.i686 make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)

使用rpm -qa|grep XX 查看是否安这些依赖包,这些依赖包缺一不可

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4