在Linux x86-64平臺上安裝oracle 10gR2

tianya_2011發表於2014-09-01
一,檢查硬體需求:

1,實體記憶體:至少1G的實體記憶體
2,SWAP分割槽:(swap分割槽與實體記憶體的關係)
     RAM                                    Swap Space
--------------------------------------------   ---------------------------------------
Up to 512 MB                             2 times the size of RAM
Between 1024 MB and 2048 MB    1.5 times the size of RAM
Between 2049 MB and 8192 MB    Equal to the size of RAM
More than 8192 MB                     0.75 times the size of RAM

3,/tmp:至少400M
4,磁碟空間:至少4G

檢查記憶體:
# grep MemTotal /proc/meminfo

檢查交換分割槽:
# grep SwapTotal /proc/meminfo

檢查/tmp臨時資料夾的空餘空間:
# df -k /tmp  或df -h /tmp

檢查磁碟剩餘空間大小:
# df -k 或df -h

二,檢查軟體環境:

 1,軟體環境要求:
  作業系統版本:Red Hat Enterprise Linux 4.0 (Update 1 or later)
  核心版本:Red Hat Enterprise Linux 4.0的核心版本為2.6.9-11.EL (or later)
  軟體包:Red Hat Enterprise Linux 4.0:
          binutils-2.15.92.0.2-10.EL4
          compat-db-4.1.25-9
          control-center-2.8.0-12
          gcc-3.4.3-9.EL4
          gcc-c++-3.4.3-9.EL4
          glibc-2.3.4-2
          glibc-common-2.3.4-2
          gnome-libs-1.4.1.2.90-44.1
          libstdc++-3.4.3-9.EL4
          libstdc++-devel-3.4.3-9.EL4
          make-3.80-5
          pdksh-5.2.14-30
          sysstat-5.0.5-1
          xscreensaver-4.18-5.rhel4.2
 
   檢查作業系統的版本:# cat /proc/version
   檢查作業系統的核心:# uname -r
   檢查安裝Oracle 10g的作業系統安裝包是否全部安裝:
     #rpm -q binutils-2.15.92.0.2-10.EL4
     #rpm -q compat-db-4.1.25-9
     #rpm -q control-center-2.8.0-12
     #rpm -q gcc-3.4.3-9.EL4
     #rpm -q gcc-c++-3.4.3-9.EL4
     #rpm -q glibc-2.3.4-2
     #rpm -q glibc-common-2.3.4-2
     #rpm -q gnome-libs-1.4.1.2.90-44.1
     #rpm -q libstdc++-3.4.3-9.EL4
     #rpm -q libstdc++-devel-3.4.3-9.EL4
     #rpm -q make-3.80-5
     #rpm -q pdksh-5.2.14-30
     #rpm -q sysstat-5.0.5-1
     #rpm -q xscreensaver-4.18-5.rhel4.2
 
如果有沒有安裝的包,執行rpm -ivh package_name(安裝包的包名)
 
三,建立作業系統組和使用者

   1,檢查dba組是否存在
   # grep dba /etc/group
   如果不存在,建立oinstall和dba組
   # /usr/sbin/groupadd oinstall
   # /usr/sbin/groupadd dba
   
   2,檢查Oracle使用者是否存在
   # id oracle
   如果不存在,新增Oracle使用者並指定相應的組
   # /usr/sbin/useradd -g oinstall -G dba oracle
   
   3,修改Oracle密碼
   # passwd oracle
   
四,配置核心引數

   1,在 /etc/sysctl.conf配置檔案中新增下列行:
   kernel.shmall = 2097152
   kernel.shmmax = 2147483648
   kernel.shmmni = 4096
   kernel.sem = 250 32000 100 128
   fs.file-max = 65536
   net.ipv4.ip_local_port_range = 1024 65000
   net.core.rmem_default = 262144
   net.core.rmem_max = 262144
   net.core.wmem_default = 262144
   net.core.wmem_max = 262144
   修改完以後執行 #/sbin/sysctl -p 來生效
   
   2,在配置檔案 /etc/security/limits.conf 加入下列行:
    oracle           soft    nproc   2047
    oracle           hard    nproc   16384
    oracle           soft    nofile  1024
    oracle           hard    nofile  65536
   
   3,在配置檔案/etc/pam.d/login加入下列行:
    session    required     pam_limits.so
   
   4,在配置檔案 /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,建立目錄:
    #mkdir -p /u01/app/oracle
    2,修改屬組:
    #chown -R oracle:oinstall /u01/app/oracle
3,修改目錄許可權:
chmod -R 775 /u01/app/oracle

六,配置Oracle使用者環境變數:

   $ su - oracle
   $ vi .bash_profile
   umask 022
   export TMP=/tmp
   export PATH
   export ORACLE_BASE=/u01/app/oracle
   export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
   export ORACLE_SID=orcl
   export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
   export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
   
   儲存以後執行 $ . ./.bash_profile生效。
   
 七,安裝Oracle軟體

   1,解壓軟體包
    #su - oracle
$ unzip 10201_database_linux_x86_64.zip
   2,進入解壓目錄,安裝oracle
    $cd database
$./runInstall

------------------------------------------------------------------------------------------------------------------------------------------------------
在安裝oracle 10gR2時,會檢驗作業系統是否符合先決條件,如果檢測作業系統版本不符合要求,可以用以下兩個方法解決。

方法1:安裝時加 ignoreSysPrereqs引數可以跳過作業系統檢測
  $./runinstaller -ignoreSysPrereqs

方法2:修改/etc/redhat-release裡的值

如果是 Oracle Linux 5 and Red Hat Enterprise Linux 5
Original Value Changed Value
Enterprise Release Enterprise Linux server release 5 Enterprise Release Enterprise Linux server release 4
(On Oracle Linux 5)
Red Hat Enterprise Linux server release 5 Red Hat Enterprise Linux server release 4
(On Red Hat Enterprise Linux 5)

如果是SUSE Linux Enterprise Server 10 and SUSE Linux Enterprise Server 11
Original Value Changed Value
SUSE Linux Enterprise Server 10 (x86_64) SUSE Linux Enterprise Server 9 (x86_64)
VERSION = 10 VERSION = 9
SUSE Linux Enterprise Server 11 (x86_64) SUSE Linux Enterprise Server 9 (x86_64)
VERSION = 11 VERSION = 9


  參考:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25373498/viewspace-1261520/,如需轉載,請註明出處,否則將追究法律責任。

相關文章