这篇文章将为大家详细讲解有关oracle 11G如何静默安装,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。首先上传:上传两个database软件包到/dir 目录下Unzip p13390677_112040_Linux-x86-64_1of7.zipUnzip p13390677_112040_Linux-x86-64_2of7.zip请记住这两个软件包一个一个解压。[root@qhdb2 dir]#groupadd oinstall 创建安装组[root@qhdb2 dir]#useradd -g oinstall -d /home/oracle oracle 创建安装用户oracle[root@qhdb2 dir]#echo oracle |passwd –stdin oracle 赋予oracle用户密码为:oracle编辑oracle 参数文件[oracle@qhdb2 ~]$more .bash_profile # .bash_profile# Get the aliasesand functionsif [ -f ~/.bashrc]; then . ~/.bashrcfi# User specificenvironment and startup programsPATH=$PATH:$HOME/binexport PATHexportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1exportORACLE_SID=db2export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATHexportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libif [$USER = “oracle” ]; then if [ $SHELL = “/bin/ksh” ];then ulimit -p 16384 ulimit -p 65536 else ulimit -u 16384 -n 65536 fifiumask 022标红的部分在oracle11GR2以前版本是必须的、到了oracle11GR2以后版本可以不写。Vim /etc/sysctl.conf 加入如下:fs.aio-max-nr =1048576fs.file-max =6815744kernel.shmall =2097152kernel.shmmax =4294967295kernel.shmmni =4096kernel.sem = 25032000 100 128net.ipv4.ip_local_port_range= 9000 65500net.core.rmem_default= 262144net.core.rmem_max =4194304net.core.wmem_default= 262144net.core.wmem_max =1048576编辑下面文件[root@qhdb2 ~]#more/etc/security/limits.conf#for oracleoracle soft nproc2047oracle hard nproc16384oracle soft nofile1024oracle hard nofile65536oracle soft stack10240#for gridgrid soft nproc2047grid hard nproc16384grid soft nofile1024grid hard nofile65536grid soft stack10240我这里没有装GI,所以可以不用写。安装RPM包 在这里我就不多说了。[oracle@qhdb2 ~]$ mkdir -pv /u01/app/oracle/product/11.2.4/db_home1mkdir: created directory `/u01/app’mkdir: created directory `/u01/app/oracle’mkdir: created directory`/u01/app/oracle/product’mkdir: created directory`/u01/app/oracle/product/11.2.4’mkdir: created directory `/u01/app/oracle/product/11.2.4/db_home1′/u01/app/oracle/product/11.2.4/db_home1这是我的oracle_home目录/u01/app/oracle 这是我的oracle_base目录编辑静默安装的响应文件:在你解压的database文件里面就有响应文件你只需编辑它即可[root@qhdb2response]# pwd/dir/database/response[root@qhdb2response]#[root@qhdb2response]# less db.rsp | grep -v”#” |grep -v “^$”oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0oracle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME=qhdb2UNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oraInventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1ORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.EEOptionsSelection=falseoracle.install.db.optionalComponents=oracle.install.db.DBA_GROUP=oinstalloracle.install.db.OPER_GROUP=oinstalloracle.install.db.CLUSTER_NODES=oracle.install.db.isRACOneInstall=falseoracle.install.db.racOneServiceName=oracle.install.db.config.starterdb.type=GENERAL_PURPOSEoracle.install.db.config.starterdb.globalDBName=oracle.install.db.config.starterdb.SID=oracle.install.db.config.starterdb.characterSet=oracle.install.db.config.starterdb.memoryOption=falseoracle.install.db.config.starterdb.memoryLimit=oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.enableSecuritySettings=trueoracle.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_CONTROLoracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=oracle.install.db.config.starterdb.免费主机域名automatedBackup.enable=falseoracle.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=falseDECLINE_SECURITY_UPDATES=truePROXY_HOST=PROXY_PORT=PROXY_USER=PROXY_PWD=PROXY_REALM=COLLECTOR_SUPPORTHUB_URL=oracle.installer.autoupdates.option=SKIP_UPDATESoracle.installer.autoupdates.downloadUpdatesLoc=AUTOUPDATES_MYORACLESUPPORT_USERNAME=AUTOUPDATES_MYORACLESUPPORT_PASSWORD=[root@qhdb2response]#[oracle@qhdb2database]$ ./runInstaller -silent-responseFile /dir/database/response/db.rsp Starting OracleUniversal Installer…Checking Tempspace: must be greater than 120 MB.Actual 15219 MB PassedChecking swapspace: must be greater than 150 MB.Actual 8149 MB PassedPreparing to launchOracle Universal Installer from /tmp/OraInstall2016-12-09_09-59-49AM. Pleasewait …[oracle@qhdb2 database]$ [WARNING] [INS-13014] Target environment donot meet some optional requirements. CAUSE: Some of the optional prerequisitesare not met. See logs for details./u01/app/oraInventory/logs/installActions2016-12-09_09-59-49AM.log ACTION: Identify the list of failedprerequisite checks from the log:/u01/app/oraInventory/logs/installActions2016-12-09_09-59-49AM.log. Then eitherfrom the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually.You can find thelog of this install session at:/u01/app/oraInventory/logs/installActions2016-12-09_09-59-49AM.logThe installation ofOracle Database 11g was successful.Please check’/u01/app/oraInventory/logs/silentInstall2016-12-09_09-59-49AM.log’ for moredetails.As a rootuser, execute the following script(s): 1./u01/app/oracle/product/11.2.4/db_home1/root.shSuccessfully SetupSoftware.OK安装完成、在这里它提示您要以root身份执行/u01/app/oracle/product/11.2.4/db_home1/root.sh这个脚本。[root@qhdb2 ~]#/u01/app/oracle/product/11.2.4/db_home1/root.sh[root@qhdb2 ~]#/u01/app/oracle/product/11.2.4/db_home1/root.shCheck/u01/app/oracle/product/11.2.4/db_home1/install/root_qhdb2_2016-12-09_10-03-22.logfor the output of root script[root@qhdb2 ~]#more /u01/app/oracle/product/11.2.4/db_home1/install/root_qhdb2_2016-12-09_10-03-22.logPerforming rootuser operation for Oracle 11g The followingenvironment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.4/db_home1 Copying dbhome to /usr/local/bin … Copying oraenv to /usr/local/bin … Copying coraenv to /usr/local/bin …Entries will beadded to the /etc/oratab file as needed byDatabaseConfiguration Assistant when a database is createdFinished runninggeneric part of root script.Nowproduct-specific root actions will be performed.Finishedproduct-specific root actions.Finishedproduct-specific root actions.[root@qhdb2 ~]#OK执行完毕、你可以查看日志。YES!配置监听,我觉得我们使用默认的监听即可免费主机域名。不需要做任何修改[root@qhdb2response]# less netca.rsp | grep -v”#” |grep -v “^$”[GENERAL]RESPONSEFILE_VERSION=”11.2″CREATE_TYPE=”CUSTOM”[oracle.net.ca]INSTALLED_COMPONENTS={“server”,”net8″,”javavm”}INSTALL_TYPE=””typical””LISTENER_NUMBER=1LISTENER_NAMES={“LISTENER”}LISTENER_PROTOCOLS={“TCP;1521”}LISTENER_START=””LISTENER””NAMING_METHODS={“TNSNAMES”,”ONAMES”,”HOSTNAME”}NSN_NUMBER=1NSN_NAMES={“EXTPROC_CONNECTION_DATA”}NSN_SERVICE={“PLSExtProc”}NSN_PROTOCOLS={“TCP;HOSTNAME;1521”}[root@qhdb2response]#创建监听[oracle@qhdb2database]$ $ORACLE_HOME/bin/netca -silent -responseFile/dir/database/response/netca.rsp Parsing commandline arguments: Parameter “silent” = true Parameter “responsefile” =/dir/database/response/netca.rspDone parsingcommand line arguments.Oracle Net ServicesConfiguration:Profileconfiguration complete.Oracle Net ListenerStartup: Running Listener Control: /u01/app/oracle/product/11.2.4/db_home1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully.Listenerconfiguration complete.Oracle Net Servicesconfiguration successful. The exit code is 0OK 监听已经完成。[oracle@qhdb2database]$ lsnrctl statusLSNRCTL for Linux:Version 11.2.0.4.0 – Production on 09-DEC-2016 10:29:07Copyright (c) 1991,2013, Oracle. All rights reserved.Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))STATUS of theLISTENER————————Alias LISTENERVersion TNSLSNR for Linux: Version11.2.0.4.0 – ProductionStart Date 09-DEC-2016 10:28:20Uptime 0 days 0 hr. 0 min. 47 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener ParameterFile /u01/app/oracle/product/11.2.4/db_home1/network/admin/listener.oraListener LogFile/u01/app/oracle/diag/tnslsnr/qhdb2/listener/alert/log.xmlListening EndpointsSummary…(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=qhdb2)(PORT=1522)))The listenersupports no servicesThe commandcompleted successfully启动监听OK 。接下来我们就是静默安装建库 DBCA[root@qhdb2response]# less dbca.rsp | grep -v”#” |grep -v “^$”[GENERAL]RESPONSEFILE_VERSION= “11.2.0”OPERATION_TYPE =”createDatabase”[CREATEDATABASE]GDBNAME =”orcl11g.us.oracle.com” 实例名+主机名SID =”orcl11g”TEMPLATENAME =”General_Purpose.dbc”[createTemplateFromDB]SOURCEDB =”myhost:1521:orcl”SYSDBAUSERNAME =”system”TEMPLATENAME =”My Copy TEMPLATE”[createCloneTemplate]SOURCEDB =”orcl”TEMPLATENAME =”My Clone TEMPLATE”[DELETEDATABASE]SOURCEDB =”orcl”[generateScripts]TEMPLATENAME =”New Database”GDBNAME =”orcl11.us.oracle.com”[CONFIGUREDATABASE][ADDINSTANCE]DB_UNIQUE_NAME = “orcl11g.us.oracle.com”NODELIST=SYSDBAUSERNAME =”sys”[DELETEINSTANCE]DB_UNIQUE_NAME =”orcl11g.us.oracle.com”INSTANCENAME =”orcl11g”SYSDBAUSERNAME =”sys”这是dbca.rsp响应文件在这里、我们可以修改。以下是我的dbca.rsp相应文件 大家可以参考借鉴[GENERAL]RESPONSEFILE_VERSION= “11.2.0”OPERATION_TYPE =”createDatabase”[CREATEDATABASE]GDBNAME =”db2.qhdb2″SID =”db2″TEMPLATENAME =”General_Purpose.dbc”[createTemplateFromDB]SOURCEDB =”myhost:1521:db2″SYSDBAUSERNAME =”system”TEMPLATENAME =”My Copy TEMPLATE”[createCloneTemplate]SOURCEDB =”db2″TEMPLATENAME =”My Clone TEMPLATE”CHARACTERSET=”ZHS16GBK” 这是我加上去的[DELETEDATABASE]SOURCEDB =”db2″[generateScripts]TEMPLATENAME =”New Database”GDBNAME =”db2.qhdb2″[CONFIGUREDATABASE][ADDINSTANCE]DB_UNIQUE_NAME = “db2.qhdb2”NODELIST=SYSDBAUSERNAME =”sys”[DELETEINSTANCE]DB_UNIQUE_NAME =”db2.qhdb2″INSTANCENAME =”db2″SYSDBAUSERNAME =”sys”开始执行建库[oracle@qhdb2database]$ $ORACLE_HOME/bin/dbca -silent -responseFile /dir/database/response/dbca.rsp Enter SYS userpassword: Enter SYSTEM userpassword:[oracle@qhdb2database]$ $ORACLE_HOME/bin/dbca -silent -responseFile /dir/database/response/dbca.rsp Enter SYS userpassword: Enter SYSTEM userpassword: Copying databasefiles1% complete3% complete11% complete18% completeOK[oracle@qhdb2database]$ $ORACLE_HOME/bin/dbca -silent -responseFile /dir/database/response/dbca.rsp Enter SYS userpassword: Enter SYSTEM userpassword: Copying databasefiles1% complete3% complete11% complete18% complete26% complete37% completeCreating andstarting Oracle instance40% complete45% complete50% complete55% complete56% complete60% complete62% completeCompleting DatabaseCreation66% complete70% complete73% complete85% complete96% complete100% completeLook at the logfile “/u01/app/oracle/cfgtoollogs/dbca/db2/db2.log” for furtherdetails. 这是日志信息:注意要查看日志信息哦!安珅曾经就不喜欢查看日志、一些简单的报信息不留心 在工作中就遇到过不开心的事情哦![oracle@qhdb2database]$[oracle@qhdb2 ~]$ps -fle | grep pmon0 S oracle 405311 0 80 0- 470537 poll_s 10:46 ? 00:00:00ora_pmon_db20 S oracle 40601 308870 80 0 – 25811 pipe_w 10:47 pts/1 00:00:00 grep pmonOK instancename 已经OK我们登录数据库进行查看。并修改一些参数信息。一定哦。因为这些我们虽然已经建库OK 了,但是在成产环境中 我们还是需要一些参数的修改。注意:修改前一定要备份好 参数文件哦[oracle@qhdb2 ~]$cp /u01/app/oracle/product/11.2.4/db_home1/dbs/spfiledb2.ora/u01/app/oracle/product/11.2.4/db_home1/dbs/spfiledb2.ora.bak这也是安珅的一个个人习惯、做什么事情之前都需要备份。[oracle@qhdb2 ~]$export ORACLE_SID=db2[oracle@qhdb2 ~]$sqlplus / as sysdbaSQL*Plus: Release11.2.0.4.0 Production on Fri Dec 9 10:50:03 2016Copyright (c) 1982,2013, Oracle. All rights reserved.Connected to:Oracle Database 11gEnterprise Edition Release 11.2.0.4.0 – 64bit ProductionWith the Partitioning,OLAP, Data Mining and Real Application Testing optionsSQL> SQL> show userUSER is”SYS”SQL> selectstatus from v$instance;STATUS————OPENSQL>SQL> show parameter processses;SQL> alter system set processes=300 scope=spfile;System altered. 设置最大连接数SQL> altersystem set recyclebin=off scope=spfile;System altered. 关闭回收站SQL> altersystem set audit_trail=none scope=spfile;System altered. 关闭审计功能。开启归档设置SGA
关于“oracle 11G如何静默安装”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
这篇文章主要讲解了“Oracle的各种文件有什么重要性”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Oracle的各种文件有什么重要性”吧!控制文件中存放数据库的名字和状态信息、数据库的物理结构信息、免费主机域…