這篇文章將為大家詳細(xì)講解有關(guān)oracle 11G如何靜默安裝,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
創(chuàng)新互聯(lián)長(zhǎng)期為近1000家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開(kāi)放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為芙蓉企業(yè)提供專(zhuān)業(yè)的成都做網(wǎng)站、網(wǎng)站設(shè)計(jì),芙蓉網(wǎng)站改版等技術(shù)服務(wù)。擁有10年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開(kāi)發(fā)。首先上傳:
上傳兩個(gè)database軟件包到/dir 目錄下
Unzip p13390677_112040_Linux-x86-64_1of7.zip
Unzip p13390677_112040_Linux-x86-64_2of7.zip
請(qǐng)記住這兩個(gè)軟件包一個(gè)一個(gè)解壓。
[root@qhdb2 dir]#groupadd oinstall創(chuàng)建安裝組
[root@qhdb2 dir]#useradd -g oinstall -d /home/oracle oracle創(chuàng)建安裝用戶oracle
[root@qhdb2 dir]#echo oracle |passwd --stdin oracle賦予oracle用戶密碼為:oracle
編輯oracle參數(shù)文件
[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
標(biāo)紅的部分在oracle11GR2以前版本是必須的、到了oracle11GR2以后版本可以不寫(xiě)。
Vim /etc/sysctl.conf加入如下:
fs.aio-max-nr =1048576
fs.file-max =6815744
kernel.shmall =2097152
kernel.shmmax =4294967295
kernel.shmmni =4096
kernel.sem = 25032000 100 128
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
編輯下面文件
[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
我這里沒(méi)有裝GI,所以可以不用寫(xiě)。
安裝RPM包在這里我就不多說(shuō)了。
[oracle@qhdb2 ~]$ mkdir -pv /u01/app/oracle/product/11.2.4/db_home1
mkdir: 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目錄
編輯靜默安裝的響應(yīng)文件:
在你解壓的database文件里面就有響應(yīng)文件
你只需編輯它即可
[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-09_09-59-49AM.log
The 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.sh
Successfully SetupSoftware.
OK安裝完成、在這里它提示您要以root身份執(zhí)行
/u01/app/oracle/product/11.2.4/db_home1/root.sh
這個(gè)腳本。
[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-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.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 ~]#
OK執(zhí)行完畢、你可以查看日志。YES!
配置監(jiān)聽(tīng),我覺(jué)得我們使用默認(rèn)的監(jiān)聽(tīng)即可。不需要做任何修改
[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]#
創(chuàng)建監(jiān)聽(tīng)
[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監(jiān)聽(tīng)已經(jīng)完成。
[oracle@qhdb2database]$ lsnrctl status
LSNRCTL for Linux:Version 11.2.0.4.0 - Production on 09-DEC-2016 10:29:07
Copyright (c) 1991,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
啟動(dòng)監(jiān)聽(tīng)OK。
接下來(lái)我們就是靜默安裝建庫(kù) 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"實(shí)例名+主機(jī)名
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響應(yīng)文件在這里、我們可以修改。
以下是我的dbca.rsp相應(yīng)文件大家可以參考借鑒
[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"
開(kāi)始執(zhí)行建庫(kù)
[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.這是日志信息:
注意要查看日志信息哦!
安珅曾經(jīng)就不喜歡查看日志、一些簡(jiǎn)單的報(bào)信息不留心在工作中就遇到過(guò)不開(kāi)心的事情哦!
[oracle@qhdb2database]$
[oracle@qhdb2 ~]$ps -fle | grep pmon
0 S oracle 40531 1 0 80 0- 470537 poll_s 10:46 ? 00:00:00ora_pmon_db2
0 S oracle 40601 30887 0 80 0 - 25811 pipe_w 10:47 pts/1 00:00:00 grep pmon
OK instance name已經(jīng)OK
我們登錄數(shù)據(jù)庫(kù)進(jìn)行查看。
并修改一些參數(shù)信息。一定哦。因?yàn)檫@些我們雖然已經(jīng)建庫(kù)OK了,但是在成產(chǎn)環(huán)境中我們還是需要一些參數(shù)的修改。
注意:修改前一定要備份好參數(shù)文件哦
[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
這也是安珅的一個(gè)個(gè)人習(xí)慣、做什么事情之前都需要備份。
[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,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.設(shè)置大連接數(shù)
SQL> altersystem set recyclebin=off scope=spfile;
System altered.關(guān)閉回收站
SQL> altersystem set audit_trail=none scope=spfile;
System altered.關(guān)閉審計(jì)功能。
開(kāi)啟歸檔
設(shè)置SGA
關(guān)于“oracle 11G如何靜默安裝”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
新聞名稱:oracle11G如何靜默安裝-創(chuàng)新互聯(lián)
路徑分享:http://www.rwnh.cn/article22/dcdocc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號(hào)、外貿(mào)網(wǎng)站建設(shè)、品牌網(wǎng)站設(shè)計(jì)、定制開(kāi)發(fā)、面包屑導(dǎo)航、App開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容