這裡介紹在Red Hat Enterprise Linux Server release 5.7 (Tikanga)下安裝ORACLE 11.2.0.1.0的過程,本文僅僅是為了寫這樣安裝指導文檔而整理在此。僅供參考! 1:下載對應平臺的ORACLE 11g安裝介質 安裝ORACLE,首先要獲取安裝... ...
這裡介紹在Red Hat Enterprise Linux Server release 5.7 (Tikanga)下安裝ORACLE 11.2.0.1.0的過程,本文僅僅是為了寫這樣安裝指導文檔而整理在此。僅供參考!
1:下載對應平臺的ORACLE 11g安裝介質
安裝ORACLE,首先要獲取安裝介質,大部分情況手頭都有相關版本的安裝介質。如果你手頭沒有安裝介質,那麼可以從下麵鏈接獲取對應平臺的ORACLE安裝介質。
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
強烈建議在安裝ORACLE之前,先看一遍Linux Installation Guides 文檔,畢竟這是最權威、最全面的資料。這樣可以避免你在安裝過程中遇到各類奇奇怪怪的問題,下載鏈接如下所示:
http://docs.oracle.com/cd/E11882_01/nav/portal_11.htm
2:檢查硬體配置是否滿足要求
2.1:記憶體大小要求
官方文檔中,要求物理記憶體至少需要1G,推薦2G或以上配置,如果是伺服器的話,配置肯定比這個高。查看系統記憶體配置,可以使用下麵命令:
檢查物理記憶體
[root@DB-Server ~]# grep MemTotal /proc/meminfo
MemTotal: 3968144 kB
[root@DB-Server ~]# free -m
total used free shared buffers cached
Mem: 3875 710 3164 0 85 317
-/+ buffers/cache: 307 3567
Swap: 5887 0 5887
[root@DB-Server ~]#
Note: On Linux, the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. If you enable HugePages, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space
Linux Swap大小要求(這是一個指導值,最好根據Linux版本供應商的文檔設置。如果不太清楚這些,儘量按照下麵要求設置)
檢查交換空間(Swap)大小(free命令亦可)
[root@DB-Server ~]# grep SwapTotal /proc/meminfo
SwapTotal: 6029304 kB
Automatic Memory Management
從Oracle Database 11g開始,自動記憶體管理(Automatic Memory Management)要求更多的共用記憶體(/dev/shm)和文件描述符(file descriptors),共用記憶體的大小應該只是比MEMROY_MAX_TARGET 和MEMROY_TARGET大。
查看共用記憶體大小
[root@DB-Server ~]# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.9G 927M 1012M 48% /dev/shm
[root@DB-Server ~]#
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup. On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), it results in an ORA-00845 error.
The number of file descriptors for each Oracle instance must be at least 512*PROCESSES. The limit of descriptors for each process must be at least 512. If file descriptors are not sized correctly, you see an ORA-27123 error from various Oracle processes and potentially Linux Error EMFILE (Too many open files)in non-Oracle processes.
註意:MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.
2.2:系統架構要求
檢查系統架構是否符合軟體安裝要求。如果是x86的架構,肯定不能運行64位的ORACLE軟體。檢查系統架構使用下麵命令:
[root@DB-Server ~]# uname -m
x86_64
2.3:磁碟空間要求
At least 1 GB of disk space in the /tmp directory
檢查/tmp目錄大小
#df -h /tmp
檢查磁碟空間:
#df –h
3:Checking the Software Requirements
Red Hat Enterprise Linux 5 and Oracle Linux 5 on Linux x86 and Linux x86-64 require Update 2.
3.1:操作系統要求
Oracle Database 11g Release 1 (11.1) 要求安裝在下麵版本的操作系統或後續版本中。安裝Oracle資料庫是必須檢查目前操作系統版本是否支持。
■ Asianux Server 3 SP2
■ Asianux Server 4 SP3
■ Oracle Linux 4 Update 7
■ Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)
■ Oracle Linux 5 Update 5
■ Oracle Linux 6
■ Oracle Linux 6 (with Red Hat Compatible Kernel)
■ Oracle Linux 7
■ Oracle Linux 7 (with the Red Hat Compatible Kernel)
■ Red Hat Enterprise Linux 4 Update 7
■ Red Hat Enterprise Linux 5 Update 2
■ Red Hat Enterprise Linux 6
■ Red Hat Enterprise Linux 7
■ SUSE Linux Enterprise Server 10 SP2
■ SUSE Linux Enterprise Server 11
■ SUSE Linux Enterprise Server 12 SP1
■ NeoKylin Linux Advanced Server 6
3.2 操作系統內核要求
下麵僅僅列舉了部分內容,更多請見官方文檔
■On Oracle Linux 4 and Red Hat Enterprise Linux 4
2.6.9 or later
■ On Oracle Linux 5 Update 2 with Red Hat Compatible Kernel
2.6.18 or later
■ On Oracle Linux 5 Update 5 with Red Hat Compatible Kernel
2.6.18 or later
■ On Oracle Linux 5 Update 5 with Unbreakable Enterprise Kernel
2.6.32-100.0.19 or later
■ On Oracle Linux 6
2.6.32-100.28.5.el6.x86_64 or later
■ On Oracle Linux 6 with Red Hat Compatible Kernel
2.6.32-71.el6.x86_64 or later
■ On Oracle Linux 7
3.8.13-33.el7uek.x86_64 or later
■ On Oracle Linux 7 with Red Hat Compatible Kernel
3.10.0-54.0.1.el7.x86_64 or later
■ On Red Hat Enterprise Linux 5 Update 2
2.6.18 or later
■ On Red Hat Enterprise Linux 5 Update 5
2.6.18 or later
■ On Red Hat Enterprise Linux 6
2.6.32-71.el6.x86_64 or later
■ On Red Hat Enterprise Linux 7
3.10.0-54.0.1.el7.x86_64 or later
■ On Asianux Server 3
2.6.18 or later
■ On Asianux Server 4
2.6.32-71.el6.x86_64 or later
查看操作系統內部版本,可以使用下麵命令,如下所示,內部版本滿足要求。
[root@DB-Server ~]# cat /proc/version
Linux version 2.6.18-274.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Fri Jul 8 17:36:59 EDT 2011
[root@DB-Server ~]# uname -r
2.6.18-274.el5
3.3:ORACLE軟體所要求或依賴的一些包
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat
[root@DB-Server ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
> compat-libstdc++-33 \
> elfutils-libelf \
> elfutils-libelf-devel \
> gcc \
> gcc-c++ \
> glibc \
> glibc-common \
> glibc-devel \
> glibc-headers \
> ksh \
> libaio \
> libaio \
> libaio-devel \
> libgcc \
> libstdc++ \
> libstdc++-devel \
> make \
> sysstat
binutils-2.17.50.0.6-14.el5 (x86_64)
compat-libstdc++-33-3.2.3-61 (x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
elfutils-libelf-0.137-3.el5 (x86_64)
elfutils-libelf-0.137-3.el5 (i386)
elfutils-libelf-devel-0.137-3.el5 (x86_64)
gcc-4.1.2-51.el5 (x86_64)
gcc-c++-4.1.2-51.el5 (x86_64)
glibc-2.5-65 (x86_64)
glibc-2.5-65 (i686)
glibc-common-2.5-65 (x86_64)
glibc-devel-2.5-65 (x86_64)
glibc-devel-2.5-65 (i386)
glibc-headers-2.5-65 (x86_64)
ksh-20100202-1.el5_6.6 (x86_64)
libaio-0.3.106-5 (x86_64)
libaio-0.3.106-5 (i386)
libaio-0.3.106-5 (x86_64)
libaio-0.3.106-5 (i386)
package libaio-devel is not installed
libgcc-4.1.2-51.el5 (x86_64)
libgcc-4.1.2-51.el5 (i386)
libstdc++-4.1.2-51.el5 (x86_64)
libstdc++-4.1.2-51.el5 (i386)
libstdc++-devel-4.1.2-51.el5 (x86_64)
make-3.81-3.el5 (x86_64)
package sysstat is not installed
如上檢測所示,我們需要安裝這些缺少的包:
[root@DB-Server Server]# rpm -ivh libaio-devel*
warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [ 50%]
2:libaio-devel ########################################### [100%]
[root@DB-Server Server]# rpm -ivh sysstat*
warning: sysstat-7.0.2-11.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]