通过SHELL脚本快速安装Oracle11gR2软件(三)

2014-11-24 16:22:22 · 作者: · 浏览: 7
"export PS1" >> ${env_profile} echo "PS1='[\`whoami\`@\`hostname -s\`] :'" >> ${env_profile} echo " " >> ${env_profile} echo "umask 022" >> ${env_profile} echo "###########################" >> ${env_profile} echo "" 3.2 配置后使环境变量即时生效

source /home/oracle/.bash_profile

四。通过脚本静 安装Oracle软件

静默安装前,准备后安装有响应文件,设置好参数。

a. 响应文件:

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=xclora.localdomain
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN,zh_TW
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=true
oracle.install.db.customComponents=oracle.rdbms.partitioning:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true

b. 运行Oracle安装命令,等待安装完成即可。

./runInstaller -silent -ignoreSysPrereqs -force -ignorePrereq -responseFile /home/oracle/oracle_install.rsp

c. 如果不少包,且配置参数正确的话,安装命令最后会出现一个提示,让你在另一个会话,用root用户运行脚本。

出现的提示,把脚本在另一会话中用root用户执行即可完成整个数据库
软件的最后安装。

[oracle@xclora] :The following configuration scripts need to be executed as the "root" user.
 #!/bin/sh
 #Root scripts to run
/u01/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
         1. Open a terminal window
         2. Log in as "root"
         3. Run the scripts
         4. Return to this window and hit "Enter" key to continue

至此,通过4个脚本,即可完成了数据库软件的安装工作。脚本没加交互功能,但足以应付我平常安装用了。

MAIL: xcl_168@aliyun.com

BLOG: http://blog.csdn.net/xcl168