In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to install oracle 11G silently. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
First, upload:
Upload two database packages to the / dir directory
Unzip p13390677_112040_Linux-x86-64_1of7.zip
Unzip p13390677_112040_Linux-x86-64_2of7.zip
Please remember that one of these two packages is unzipped.
[root@qhdb2 dir] # groupadd oinstall create installation group
[root@qhdb2 dir] # useradd-g oinstall-d / home/oracle oracle create installation user oracle
[root@qhdb2 dir] # echo oracle | passwd-- stdin oracle assigns oracle user a password of: oracle
Edit oracle parameter file
[oracle@qhdb2 ~] $more .bash _ profile
# .bash _ profile
# Get the aliasesand functions
If [- f ~ / .bashrc]; then
. ~ / .bashrc
Fi
# User specificenvironment and startup programs
PATH=$PATH:$HOME/bin
Export PATH
ExportORACLE_BASE=/u01/app/oracle
ExportORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1
ExportORACLE_SID=db2
Export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
ExportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-p 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Umask 022
The red part is required in previous versions of oracle11GR2 and may not be written after oracle11GR2.
Vim / etc/sysctl.conf is added as follows:
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 25032000 100128
Net.ipv4.ip_local_port_range= 9000 65500
Net.core.rmem_default= 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default= 262144
Net.core.wmem_max = 1048576
Edit the following file
[root@qhdb2 ~] # more/etc/security/limits.conf
# for oracle
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
# for grid
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
I don't have GI installed here, so I don't have to write it.
I won't say much about installing the RPM package here.
[oracle@qhdb2 ~] $mkdir-pv / u01/app/oracle/product/11.2.4/db_home1
Mkdir: created directory `/ u01ActionApp
Mkdir: created directory `/ u01Compact oracle'
Mkdir: created directory` / u01ActionPlacement product'
Mkdir: created directory` / u01ActionActionPlacleUniverse 11.2.4'
Mkdir: created directory `/ u01amp appActionoracleUniverse produce 11.2.4Uniplex dbroomhome1'
/ u01/app/oracle/product/11.2.4/db_home1 this is my oracle_home directory
/ u01/app/oracle this is my oracle_base directory
Edit the response file for the silent installation:
There is a response file in the database file you unzipped
You just need to edit it.
[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_0
Oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=qhdb2
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1
ORACLE_BASE=/u01/app/oracle
Oracle.install.db.InstallEdition=EE
Oracle.install.db.EEOptionsSelection=false
Oracle.install.db.optionalComponents=
Oracle.install.db.DBA_GROUP=oinstall
Oracle.install.db.OPER_GROUP=oinstall
Oracle.install.db.CLUSTER_NODES=
Oracle.install.db.isRACOneInstall=false
Oracle.install.db.racOneServiceName=
Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
Oracle.install.db.config.starterdb.globalDBName=
Oracle.install.db.config.starterdb.SID=
Oracle.install.db.config.starterdb.characterSet=
Oracle.install.db.config.starterdb.memoryOption=false
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=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
Oracle.installer.autoupdates.option=SKIP_UPDATES
Oracle.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 Passed
Checking swapspace: must be greater than 150 MB. Actual 8149 MB Passed
Preparing 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-09009-59-49AM.log
The installation ofOracle Database 11g was successful.
Please check'/u01/app/oraInventory/logs/silentInstall2016-12-09mm 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.sh
Successfully SetupSoftware.
OK installation is complete, where it prompts you to execute as root
/ u01/app/oracle/product/11.2.4/db_home1/root.sh
This script.
[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.sh
Check/u01/app/oracle/product/11.2.4/db_home1/install/root_qhdb2_2016-12-09mm 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.log
Performing 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 by
DatabaseConfiguration Assistant when a database is created
Finished runninggeneric part of root script.
Nowproduct-specific root actions will be performed.
Finishedproduct-specific root actions.
Finishedproduct-specific root actions.
[root@qhdb2 ~] #
After the execution of OK, you can check the log. YES!
Configure monitoring, I think we can use the default monitoring. No need to make any changes
[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=1
LISTENER_NAMES= {"LISTENER"}
LISTENER_PROTOCOLS= {"TCP;1521"}
LISTENER_START= "" LISTENER ""
NAMING_METHODS= {"TNSNAMES", "ONAMES", "HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES= {"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE= {"PLSExtProc"}
NSN_PROTOCOLS= {"TCP;HOSTNAME;1521"}
[root@qhdb2response] #
Create a monitor
[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.rsp
Done 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 0
OK snooping is complete.
[oracle@qhdb2database] $lsnrctl status
LSNRCTL for Linux:Version 11.2.0.4.0-Production on 09-DEC-2016 10:29:07
Copyright (c) 1991 Jing 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=EXTPROC1522)
STATUS of theLISTENER
-
Alias LISTENER
Version TNSLSNR for Linux: Version11.2.0.4.0-Production
Start Date 09-DEC-2016 10:28:20
Uptime 0 days 0 hr. 0 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener ParameterFile / u01/app/oracle/product/11.2.4/db_home1/network/admin/listener.ora
Listener LogFile / u01/app/oracle/diag/tnslsnr/qhdb2/listener/alert/log.xml
Listening EndpointsSummary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1522)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=qhdb2) (PORT=1522))
The listenersupports no services
The commandcompleted successfully
Start snooping OK.
The next step is to silently install and build the library 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" instance name + host name
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"
This is the dbca.rsp response file here, which we can modify.
The following is my dbca.rsp corresponding document that you can refer to.
[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" I added this.
[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"
Start to build the database
[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 databasefiles
1% complete
3% complete
11% complete
18% complete
OK
[oracle@qhdb2database] $$ORACLE_HOME/bin/dbca-silent-responseFile / dir/database/response/dbca.rsp
Enter SYS userpassword:
Enter SYSTEM userpassword:
Copying databasefiles
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating andstarting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing DatabaseCreation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the logfile "/ u01/app/oracle/cfgtoollogs/dbca/db2/db2.log" for furtherdetails. This is the log information:
Pay attention to check the log information!
Anyi once did not like to check the log, some simple information did not pay attention to encountered unhappy things at work!
[oracle@qhdb2database] $
[oracle@qhdb2 ~] $ps-fle | grep pmon
0 S oracle 40531 10 800-470537 poll_s 10:46? 00:00:00ora_pmon_db2
0 S oracle 40601 30887 0 800-25811 pipe_w 10:47 pts/1 00:00:00 grep pmon
OK instance name has OK
We log in to the database to check.
And modify some parameter information. I'm sure. Because of these, although we have built a database OK, but in the production environment, we still need to modify some parameters.
Note: be sure to back up the parameter files before modification
[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
This is also a personal habit of Anqi, which needs to be backed up before doing anything.
[oracle@qhdb2 ~] $export ORACLE_SID=db2
[oracle@qhdb2 ~] $sqlplus / as sysdba
SQL*Plus: Release11.2.0.4.0 Production on Fri Dec 9 10:50:03 2016
Copyright (c) 1982 Jing 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11gEnterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning,OLAP, Data Mining and Real Application Testing options
SQL >
SQL > show user
USER is "SYS"
SQL > selectstatus from v$instance
STATUS
-
OPEN
SQL >
SQL > show parameter processses
SQL > alter system set processes=300 scope=spfile
System altered. Set the maximum number of connections
SQL > altersystem set recyclebin=off scope=spfile
System altered. Close the Recycle Bin
SQL > altersystem set audit_trail=none scope=spfile
System altered. Turn off the audit function.
Open archiving
Set up SGA
This is the end of the article on "how to install oracle 11G silently". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 275
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.