已閱讀5頁,還剩15頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
SUSE Linux Enterprise 11SP1靜默安裝Oracle 11gR2說明文檔1 準備oracle安裝文件Oracle11gR2包含兩個文件linux_11gR2_database_1of2.zip和linux_11gR2_database_2of2.zip,下載地址分別是:/otn/linux/oracle11g/R2/linux_11gR2_database_1of2.zip/otn/linux/oracle11g/R2/linux_11gR2_database_2of2.zip下載完成后將這兩個文件通過SSH上傳到/usr/local/oracle中。解壓安裝文件到當前目錄rootlocalhost root#cd /usr/local/oraclerootlocalhost oracle#unzip linux_11gR2_database_1of2.ziprootlocalhost oracle#unzip linux_11gR2_database_2of2.zip執(zhí)行以上命令后,將會在/usr/local/oracle/下面產(chǎn)生名為database的目錄,這就是oracle安裝程序的目錄。2 準備oracle的安裝目標目錄rootlocalhost oracle#mkdir p /opt/oracle安裝目標目錄是用戶想將oracle安裝到哪個位置的目錄,本次我們將oracle安裝到/opt/oracle目錄中,以下為目錄創(chuàng)建命令。3 創(chuàng)建oracle相關(guān)用戶和用戶組oracle不能在root帳戶下進行安裝,所以需要為oracle的安裝專門創(chuàng)建一個用戶,同時需要創(chuàng)建dba和oinstall的用戶組。rootlocalhost oracle#groupadd dbarootlocalhost oracle#groupadd oinstall以下命令將創(chuàng)建dba和oinstall用戶組:以下命令將創(chuàng)建oracle用戶,并設(shè)置密碼rootlocalhost oracle#useradd -g oinstall -G dba oraclerootlocalhost oracle#passwd oracleChanging password for user oracle.New UNIX password: 在此鍵入密碼BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password: 在此再次鍵入密碼passwd: all authentication tokens updated successfully.創(chuàng)建oracle用戶home目錄rootlocalhost oracle# md /home/oraclerootlocalhost oracle# chown -R oracle:oinstall /home/oracle以下命令將oracle安裝目錄(/opt/oracle)賦予oracle用戶oinstall用戶組rootlocalhost oracle#chown R oracle:oinstall /opt/oracle4 檢查安裝ORACLE依賴的RPM軟件包oracle的安裝所依賴的軟件包,有一部分linux是沒有安裝的。這需要將這些尚未安裝的軟件包先安裝后才能正常安裝oracle。這些未安裝的軟件包在linux安裝光盤上可以取到,我們直接在linux的光盤上對這些軟件包進行安裝(也可將所需的軟件包直接復(fù)制到linux本地磁盤中),首先我們需要掛載linux光盤,使用以下命令:rootlocalhost oracle#mkdir /mnt/cdromrootlocalhost oracle#mount /dev/cdrom /mnt/cdrom安裝所缺少的軟件包,此處只安裝本linux系統(tǒng)所缺少的軟件包。如oracle安裝過程中,對軟件包進行檢查時,發(fā)現(xiàn)仍有所需軟件包未安裝時,可根據(jù)顯示未安裝軟件包的名字,再次對所缺少的軟件包進行安裝。以下為安裝命令:rootlocalhost oracle#rpm -ivh linux-kernel-headers-2.6.32-1.4.13.noarch.rpmrootlocalhost oracle#rpm -ivh glibc-devel-2.11.1-0.17.4.i586.rpmrootlocalhost oracle#rpm -ivh gcc43-4.3.4_20091019-0.7.35.i586.rpmrootlocalhost oracle#rpm -ivh gcc-4.3-62.198.i586.rpmrootlocalhost oracle#rpm -ivh libstdc+43-devel-4.3.4_20091019-0.7.35.i586.rpmrootlocalhost oracle#rpm -ivh gcc43-c+-4.3.4_20091019-0.7.35.i586.rpmrootlocalhost oracle#rpm -ivh gcc-c+-4.3-62.198.i586.rpmrootlocalhost oracle#rpm -ivh sysstat-8.1.5-7.9.56.i586.rpmrootlocalhost oracle#rpm -ivh libaio-devel-0.3.109-0.1.46.i586.rpmrootlocalhost oracle#rpm -ivh libstdc+-devel-4.3-62.198.i586.rpmrootlocalhost oracle#rpm -ivh unixODBC-2.2.12-198.17.i586.rpmrootlocalhost oracle#rpm -ivh unixODBC-devel-2.2.12-198.17.i586.rpm5 設(shè)置linux內(nèi)核參數(shù)打開修改/etc/sysctl.conf,在最后加入以下內(nèi)容kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.wmem_max = 1048576fs.aio-max-nr = 1048576有的時候我們需要調(diào)整oracle數(shù)據(jù)庫的最大鏈接數(shù),而這個鏈接數(shù)的調(diào)整是在oacle下的dbs目錄下init.ora文件中調(diào)整的。ORACLE的連接數(shù)(sessions)與其參數(shù)文件中的進程數(shù)(process)有關(guān),它們的關(guān)系如下:sessions=(1.1*process+5)但是我們增加process數(shù)時,往往數(shù)據(jù)庫不能啟動了。這因為我們還漏調(diào)了一個unix系統(tǒng)參數(shù):它是核心參數(shù)中的semmns,這是unix系統(tǒng)的信號量參數(shù)。每個process會占用一個信號量。semmns調(diào)整后,需要重新啟動unix操作系統(tǒng),參數(shù)才能生效。不過它的大小會受制于硬件的內(nèi)存或 ORACLE SGA。范圍可從2002000不等。但是,Processes的修改不僅應(yīng)該調(diào)整init.ora文件中的參數(shù),而且應(yīng)該調(diào)整OS的內(nèi)核參數(shù),象 AIX,HPUX,Solaris,SCO,UNIXWare都是這樣,OS的調(diào)整是需要重新啟動的,而且這個參數(shù)的設(shè)置不能簡單按照多少個終端要連到這個服務(wù)器上而定,最關(guān)鍵是考慮會有多少同時連上的session(在使用一些共享連接的中間件時,一般就不需要太大),當然還要考慮一些Oracle的后臺進程,還有一些系統(tǒng)維護工作需要多一些連接等。我的atmp大前置機器上對oracle調(diào)整的時候,其使用的是unixware操作系統(tǒng),在做鏈接數(shù)調(diào)整的時候,要先對核心參數(shù)進行調(diào)整。核心主要相關(guān)的參數(shù)的調(diào)整如下:SHMMAX 1000000000SHMMIN 1SHMMNI 200SHMSEG 15SEMMNI 1000SEMMSL 300SEMMNS 230SEMOPM 20其中semmni,semmns,semmsl要加大,至少要比processes大18 ; SEMMNI(10,10000;150):指定在核心中信號識別的數(shù)量。這是可以在任意給定時間被激活的唯一信號設(shè)置數(shù)量。缺省值是150。最大值由系統(tǒng)自動調(diào)整產(chǎn)生。SEMMSL(25,300;150):指定每個信號識別中信號量的最大值。缺省值是25。SEMMNS 除最大db外的所有db 的PROCESSES之和+2*最大db的PROCESSES+10*實例數(shù)。如3個實例進程數(shù)分別為100、100、200,則=(100+100)+2*200+10*3=630SEMOPM(10,20;10):指定在每個系統(tǒng)調(diào)用semop中能夠被執(zhí)行的信號操作量的最大值。缺省值是10。SHMMAX(131072,1073741824;524288):指定了共享內(nèi)存部分大小的最大值。等于0.5物理內(nèi)存字節(jié)數(shù)SHMMNI(10,1000;100):指定了系統(tǒng)范圍內(nèi)共享內(nèi)存標識的最大值。SHMSEG(6,15;6):指定了與每個進程相關(guān)連的共享內(nèi)存塊(或標識)的數(shù)量。缺省值是6。與每個進程相關(guān)連的共享內(nèi)存塊的最大值與進程擁有的未使用空間有關(guān)。因此,盡管一個進程擁有少于SHMSEG數(shù)值的共享內(nèi)存塊,它也有可能因為其有限的空間而不能與其它進程相聯(lián)系。init.ora中調(diào)整為:processes = 50 # SMALL#processes = 100 # MEDIUM#processes = 200 # LARGE輸入以下命令,使配置生效rootlocalhost oracle#sysctl -p6 修改 /etc/security/limits.conf修改 /etc/security/limits.conf,加入內(nèi)容oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 655367 修改系統(tǒng)環(huán)境變量/etc/profile修改環(huán)境變量/etc/profile,加入以下內(nèi)容if $USER = oracle ; thenif $SHELL = /bin/ksh ; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi8 修改hosts文件lihaolong: # vi /etc/hosts增加一行 lihaolong9 增加/dev/shmMEMORY_MAX_TARGET 的設(shè)置不能超過 /dev/shm 的大小編輯fstab,添加一行:vi /etc/fstabtmpfs /dev/shm tmpfs defaults,size=1024m 0 0重新掛載來修改其大小mount -o remount /dev/shm10 修改suse版本lihaolong:/home/database # vi /etc/SuSE-releaseSUSE Linux Enterprise Server 11 (i586)VERSION = 9(等號后面要有個空格)PATCHLEVEL = 111 開始安裝過程應(yīng)答文件:注:安裝oracle的目錄,至少具備4G的空閑空間rootlocalhost oracle # su oracleoraclelocalhost oracle #cd /usr/local/oracle/database運行安裝命令oraclelocalhost database # ./runInstaller -silent -responseFile /home/database/response/db_install.rsp以下為ORACLE安裝程序輸出的結(jié)果Starting Oracle Universal Installer.Checking Temp space: must be greater than 80 MB. Actual 10176 MB PassedChecking swap space: must be greater than 150 MB. Actual 2047 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-31_09-41-19AM. Please wait .oraclelihaolong:/home/database WARNING INS-32018 The selected Oracle home is outside of Oracle base. CAUSE: The Oracle home selected was outside of Oracle base. ACTION: Oracle recommends installing Oracle software within the Oracle base directory. Adjust the Oracle home or Oracle base accordingly.WARNING INS-13014 Target environment do not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2011-05-31_09-41-19AM/installActions2011-05-31_09-41-19AM.log ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2011-05-31_09-41-19AM/installActions2011-05-31_09-41-19AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.WARNING INS-32018 The selected Oracle home is outside of Oracle base. CAUSE: The Oracle home selected was outside of Oracle base. ACTION: Oracle recommends installing Oracle software within the Oracle base directory. Adjust the Oracle home or Oracle base accordingly.WARNING INS-13014 Target environment do not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2011-05-31_09-41-19AM/installActions2011-05-31_09-41-19AM.log ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2011-05-31_09-41-19AM/installActions2011-05-31_09-41-19AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.You can find the log of this install session at: /opt/oracle/oraInventory/logs/installActions2011-05-31_09-41-19AM.log日志文件位置可通過執(zhí)行以下命令,查看安裝進度oraclelocalhost database #tail -f /opt/oracle/oraInventory/logs/installActions2011-05-31_09-41-19AM.logoracle軟件安裝成功后,切換到root用戶,執(zhí)行以下2個腳本:/opt/oracle/oraInventory/orainstRoot.sh/opt/oracle/product/11.2.0/db_1/root.sh12 安裝監(jiān)聽器應(yīng)答文件:lihaolong:/opt/oracle/product/11.2.0/db_1/bin # ./netca /silent /responseFile /home/database/response/netca.rspParsing command line arguments: Parameter silent = true Parameter responsefile = /home/database/response/netca.rspDone parsing command line arguments.Oracle Net Services Configuration:Configuring Listener:LISTENERListener configuration complete.Oracle Net Listener Startup: Running Listener Control: /opt/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully.Profile configuration complete.Oracle Net Services configuration successful. The exit code is 0在安裝完成后,需要將oracle目錄的文件夾權(quán)限修改為755, 這樣其他有ORACLE環(huán)境的用戶可以連接數(shù)據(jù)庫。 2012020113 創(chuàng)建數(shù)據(jù)庫應(yīng)答文件:lihaolong:/opt/oracle/product/11.2.0/db_1/bin # ./dbca -silent -responseFile /home/database/response/dbca.rsp Copying database files1% complete2% complete3% complete4% complete37% completeCreating and starting Oracle instance38% complete40% complete41% complete46% complete51% complete56% complete57% complete58% complete61% complete62% completeCompleting Database Creation66% complete70% complete73% complete74% complete85% complete86% complete87% complete88% complete99% complete100% completeLook at the log file /opt/oracle/cfgtoollogs/dbca/orcl/orcl.log for further details.14 設(shè)置ORACLE環(huán)境變量切換至root用戶修改全局環(huán)境變量配置文件profile。使用以下命令rootlocalhost oracle#vi /etc/profile往配置文件中加入以下內(nèi)容export ORACLE_BASE=/opt/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=orclexport PATH=$PATH:$ORACLE_HOME/bin使環(huán)境變量配置生效(分別在root、oracle用戶下執(zhí)行)rootlocalhost oracle# source /etc/profile15 啟動ORACLE完成以上操作時,建議重新啟動一次,避免某些設(shè)置未生效。重啟后使用oracle用戶登錄,打開終端,鍵入以下命令運行sqlplusoraclelihaolong:/opt/oracle/admin/orcl/pfile sqlplus /nologSQL*Plus: Release .0 Production on Tue May 31 11:04:50 2011Copyright (c) 1982, 2009, Oracle. All rights reserved.SQL conn /as sysdbaConnected to an idle instance.SQL startupORACLE instance started.Total System Global Area 414298112 bytesFixed Size 1336904 bytesVariable Size 255855032 bytesDatabase Buffers 150994944 bytesRedo Buffers 6111232 bytesDatabase mounted.Database opened.SQL恭喜,你的ORACLE數(shù)據(jù)庫已經(jīng)啟動成功!現(xiàn)在可以休息一下了。全部完成后,再把suse的版本號改回去16 異常解決16.1 ORA-01102這個錯誤主要是lk文件造成的,該文件位于ORALCE_HOME下的dbs目錄下,這個lk的主要作用是說明DATABASE MOUNT上了,不用在MOUNT了.DATABASE UNMOUNT 后會刪除掉,如果DATABASE確實沒有MOUNT,這個文件在你也MOUNT上,只有手工刪除,所以一定要小心.具體解決ORA-01102問題的步驟:oraclelihaolong:/opt/oracle/product/11.2.0/db_1/dbs ls -ltotal 36-rw-rw- 1 oracle oinstall 1544 May 31 10:37 hc_DBUA0.dat-rw-rw- 1 oracle oinstall 1544 May 31 11:05 hc_ORCL.dat-rw-rw- 1 oracle oinstall 1544 May 31 10:42 hc_orcl.dat-rw-r-r- 1 oracle oinstall 2851 May 15 2009 initORCL.ora-rw-r- 1 oracle oinstall 24 May 31 10:40 lkORCL-rw-r- 1 oracle oinstall 1536 May 31 10:41 orapworcldrwx- 2 oracle oinstall 4096 May 31 10:36 peshm_DBUA0_0drwx- 2 oracle oinstall 4096 May 31 10:37 peshm_orcl_0-rw-r- 1 oracle oinstall 2560 May 31 11:02 spfileorcl.oraoraclelihaolong:/opt/oracle/product/11.2.0/db_1/dbs fuser -u lkORCL/opt/oracle/product/11.2.0/db_1/dbs/lkORCL: 14588(oracle) 14594(oracle) 14598(oracle) 14600(oracle) 14604(oracle) 14606(oracle) 14608(oracle) 14610(oracle) 14612(oracle) 14614(oracle) 14616(oracle) 14618(oracle) 14664(oracle) 14683(oracle) 14685(oracle) 14687(oracle) 14759(oracle) 15300(oracle)該文件沒釋放,用fuser命令kill掉:oraclelihaolong:/opt/oracle/product/11.2.0/db_1/dbs fuser -k lkORCL/opt/oracle/product/11.2.0/db_1/dbs/lkORCL: 14588 14594 14598 14600 14604 14606 14608 14610 14612 14614 14616 14618 14664 14683 14685 14687 14759 15300oraclelihaolong:/opt/oracle/product/11.2.0/db_1/dbs fuser -u lkORCLSQL startup pfile=/opt/oracle/admin/orcl/pfile/init.ora.4312011104150ORACLE instance started.Total System Global Area 414298112 bytesFixed Size 1336904 bytesVariable Size 255855032 bytesDatabase Buffers 150994944 bytesRedo Buffers 6111232 bytesDatabase mounted.Database opened.SQL17 附件:Db_install.rsp范例# Copyright(c) Oracle Corporation 1998,2008. All rights reserved.# # Specify values for the variables listed below to customize # your installation. # # Each variable is associated with a comment. The comment # can help to populate the variables with the appropriate # values. # # IMPORTANT NOTE: This file contains plain text passwords and # should be secured to have read permission only by oracle user # or db administrator who owns this installation. # #-# Do not change the following system generated value. #-oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0#-# Specify the installation option.# It can be one of the following:# 1. INSTALL_DB_SWONLY# 2. INSTALL_DB_AND_CONFIG# 3. UPGRADE_DB#-oracle.install.option=INSTALL_DB_AND_CONFIG#-# Specify the hostname of the system as set during the install. It can be used# to force the installation to use an alternative hostname rather than using the# first hostname found on the system. (e.g., for systems with multiple hostnames # and network interfaces)#-ORACLE_HOSTNAME=smdw#-# Specify the Unix group to be set for the inventory directory. #-UNIX_GROUP_NAME=oinstall#-# Specify the location which holds the inventory files.#-INVENTORY_LOCATION=/opt/oracle/inventory#-# Specify the languages in which the components will be installed. # en : English ja : Japanese # fr : French ko : Korean # ar : Arabic es : Latin American Spanish # bn : Bengali lv : Latvian # pt_BR: Brazilian Portuguese lt : Lithuanian # bg : Bulgarian ms : Malay # fr_CA: Canadian French es_MX: Mexican Spanish # ca : Catalan no : Norwegian # hr : Croatian pl : Polish # cs : Czech pt : Portuguese # da : Danish ro : Romanian # nl : Dutch ru : Russian # ar_EG: Egyptian zh_CN: Simplified Chinese # en_GB: English (Great Britain) sk : Slovak # et : Estonian sl : Slovenian # fi : Finnish es_ES: Spanish # de : German sv : Swedish # el : Greek th : Thai # iw : Hebrew zh_TW: Traditional Chinese # hu : Hungarian tr : Turkish # is : Icelandic uk : Ukrainian # in : Indonesian vi : Vietnamese # it : Italian # Example : SELECTED_LANGUAGES=en,fr,ja#-SELECTED_LANGUAGES=en#-# Specify the complete path of the Oracle Home.#-ORACLE_HOME=/opt/oracle/product/11.2.0#-# Specify the complete path of the Oracle Base. #-ORACLE_BASE=/opt/oracle#-# Specify the installation edition of the component. # # The value should contain only one of these choices. # EE : Enterprise E
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 分居不分手協(xié)議3篇
- 辦公用品購銷協(xié)議書示例3篇
- 學(xué)校食堂和小賣部承包合同3篇
- 協(xié)作研發(fā)合同書3篇
- 草場買賣合同范例
- 外賣合作合同版3篇
- 營銷代運營合同范例
- 豆制品加盟合同范例
- 會議搭建合同范例
- 專利轉(zhuǎn)讓合同范例
- (完整)標前協(xié)議
- 房產(chǎn)公司15周年年會主持詞5篇
- T-SZWA 001-2017 高分子益膠泥
- 五年級上冊英語試題- unit1 Did you come back yesterday- 外研社(含答案)
- GB/T 16571-2012博物館和文物保護單位安全防范系統(tǒng)要求
- GB/T 10002.3-2011給水用硬聚氯乙烯(PVC-U)閥門
- 2023年電大建筑制圖基礎(chǔ)??票匦奁谀┰囶}及答案
- 離合器的相關(guān)計算
- 血細胞分析儀的應(yīng)用及形態(tài)學(xué)復(fù)檢
- 第5章 一元函數(shù)的導(dǎo)數(shù)及其應(yīng)用【知識導(dǎo)圖 】 高考數(shù)學(xué)復(fù)習(xí)思維導(dǎo)圖(人教A版2019)(必修第一冊)
- DB11-T1835-2021 給水排水管道工程施工技術(shù)規(guī)程高清最新版
評論
0/150
提交評論