ITPub博客

首页 > 数据库 > Oracle > 操作规范(三)——Linux 5.4安装Oracle 11gR1(1)

操作规范(三)——Linux 5.4安装Oracle 11gR1(1)

原创 Oracle 作者:xunzhaoxz 时间:2011-05-27 10:03:55 0 删除 编辑

操作规范(三)——Linux 5.4安装Oracle 11gR1(1)

本文PDF版下载 http://www.itpub.net/thread-1440726-1-1.html

作者:xunzhao【转载时请以超链接形式标明文章出处和作者信息】

链接:http://xunzhaoxz.itpub.net/post/40016/518473

1. 环境说明

操作系统平台:Redhat Linux 5.4

Oracle版本:Oracle 11gR1 11.1.0.6.0

数据存储方式:文件系统

主机名:ora11g

实例名:ora11g

[oracle@ora11g database]$ uname -a

Linux LinuxNBU65 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux

[oracle@ora11g database]$ cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.4 (Tikanga)

[oracle@ora11g database]$ lsb_release -a

LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: RedHatEnterpriseServer

Description: Red Hat Enterprise Linux Server release 5.4 (Tikanga)

Release: 5.4

Codename: Tikanga

[oracle@ora11g database]$

[@more@]

2. 系统环境准备

2.1. 创建组、用户

[root@ora11g /]# groupadd -g 501 oinstall

[root@ora11g /]# groupadd -g 502 dba

[root@ora11g /]# useradd -u 501 -g oinstall -G dba oracle

[root@ora11g /]# passwd oracle

[root@ora11g /]# mkdir /oracle

[root@ora11g /]# chown -R oracle:oinstall /oracle

[root@ora11g /]# chmod 755 -R /oracle

2.2. 提高Oracle用户的shell 限制

使用文本编辑器将下面列出的行添加到/etc/security/limits.conf/etc/pam.d/login /etc/profile

2.2.1. /etc/security/limits.conf

[root@ora11g ~]#vi /etc/security/limits.conf 添加以下内容

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

2.2.2. /etc/pam.d/login

[root@ora11g ~]# vi /etc/pam.d/login 添加以下内容

session required pam_limits.so

2.2.3. /etc/profile

[root@ora11g ~]#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

2.3. 配置内核参数。

使用文本编辑器将下面列出的行添加到 /etc/sysctl.conf。要使更改立即生效,请执行sysctl p

[root@ora11g ~]#vi /etc/sysctl.conf 添加以下内容

fs.file-max = 101365

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 = 1048576

2.4. 修改 /etc/hosts 文件。

# more /etc/hosts 根据实际环境添加相应主机、IP的映射

127.0.0.1 localhost

172.16.250.121 ora11g

2.5. 检查软件包

Oracle 11gR1官方文档中对软件包的需求如下:

Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed:

binutils-2.17.50.0.6-2.el5

compat-libstdc++-33-3.2.3-61

elfutils-libelf-0.125-3.el5

elfutils-libelf-devel-0.125

gcc-4.1.1-52

gcc-c++-4.1.1-52

glibc-2.5-12

glibc-common-2.5-12

glibc-devel-2.5-12

glibc-headers-2.5-12

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.1-52

libstdc++-4.1.1

libstdc++-devel-4.1.1-52.e15

make-3.81-1.1

numactl-devel-0.9.8.i386

sysstat-7.0.0

unixODBC-2.2.11

unixODBC-devel-2.2.11

使用rpm q命令检查下系统是否已经安装了以上软件包,上传并安装缺失的软件包

[root@ora11g rpms]# rpm -ivh compat-db-4.2.52-5.1.i386.rpm

warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:compat-db ########################################### [100%]

[root@ora11g rpms]#

[root@ora11g rpms]# rpm -ivh openmotif-2.2.4-0.1.i386.rpm

Preparing... ########################################### [100%]

1:openmotif ########################################### [100%]

[root@ora11g rpms]#

[root@ora11g rpms]# rpm -ivh compat-libstdc++-7.3-2.96.128.i386.rpm

