云主机没有安装桌面,所有整个过程采用无界面方式进行。 这篇重点介绍静默方面的操作。 关于操作系统和相关参数及环境变量部分参考如下博客:
64位 Linux Oracle 11gR2 单实例 安装手册
http://www.cndba.cn/dave/article/211
1 静默安装DB软件
1.1 创建/etc/oraInst.loc文件并添加如下内容:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
更改文件的权限 chown oracle:oinstall /etc/oraInst.loc chmod 664 /etc/oraInst.loc
1.2 创建response文件
修改response文件db_install.rsp,在文件在安装目录的response目录下,根据需求修改这个配置文件。
[root@dg1 response]# pwd /u01/software/database/response [root@dg1 response]# ls dbca.rsp db_install.rsp netca.rsp
文件看上去很长,实际上我们过滤一下无关内容就剩如下:
[root@dg1 response]# cat db_install.rsp |grep -v "#"|grep -v "^$" oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.install.option= ORACLE_HOSTNAME= UNIX_GROUP_NAME= INVENTORY_LOCATION= SELECTED_LANGUAGES=en ORACLE_HOME= ORACLE_BASE= oracle.install.db.InstallEdition= oracle.install.db.EEOptionsSelection=false oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0 oracle.install.db.DBA_GROUP= oracle.install.db.OPER_GROUP= oracle.install.db.CLUSTER_NODES= oracle.install.db.isRACOneInstall= oracle.install.db.racOneServiceName= oracle.install.db.config.starterdb.type= oracle.install.db.config.starterdb.globalDBName= oracle.install.db.config.starterdb.SID= oracle.install.db.config.starterdb.characterSet=AL32UTF8 oracle.install.db.config.starterdb.memoryOption=true oracle.install.db.config.starterdb.memoryLimit= oracle.install.db.config.starterdb.installExampleSchemas=false oracle.install.db.config.starterdb.enableSecuritySettings=true oracle.install.db.config.starterdb.password.ALL= 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.automatedBackup.enable=false oracle.install.db.config.starterdb.automatedBackup.osuid= oracle.install.db.config.starterdb.automatedBackup.ospwd= oracle.install.db.config.starterdb.storageType= oracle.install.db.config.starterdb.fileSystemStorage.dataLocation= oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation= oracle.install.db.config.asm.diskGroup= oracle.install.db.config.asm.ASMSNMPPassword= MYORACLESUPPORT_USERNAME= MYORACLESUPPORT_PASSWORD= SECURITY_UPDATES_VIA_MYORACLESUPPORT= DECLINE_SECURITY_UPDATES= PROXY_HOST= PROXY_PORT= PROXY_USER= PROXY_PWD= PROXY_REALM= COLLECTOR_SUPPORTHUB_URL= oracle.installer.autoupdates.option= oracle.installer.autoupdates.downloadUpdatesLoc= AUTOUPDATES_MYORACLESUPPORT_USERNAME= AUTOUPDATES_MYORACLESUPPORT_PASSWORD= [root@dg1 response]#
可以根据我们的需要手工进行修改,实际上最简单的就是在GUI安装的时候,生成response文件,这样照葫芦画瓢就可以了。
最终我们修改了db_install.rsp中的如下内容:
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.install.option=INSTALL_DB_SWONLY DECLINE_SECURITY_UPDATES=true UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory SELECTED_LANGUAGES=en,zh_CN ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=dba DECLINE_SECURITY_UPDATES=true
其中DECLINE_SECURITY_UPDATES一定要设置成true,否则在安装的时候会出现以下的告警:
[WARNING] - My Oracle Support Username/Email Address Not Specified
[SEVERE] - Provide the My Oracle Support password.
无法继续安装。
1.3 使用response 文件静默安装db软件
[oracle@dg1 database]$ ./runInstaller -silent -force -ignorePrereq -ignoreSysPrereqs -responseFile /u01/software/database/response/db_install.rsp Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 35973 MB Passed Checking swap space: 0 MB available, 150 MB required. Failed <<<< >>> Ignoring required pre-requisite failures. Continuing... Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-02_01-12-58AM. Please wait ...[oracle@dg1 database]$ You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2016-12-02_01-12-58AM.log The installation of Oracle Database 11g was successful. Please check '/u01/app/oraInventory/logs/silentInstall2016-12-02_01-12-58AM.log' for more details. As a root user, execute the following script(s): 1. /u01/app/oracle/product/11.2.0/db_1/root.sh Successfully Setup Software.
2 netca静默创建监听
netca.rsp不需要修改,直接建立监听
[oracle@dg1 database]$ netca -silent -responsefile /u01/software/database/response/netca.rsp Parsing command line arguments: Parameter "silent" = true Parameter "responsefile" = /u01/software/database/response/netca.rsp Done parsing command line arguments. Oracle Net Services Configuration: Profile configuration complete. Oracle Net Listener Startup: Running Listener Control: /u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully. Listener configuration complete. Oracle Net Services configuration successful. The exit code is 0 [oracle@dg1 database]$
3 手工建库
手工建库部分直接参考:
Oracle 11g 单实例 中手工建库 示例
http://www.cndba.cn/dave/article/209
Oracle 11g RAC 中手工建库 示例
http://www.cndba.cn/dave/article/210
Oracle 12c RAC 中手工建库 示例
http://www.cndba.cn/dave/article/227
Oracle 12c 单实例 中手工建库 示例
http://www.cndba.cn/dave/article/226
版权声明:本文为博主原创文章,未经博主允许不得转载。