Linux下安裝oracle 11g數據庫(一)

Linux下安裝oracle 11g數據庫(一)

1 內存的要求

最低配置: 1 GB of RAM

推薦配置: 2 GB of RAM or more

確定內存大小,輸入下面的命令:grep MemTotal /proc/meminfo

確定系統版本,輸入下面的命令:uname –m

確定交換空間的大小,輸入下面的命令:grep SwapTotal /proc/meminfo

確定可用的內存和交換空間,輸入下面的命令:free

2 磁盤空間要求

數據庫軟件

數據庫軟件需要的大小

企業版

4.7G

標準版

4.6G

數據庫文件

數據庫文件需要的大小

企業版

1.7G

標準版

1.5G


3 檢查軟件要求

3.1 Oracle Database 11gRelease 2 (11.2)所支持的系統:



■ 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



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

■ On SUSE Linux Enterprise Server 10

2.6.16.21 or later

■ On SUSE Linux Enterprise Server 11

2.6.27.19 or later

確定所需的內核安裝,輸入下面的命令:uname –r


3.3 64位操作系統對應的軟件包要求

3.3.1 Oracle Linux 4 and Red Hat Enterprise Linux 4


binutils-2.15.92.0.2

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.97

elfutils-libelf-devel-0.97

expat-1.95.7

gcc-3.4.6

gcc-c++-3.4.6

glibc-2.3.4-2.41

glibc-2.3.4-2.41 (32 bit)

glibc-common-2.3.4

glibc-devel-2.3.4

glibc-headers-2.3.4

libaio-0.3.105

libaio-0.3.105 (32 bit)

libaio-devel-0.3.105

libaio-devel-0.3.105 (32 bit)

libgcc-3.4.6

libgcc-3.4.6 (32-bit)

libstdc++-3.4.6

libstdc++-3.4.6 (32 bit)

libstdc++-devel 3.4.6

make-3.80

numactl-0.6.4.x86_64

pdksh-5.2.14

sysstat-5.0.5


3.3.2 Oracle Linux 5, Red Hat Enterprise Linux 5, and Asianux Server 3


binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

coreutils-5.97-23.el5_4.1

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-2.5-24 (32 bit)

glibc-common-2.5

glibc-devel-2.5

glibc-devel-2.5 (32 bit)

glibc-headers-2.5

ksh-20060214

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3.106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

make-3.81

sysstat-7.0.2


3.3.3 Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4


binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6.i686

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-2.12-1.7.el6 (i686)

glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6.i686

ksh

libgcc-4.4.4-13.el6 (i686)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6.i686

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6.i686

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)


3.3.4 Oracle Linux 7 and Red Hat Enterprise Linux 7


binutils-2.23.52.0.1-12.el7.x86_64

compat-libcap1-1.10-3.el7.x86_64

gcc-4.8.2-3.el7.x86_64

gcc-c++-4.8.2-3.el7.x86_64

glibc-2.17-36.el7.i686

glibc-2.17-36.el7.x86_64

glibc-devel-2.17-36.el7.i686

glibc-devel-2.17-36.el7.x86_64

ksh

libaio-0.3.109-9.el7.i686

libaio-0.3.109-9.el7.x86_64

libaio-devel-0.3.109-9.el7.i686

libaio-devel-0.3.109-9.el7.x86_64

libgcc-4.8.2-3.el7.i686

libgcc-4.8.2-3.el7.x86_64

libstdc++-4.8.2-3.el7.i686

libstdc++-4.8.2-3.el7.x86_64

libstdc++-devel-4.8.2-3.el7.i686

libstdc++-devel-4.8.2-3.el7.x86_64

libXi-1.7.2-1.el7.i686

libXi-1.7.2-1.el7.x86_64

libXtst-1.2.2-1.el7.i686

libXtst-1.2.2-1.el7.x86_64

make-3.82-19.el7.x86_64

sysstat-10.1.5-1.el7.x86_64


3.3.5 SUSE Linux Enterprise Server 10


binutils-2.16.91.0.5

compat-libstdc++-5.0.7

gcc-4.1.0

gcc-c++-4.1.2

glibc-2.4-31.63

glibc-devel-2.4-31.63

glibc-devel-32bit-2.4-31.63

ksh-93r-12.9

libaio-0.3.104

libaio-32bit-0.3.104

libaio-devel-0.3.104

libaio-devel-32bit-0.3.104

libelf-0.8.5

libgcc-4.1.2

libstdc++-4.1.2

libstdc++-devel-4.1.2

make-3.80

numactl-0.9.6.x86_64

sysstat-8.0.4


3.3.6 SUSE Linux Enterprise Server 11


binutils-2.19

gcc-4.3

gcc-32bit-4.3

gcc-c++-4.3

glibc-2.9

glibc-32bit-2.9

glibc-devel-2.9

glibc-devel-32bit-2.9

ksh-93t

libaio-0.3.104

libaio-32bit-0.3.104

libaio-devel-0.3.104

libaio-devel-32bit-0.3.104

libstdc++33-3.3.3

libstdc++33-32bit-3.3.3

libstdc++43-4.3.3_20081022

libstdc++43-32bit-4.3.3_20081022

libstdc++43-devel-4.3.3_20081022

libstdc++43-devel-32bit-4.3.3_20081022

libgcc43-4.3.3_20081022

libstdc++-devel-4.3

make-3.81

sysstat-8.1.5

確定所需的安裝包, 輸入下面的命令: rpm -q package_name

4 創建所需的操作系統組和用戶


4.1 創建Oracle Inventory組:/usr/sbin/groupadd oinstall

4.2 創建OSDBA組:/usr/sbin/groupadd dba

4.3 創建OSASM組: /usr/sbin/groupadd asmadmin

4.4 創建OSDBA組: /usr/sbin/groupadd asmdba

4.5 創建軟件用戶:/usr/sbin/useradd -g oinstall -G dba asmdba oracle

4.6 創建用戶密碼:passwd oracle

5 配置內核參數和資源限制

5.1 內核參數

Vim /etc/sysctl.conf //添加或者編輯


fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 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

net.ipv4.tcp_wmen = 262144 262144 262144

net.ipv4.tcp_rmen = 4194304 4194304 4194304

命令:/sbin/sysctl –p //參數生效

命令:/sbin/sysctl –a //檢測參數。

5.2 限制參數

Vim /etc/security/limits.conf


oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768

vim /etc/pam.d/login 

session required pam_limits.so

6 創建oracle base目錄


6.1 mkdir -p /u01/app/oracle

6.2 chown -R oracle:oinstall /u01/app/

6.3 chmod -R 775 /u01/app/

7 數據庫文件目錄


7.1 mkdir /mount_point/oradata

7.2 chown oracle:oinstall /mount_point/oradata

7.3 chmod 775 /mount_point/oradata

8 恢復文件目錄

8.1 mkdir /mount_point/fast_recovery_area

8.2 chown oracle:oinstall /mount_point/fast_recovery_area

8.3 chmod 775 /mount_point/fast_recovery_area

9 編輯Oracle用戶環境

9.1 su – oracle

9.2 vi .bash_profile

umask 022

export TMP=/mount_point/tmp

export TMPDIR=/mount_point/tmp

export ORACLE_BASE=/u01/app/oracle

export ORACLE_SID=orcle

export ORACLE_HOME=/u01/app/oracle/ product/11.2.0/db_1

export PATH=$ORACLE_HOME/bin/PATH

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章