ITPub博客

首页 > 数据库 > Oracle > 操作规范(四)——Linux 5.4安装Oracle 11gR2

操作规范(四)——Linux 5.4安装Oracle 11gR2

原创 Oracle 作者:xunzhaoxz 时间:2011-06-29 15:08:57 0 删除 编辑

操作规范(四)——Linux 5.4安装Oracle 11gR2

转载请以超链接注明原文:http://xunzhaoxz.itpub.net/post/40016/520274

PDF下载http://www.itpub.net/thread-1454946-1-1.html

1. 环境说明

操作系统平台:Redhat Linux 5.4

Oracle版本:Oracle 11gR2

数据存储方式:文件系统

主机名:ora11gR2

实例名:ora11gR2

[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@]

[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]$

2. 系统环境准备

2.1. 修改 /etc/hosts 文件

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

127.0.0.1 localhost

172.16.188.101 ora11gR2

2.2. Checking the Software Requirements

2.2.1. Operating System Requirements

The following or later versions of the operating systems are required for Oracle Database 11g Release 2 (11.2):

· On Linux x86:

o Asianux 2 Update 7

o Asianux 3

o Oracle Enterprise Linux 4 Update 7

o Oracle Enterprise Linux 5 Update 2

o Red Hat Enterprise Linux 4 Update 7

o Red Hat Enterprise Linux 5 Update 2

o SUSE Linux Enterprise Server 10 SP2

o SUSE Linux Enterprise Server 11

· On Linux x86-64

o Asianux 2

o Asianux 3

o Oracle Enterprise Linux 4 Update 7

o Oracle Enterprise Linux 5 Update 2

o Red Hat Enterprise Linux 4 Update 7

o Red Hat Enterprise Linux 5 Update 2

o SUSE Linux Enterprise Server 10 SP2

o SUSE Linux Enterprise Server 11

[root@ora11gR2 ~]# cat /proc/version

Linux version 2.6.18-164.el5 (mockbuild@x86-002.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Tue Aug 18 15:51:54 EDT 2009

[root@ora11gR2 ~]#

[root@ora11gR2 ~]# lsb_release -id

Distributor ID: RedHatEnterpriseServer

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

[root@ora11gR2 ~]#

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

[root@ora11gR2 ~]#

[root@ora11gR2 ~]#

2.2.2. Kernel Requirements

On Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5:

2.6.18 or later

[root@ora11gR2 ~]# uname -r

2.6.18-164.el5

[root@ora11gR2 ~]#

2.2.3. Package Requirements

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

compat-libstdc++-33-3.2.3

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

elfutils-libelf-devel-static-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-common-2.5

glibc-devel-2.5

glibc-headers-2.5

kernel-headers-2.6.18

ksh-20060214

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.2

libgomp-4.1.2

libstdc++-4.1.2

libstdc++-devel-4.1.2

make-3.81

sysstat-7.0.2

unixODBC-2.2.11

unixODBC-devel-2.2.11

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

rpm -q binutils

rpm -q compat-libstdc++

rpm -q elfutils-libelf

rpm -q elfutils-libelf-devel

rpm -q elfutils-libelf-devel-static

rpm -q gcc

rpm -q gcc-c++

rpm -q glibc

rpm -q glibc-common

rpm -q glibc-devel

rpm -q glibc-headers

rpm -q kernel-headers

rpm -q ksh

rpm -q libaio

rpm -q libaio-devel

rpm -q libgcc

rpm -q libgomp

rpm -q libstdc++

rpm -q libstdc++-devel

rpm -q make

rpm -q sysstat

rpm -q unixODBC

rpm -q unixODBC-devel

简化为一条命令:

rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel|grep not

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

[root@ora11gR2 rpm]# 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%]

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

[root@ora11gR2 rpm]#

[root@ora11gR2 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@ora11gR2 rpm]#

[root@ora11gR2 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@ora11gR2 rpm]#

2.3. Creating Required Operating System Groups and Users

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

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

[root@ ora11gR2 /]# groupadd -g 503 asmdba

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

[root@ora11g R2 /]# passwd oracle

2.4. Configure Oracle Installation Owner Shell Limits

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

2.4.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.4.2. /etc/pam.d/login

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

session required pam_limits.so

2.4.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

umask 022

fi

2.5. Configuring Kernel Parameters

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

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

fs.aio-max-nr = 1048576

fs.file-max = 6815744

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

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

[oracle@ora11g ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_SID=ora11gR2

export ORACLE_BASE=/oracle

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

export INVENTORY_LOCATION=/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 ~]$

2.7. Identifying Required Software Directories

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

[root@ora11gR2 ~]# chmod -R 775 /oracle

[oracle@ora11g ~]$mkdir /oraInventory

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

[oracle@ora11g ~]$ls -l /

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

3. 安装并配置Oracle 11gR2

3.1. 开始安装oracle 11gR2

[oracle@ora11g database]$./runInstaller

后面就是安装软件、DBCA建库等,截图较多,下载PDF版看吧,排版也会比这个好得多

PDF下载 http://www.itpub.net/viewthread.php?tid=1454946&page=1&extra=page%3D1

___________________________________________________________________

延伸阅读(近期整理文档)

主机AIX

【信息采集】IBM AIX系统硬件信息查看命令(shell脚本)(附PDF完整版下载)

操作规范(一)—— AIX rootvg mirror(附PDF下载)

AIX系统安全加固(一)限制密码重试次数,超过限制次数后锁定用户(附截图PDF完整版下载)

AIX平台下创建文件系统需要注意的问题

IBM服务器虚拟化PowerVM——也谈“云计算”

数据库Oracle

新装Oracle11gR2 11.2.0.2重要说明——Patchsetp10098816(附补丁下载地址)

Attention:new installation of Oracle 11.2.0.2

AIX 5.3/6.1环境下安装Oracle10gR2 RAC常见报错(注意事项)

【数据迁移1】Oracle10gR2 rman异机恢复实验(FS->RAW)(附截图PDF完整版下载)

【数据迁移2】Oracle10gR2 rman异机恢复实验(FS-FS)(附截图PDF完整版下载)

操作规范(二)——RHEL5.4安装Oracle 10.2.0.4(附截图PDF完整版下载)

操作规范(三)——Linux5.4安装Oracle 11gR1(附截图PDF完整版下载)

操作规范(四)——Linux5.4安装Oracle 11gR2(附截图PDF完整版下载)

Oracle RAC环境下重建ASM磁盘组(Re-createASM diskgroup)(附截图PDF完整版下载)

Oracle RAC srv服务“首选”与“可用”状态的调整——srvctl modify service 的使用(附截图PDF完整版下载)

Linux+ASM+OCFS环境下增加ORACLE RAC联机重做日志文件(附截图PDF完整版下载)

备份还原Symantec Netbackup:

搭建NBU实验环境——解决虚拟带库vistor License过期问题(附截图PDF完整版下载)

NBU常用命令1——介质管理

--------------------------------------------------------------

亲,留个脚印,发表下您的宝贵意见,或者点击左边“订阅我的Blog”吧.......

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

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

注册时间:2010-11-09

  • 博文量
    27
  • 访问量
    698553