在linux命令列安裝oracle11g____小程式

來源:互聯網
上載者:User

轉自:http://blog.itpub.net/21582653/viewspace-716034/

Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE</w:LidThemeComplexScript. MicrosoftInternetExplorer4 <style. /* Style. Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif";} </style.

環境描述:

系統:CentOS 5.6

資料庫:oracle database 11g 1R

實體記憶體: 4GB

 

一:環境設定

1.1   檢查伺服器硬體資源

Linux系統(x86-32)下的硬體要求

實體記憶體:最少1GB

互動空間:實體記憶體為1GB至2GB之間時,互動空間為實體記憶體的1.5倍;實體記憶體為2GB至8GB之間時,互動空間為實體記憶體的1倍;實體記憶體為8GB以上時,互動空間為實體記憶體的0.75倍。

磁碟空間:企業版4.35GB;標準版3.22GB;自訂(最大值):3.45GB

1.2   作業系統環境設定

X86(32位)Red Hat Enterise 5.0、CentOS5.0需要的安裝包:

binutils-2.17.50.0.6-14.el5

elfutils-libelf-0.137-3.el5

elfutils-libelf-devel-0.137-3.el5

gcc-4.1.2-50.el5

gcc-c++-4.1.2-50.el5

glibc-2.5-58.el5_6.4

glibc-common-2.5-58.el5_6.4

glibc-devel-2.5-58.el5_6.4

glibc-headers-2.5-58.el5_6.4

libaio-devel-0.3.106-5

libaio-0.3.106-5

libgcc-4.1.2-50.el5

libstdc++-4.1.2-50.el5

libstdc++-devel-4.1.2-50.el5

make-3.81-3.el5

sysstat-7.0.2-3.el5

unixODBC-2.2.11-7.1

unixODBC-devel-2.2.11-7.1

1.3   核心參數設定

將以下參數設定加入/etc/sysctl.conf中,這樣每次作業系統啟動時,便會自動化佈建這些核心參數,而不需要每次都人工設定。

# vi  /etc/sysctl.conf

fs.file-max = 6553600

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 262144

 

使用sysctl –p 命令使 /etc/sysctl.conf設定值生效。

1.4   設定系統資源限制

假設未來由oracle這個系統使用者安裝 Orace Database 11g,則系統管理員需要將以下參數添加到 /etc/security/limits.conf中

# vi  /etc/security/limits.conf

oracle  soft  nproc  2047

oracle  hard  nproc  16384

oracle  soft   nofile  1024

oracle  hard   nofile  65536

 

接著,設定 /etc/pam.d/login,啟動系統資源限制。

# vi  /etc/pam.d/login

session  required   /lib/security/pam_limits.so

session  required   pam_limits.so

 

最後,為了能讓每個使用者在每次登陸系統之後,都能自動化佈建其最大可啟動進程數與最多可開啟檔案數,設定 /etc/profile。

# vi  /etc/profile

if  [ $USER = “oracle”  ] ; then

   if  [  $SHELL = “/bin/ksh”  ]; then

      ulimit –p  16384

       ulimit  -n  65536

   else

      ulimit –u 16384  -n 65536

   fi

fi

 

 

1.5   網路設定

安裝oracle database 11g 的伺服器必須有固定的IP地址。

 

1.6   建立使用者組與使用者賬戶

# groupadd  oinstall

#groupadd   dba

#groupadd   oper

#useradd  -g  oinstall  -G   dba,oper  oracle

#passwd  oracle

 

設定使用者環境變數

將下列設定添加到 /home/oracle/.bash_profile 檔案中

#  vi   /home/oracle/.bash_profile

umask 022

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1

ORACLE_SID=orcl

PATH=$ORACLE_HOME/bin:$PATH

export PATH

export ORACLE_BASE ORACLE_HOME ORACLE_SID

export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

 

設定安裝路徑

# mkdir  -p  /home/u01/app/oracle/product/11.1.0

# mkdir  -p  /home/u01/oradata

#chmod  -R  775  /home/u01

#chown   -R  oracle.oinstall  /home/u01

 

二、安裝 Oracle Database   11g  R1

把orace database 11g r1  的安裝包下載到 oracle使用者的家目錄解壓,解壓後的檔案夾為database

# unzip   linux_11gR1_database_1013.zip

 

修改靜默安裝的應答檔案

# vi  database/install/response/ee.rsp

ORACLE_BASE="/home/u01/app"

ORACLE_HOME="/home/u01/app/oracle/product/11.1.0/db_1"

ORACLE_HOME_NAME="orarch"

 

切換為oracle 使用者,以靜默方式執行安裝指令碼,在安裝過程中如果沒有錯誤不會有資訊輸出,最後會輸出請運行root.sh指令碼的資訊。

# su  -  oracle

$cd   database

$ ./runInstaller -responseFile /home/oracle/linux_11gR1/database/install/response/ee.rsp –silent

 

輸出請運行root.sh指令碼的資訊時,開啟另一個終端以root身份運行/home/u01/app/oracle/product/11.1.0/db_1指令碼。

運行完root.sh指令碼後在安裝的終端中斷行符號既完成安裝。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.