Linux下安装oracle11g数据库(一)

Linux下安装oracle 11g数据库(一)

1 内存的要求

10年积累的做网站、成都网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计制作后付款的网站建设流程,更有商南免费网站建设让你可以放心的选择与我们合作。

最低配置: 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


文章标题:Linux下安装oracle11g数据库(一)
路径分享:http://azwzsj.com/article/ipsgpe.html