warning: compat-libstdc++-7.3-2.96.128.i386.rpm: Header V3 DSA signature: NOKEY, key ID 025e513b

Preparing... ########################################### [100%]

file /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so from install of compat-libstdc++-7.3-2.96.128.i386 conflicts with file from package compat-libstdc++-296-2.96-138.i386

[root@ora11g rpm]# rpm -e compat-libstdc++-296-2.96-138.i386

[root@ora11g rpm]# rpm -ivh compat-libstdc++-7.3-2.96.128.i386.rpm

compat-gcc-c++-7.3-2.96.128.i386.rpm

compat-gcc-7.3-2.96.128.i386.rpm

compat-libstdc++-devel-7.3-2.96.128.i386.rpm

warning: compat-libstdc++-7.3-2.96.128.i386.rpm: Header V3 DSA signature: NOKEY, key ID 025e513b

warning: compat-gcc-c++-7.3-2.96.128.i386.rpm: Header V3 DSA signature: NOKEY, key ID 73307de6

Preparing... ########################################### [100%]

1:compat-libstdc++ ########################################### [ 25%]

2:compat-gcc ########################################### [ 50%]

3:compat-libstdc++-devel ########################################### [ 75%]

4:compat-gcc-c++ ########################################### [100%]

[root@ora11g rpm]# [root@ora11g rpm]# rpm -ivh numactl-devel-0.9.8-2.el5.i386.rpm

warning: numactl-devel-0.9.8-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:numactl-devel ########################################### [100%]

[root@ora11g rpm]# rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm

warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:libaio-devel ########################################### [100%]

[root@ora11g rpm]#

[root@ora11g rpm]# rpm -ivh unixODBC-2.2.11-7.1.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm

warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:unixODBC ########################################### [ 50%]

2:unixODBC-devel ########################################### [100%]

[root@ora11g rpm]#

2.6. Oracle 10gR211gR1Linux操作系统软件包、内核参数的需求对比:

10.2.0.1/10.2.0.4

11.1.0.6

make-3.79

make-3.80

binutils-2.14

binutils-2.15.92.0.2

gcc-3.2

gcc-3.4.5

libaio-0.3.96

libaio-0.3.105

libaio-devel-0.3.105

libstdc++-3.4.5

elfutils-libelf-devel-0.97

sysstat-5.0.5

libgcc-3.4.5

libstdc++-devel-3.4.5

unixODBC-2.2.11

unixODBC-devel-2.2.11

semmsl=250

semmsl=250

semmns=32000

semmns=32000

semopm=100

semopm=100

semmni=128

semmni=128

shmmax=536870912

shmmax=536870912

shmmni=4096

shmmni=4096

shmall=2097152

shmall=2097152

file-max=65536

file-max=65536

VERSION=2.6.9

VERSION=2.6.9

ip_local_port_range=1024 - 65000

ip_local_port_range=1024 - 65000

rmem_default=262144

rmem_default=4194304

rmem_max=262144

rmem_max=4194304

wmem_default=262144

wmem_default=262144

wmem_max=262144

wmem_max=262144

SWAP 744MB

SWAP 1626MB

2.7. 检查oracle用户的配置文件

[oracle@ora11g ~]$ vi .bash_profile 添加以下内容

export ORACLE_SID=ora11g

export ORACLE_BASE=/oracle

export ORACLE_HOME=$ORACLE_BASE/app/oracle/product/11.1

export INVENTORY_LOCATION=$ORACLE_BASE/oraInventory

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export NLS_LANG="American_america.zhs16gbk"

#export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss';

export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

umask 022

[oracle@ora11g ~]$ mkdir -p $ORACLE_HOME

2.8. 创建必要的目录并检查权限

[oracle@ora11g ~]$mkdir /oracle/oraInventory

[oracle@ora11g ~]$mkdir -p $ORACLE_HOME

[oracle@ora11g ~]$ls -l /

[oracle@ora11g ~]$ls -l /oracle

操作规范(三)——Linux 5.4安装Oracle 11gR1 (2)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22085031/viewspace-1050434/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-09

  • 博文量
    27
  • 访问量
    698497