Oracle 11g 单实例静默安装实战记录(linux),oracle11g
oracle 11g 单实例静默安装
AURHOR:Oracle_Ran
环境规划:
OS Version : Red Hat Enterprise Linux Server release 6.7 (Santiago)
Oracle Version: 11.2.0.4
操作系统环境配置可参考Oracle 单实例安装文档
1、上传Oracle安装介质,进入解压目录,复制响应文件模板
cd /home/oracle/
mkdir rsp
cp /db/soft/database/response/* /home/oracle/rsp/
su - root
chmod 700 /home/oracle/rsp/*.rsp
chown -R oracle:oinstall /home/oracle/rsp/
2、修改响应文件相关参数
vi /home/oracle/rsp/db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY //安装类型
ORACLE_HOSTNAME=hostname //主机名称
UNIX_GROUP_NAME=oinstall //安装组
INVENTORY_LOCATION=/db/oraInventory //INVENTORY目录
SELECTED_LANGUAGES=en,zh_CN,AL32UTF8 //选择语言
ORACLE_HOME=/db/oracle/product/11.2.0/db_1 //oracle_home
ORACLE_BASE=/db/oracle //oracle_base
oracle.install.db.InstallEdition=EE //oracle版本
oracle.install.db.isCustomInstall=true //自定义安装
oracle.install.db.DBA_GROUP=dba //dba用户组
oracle.install.db.OPER_GROUP=oinstall //oper用户组
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE //数据库类型
oracle.install.db.config.starterdb.globalDBName=oadb //globalDBName
oracle.install.db.config.starterdb.SID=orcl //SID
oracle.install.db.config.starterdb.characterSet=AL32UTF8 //字符集
oracle.install.db.config.starterdb.memoryLimit=512 //自动管理内存的最小内存(M)
oracle.install.db.config.starterdb.password.ALL=oracle //设定所有数据库用户使用同一个密码
DECLINE_SECURITY_UPDATES=true //设置安全更新
3、静默 安装数据库软件
[oracle@template database]$ ./runInstaller -silent -force -responseFile /home/oracle/res/db_install.rsp
【注意】
安装过程中如果出现Fail,说明安装中断。
出现Waring可以不用理会,此时安装仍在进行,可随时注意查看安装日志即可。
Starting Oracle Universal Installer...
CheckingTemp space: must be greater than 120 MB. Actual 8033MB Passed
Checking swapspace: must be greater than 150 MB. Actual 4095MB Passed
Preparingto launch Oracle Universal Installer from /tmp/OraInstall2018-04-05_06-27-07PM. Please wait ...
[oracle@template database]$ [F] [INS-10101] The given response file /home/oracle/res/db_install.rsp is not found.
CAUSE: The given response file is either not accessible or do notexist.
ACTION: Give a correct responsefile location. (Note: relative path is notsupported)
Alog of this session is currently saved as: /tmp/OraInstall2018-04-05_06-27-07PM/installActions2018-04-05_06-27-07PM.log.
Oracle recoms that if you want to keep this log, you should move it from the temporary location to a more permanentlocation.
根据红色部分提示,发现路径写错。
再次执行:[oracle@template database]$[oracle@template database]$ ./runInstaller -silent -force -responseFile /home/oracle/rsp/db_install.rsp
Starting Oracle Universal Installer...
CheckingTemp space: must be greater than 120 MB. Actual 8033MB Passed
Checking swapspace: must be greater than 150 MB. Actual 4095MB Passed
Preparingto launch Oracle Universal Installer from /tmp/OraInstall2018-04-05_06-31-06PM. Please wait ...[oracle@template database]$ [Wt meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2018-04-05_06-31-06PM/installActions2018
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2018-04-05_06-31-06PM/installActions2018-04-05_e or
from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/db/oraInventory/logs/installActions2018-04-05_06-31-06PM.log
正常输出
这里提示安装成功,运行脚本:
[oracle@template database]$ The installation of Oracle Database11g was successful.
Pleasecheck '/db/oraInventory/logs/silentInstall2018-04-05_06-31-06PM.log' formore details.As a root user, executethe following script(s):1. /db/oracle/product/11.2.0/db_1/root.sh
Successfully Setup Software.
到root 用户执行该脚本:
/db/oracle/product/11.2.0/db_1/root.sh
查看安装日志: (安装已经完成)
tail-f /db/oraInventory/logs/installActions2018-04-05_06-31-06PM.log...
...
INFO: Completed validating stateINFO: Terminatingallbackground operations
INFO: Terminatedallbackground operations
INFO: Successfully executed the flowinSILENT mode
INFO: Adding ExitStatus SUCCESS_WITH_WARNINGSto the exit status setINFO: Finding the most appropriateexit status for the currentapplication
INFO:Exit Status is 6INFO: Listof warnings encountered inthis Application:
INFO: PREREQS_FAILED_WITH_WARNING
INFO:Shutdown Oracle Database 11g Release 2 Installer
登录验证安装成功:
4、静默配置监听
[oracle@template database] $ORACLE_HOME/bin/netca /silent /responseFile /home/oracle/rsp/netca.rsp
可直接修改 /netca.rsp 文件内的配置来创建监听
5、静默安装数据库
安装数据库可以通过修改响应文件和直接使用命令 两种方式来安装
修改仅安装数据库的响应文件
vim/home/oracle/rsp/dbca.rsp[CREATEDATABASE] //仅修改此部分即可,可按照实际需求调整
GDBNAME="oadb.template" //全局数据库的名字=SID+主机域名
SID="oadb" //SID
CHARACTERSET="AL32UTF8" //编码
NATIONALCHARACTERSET="UTF8" //编码
开始静默创建数据库:[oracle@template database] $ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/rsp/dbca.rsp
执行之后会要求输入sys/system 密码(可以在响应文件中直接修改)
Copyingdatabasefiles1%complete3%complete11%complete18%complete26%complete37%complete
Creatingandstarting Oracle instance40%complete45%complete50%complete55%complete56%complete57%complete60%complete62%complete
CompletingDatabaseCreation66%complete70%complete73%complete85%complete96%complete100%complete
Look at thelog file "/db/oracle/cfgtoollogs/dbca/oadb/oadb.log" for further details.
数据库创建完成。
进入数据库查询数据库的状态。
后续的参数调整根据个人实际情况进行修改。
http://www.dengb.com/oracle/1317851.htmlwww.dengb.comtruehttp://www.dengb.com/oracle/1317851.htmlTechArticleOracle 11g 单实例静默安装实战记录(linux),oracle11g oracle 11g 单实例静默安装 AURHOR:Oracle_Ran 环境规划: OS Version : Red Hat Enterprise Linux Serve...