Step by Step – Install Oracle 11gR2 on RHEL5

《在64-bit RHEL5上安装Oracle 11gR2》

摘要:本文档综合Red Hat Enterprise Linux 5 (RHEL5)操作系统安装及Oracle Database 11g Release 2的安装。文档内容适合在测试服务器上安装Oracle数据库以供实验、测试使用,对于生产数据库,部分参数需要DBA根据生产环境手工调试。若在生产环境安装RHEL操作系统和Oracle数据库,请参考官方文档。

以下为操作系统及数据库安装步骤及说明。

  1. 概述

此文档内容涉及RHEL5操作系统安装及Oracle Database 11gR2的安装。我们将安装64bitRHEL操作系统及Oracle 64-bit数据库。

以下官方安装文档可供参考:

64-bit(x86_64)Oracle Database安装文档(我太懒了,找了个11.1的文档,11.2的同志们自己在百度上Google下吧)

Oracle Database Installation Guide 11g Release 1 (11.1) for Linux – (B32002-04)

Oracle Database Quick Installation Guide 11g Release 1 (11.1) for Linux x86_64 – (B32285-01)

Red Hat Enterprise Linux文档

索引

Installing Red Hat Enterprise Linux 5 for all architectures Edition 3.1

Installing Red Hat Enterprise Linux 5 for all architectures Edition 3.1

本文档指定如下参数,实际生产环境需根据需要进行相应配置:

ORACLE_BASE : /u01/app/oracle

ORACLE_HOME : /u01/app/oracle/product/11.1.0/db_1

ORACLE_SID : MARSHALL

  1. 操作系统安装

由于RHEL5图形化安装操作界面非常容易理解,操作系统安装部分介绍将相对简略,只对重点部分进行详述。详细安装过程可参考概述部分中RHEL官方安装文档。

请注意,如果有专门的SA负责系统安装,请提前通知其以下在安装过程中的注意事项,同时要求其安装必要RPM包。

安装过程:

  1. 插入安装光盘,系统会进入引导界面,引导安装RHEL操作系统。
  2. 从引导界面到语言选择都可根据需要选择。
  3. 检测之前安装:这一部分,通常会选择全新安装而非升级。
  4. 磁盘分区:这一部分需非常注意,尤其是SWAP分区的大小,可参照以下表格修改。
可用RAM Swap Space
1GB-2GB 1.5*RAM
2GB-4GB 1*RAM
>8GB 0.75*RAM
  1. 网络配置:如果安装数据库的主机被用作数据库服务器,网络配置阶段请勿使用DHCP,需要分配一个静态IP。选中Enable IPv4 support选项,取消Use dynamic IP configuration (DHCP)选项和Enable IPv6 support选项。

    以本机为例:

    IPv4 Address: 192.168.0.104

    Prefix (Netmask): 255.255.255.0

    Hostname: marshall

  2. Package安装部分,选择Customize now,勾选中以下Package Groups:

    Desktop Environments

    GNOME Desktop Environment

    Applications

    Editors

    Graphical Internet

    Text-based Internet

    Development

    Development Libraries

    Development Tools

    Legacy Software Development

    Servers

    Server Configuration Tools

    Base System

    Administration Tools

    Base

    Java

    Legacy Software Support

    System Tools

    X Window System

  3. 全部配置好后,安装系统,然后会要求重启机器。
  4. 重启完成后,对以下部分进行重点配置:
    1. Firewall: Disabled
    2. SELinux: Disabled
    3. Kdump: Disabled
  5. 配置完成。

根据以上几步,我们可以在短时间内完成RHEL5操作系统的安装,快速安装的前提是操作系统管理员及网络管理员对系统的安装进行了详细的规划。这包括分区、IP地址分配(请参照http://www.ioracle.org/archives/199 )等。可能还有部分package在系统安装过程中并未安装,我们将在安装数据库过程中进行安装。

  1. Oracle数据库安装

     

    操作系统配置

    1. 以Root用户身份登录操作系统:
    2. 内核检查

    [[email protected] ~]# uname -rm

    2.6.18-128.el5 x86_64

    1. Swap空间检查:

    Swap空间配置应符合下表要求:

可用RAM Swap Space
1GB-2GB 1.5*RAM
2GB-4GB 1*RAM
>8GB 0.75*RAM

通过以下命令可查看内存大小

[[email protected] ~]# cat /proc/meminfo | grep MemTotal

MemTotal: 4049876 kB

通过以下命令可查看Swap空间大小

[[email protected] ~]# cat /proc/meminfo | grep SwapTotal

SwapTotal: 5116692 kB

  1. 检查/tmp目录

    /tmp目录的空闲空间应该等于或大于400MB

[[email protected] ~]# df -h /tmp

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 19G 2.2G 16G 13% /

  1. 内核参数

    在安装Oracle Database前,需要在/etc/sysctl.conf文件中修改/添加如下内核参数:

kernel.shmmax =2073536512(建议) 默认值为536870912

kernel.shmmni = 4096

kernel.shmall = 2097152

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304(建议) 官方文档建议最小值:262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

修改完以上配置后,可以通过重启系统的方式使参数生效,也可以执行下面的命令,无需重启机器便可使参数生效:

# /sbin/sysctl -p

  1. 对Oracle用户,配置Shell Limites

    为了让Oracle数据库在Linux系统上获得更佳的表现,Oracle推荐对Shell Limits进行如下配置:

Shell Limit Item in limits.conf Hard Limit
Maximum number of open file descriptors nofile 65536
Maximum number of processes available to a single user nproc 16384

可用过执行以下两段命令,修改配置:

cat >> /etc/security/limits.conf <<EOF

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

EOF

 

cat >> /etc/pam.d/login <<EOF

# Added for Oracle Shell Limits

session required /lib/security/pam_limits.so

session required pam_limits.so

EOF

修改默认的Shell startup file

可以使用如下命令查看当前shell

Ps

Echo $SHELL

若使用Bourne, Bash或Korn shell,则需要修改/etc/profile,执行以下命令:

cat >> /etc/profile <<EOF

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

EOF

若使用的是C shell(csh或tcsh),则需要修改/etc/csh.login文件:

cat >> /etc/csh.login <<EOF

if ( \$USER == “oracle” ) then

limit maxproc 16384

limit descriptors 65536

endif

EOF

  1. 检查防火墙是否关闭

    如果忘记在安装系统过程中是否disabled firewall,可通过以下命令查看:

# /etc/rc.d/init.d/iptables status

如果防火墙没有关闭,可以通过以下命令关闭:

# /etc/rc.d/init.d/iptables stop

# chkconfig iptables off

  1. 网络配置

    确保节点名称不出现在loopback address中

127.0.0.1 marshall localhost.localdomain localhost

删除红色部分

127.0.0.1 localhost.localdomain localhost

  1. 为Oracle创建组及用户:

# groupadd -g 501 oinstall

# groupadd -g 502 dba

# groupadd -g 503 oper

# useradd -m -u 501 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c “Oracle Software Owner” oracle

# id oracle

# passwd oracle

  1. 验证nobody用户是否存在

# id nobody

uid=99(nobody) gid=99(nobody) groups=99(nobody)

如果不存在,需要使用以下语句添加:

# /usr/sbin/useradd nobody

  1. 创建Oracle Base目录

    这个目录用来存储Oracle Database软件

# mkdir -p /u01/app/oracle

# chown -R oracle:oinstall /u01/app

# chmod -R 775 /u01/app

  1. 创建目录存储数据库文件(data file/backup file)

# mkdir -p /u02/oradata

# chown oracle:oinstall /u02/oradata

# chmod 775 /u02/oradata

 

# mkdir -p /u02/flash_recovery_area

# chown oracle:oinstall /u02/flash_recovery_area

# chmod 775 /u02/flash_recovery_area

  1. 配置Oracle用户登录脚本(.bash_profile)

    以Oracle用户身份登录:

# su – oracle

修改如下参数:

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

export JAVA_HOME=/usr/local/java

 

# User specific environment and startup programs

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_PATH=$ORACLE_BASE/dba_scripts/common/sql:.:$ORACLE_HOME/rdbms/admin

export ORACLE_SID=MARSHALL

 

export PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

export PATH=${PATH}:$ORACLE_BASE/dba_scripts/common/bin

export ORACLE_TERM=xterm

export TNS_ADMIN=$ORACLE_HOME/network/admin

export ORA_NLS10=$ORACLE_HOME/nls/data

export NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export CLASSPATH=$ORACLE_HOME/JRE

export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export THREADS_FLAG=native

export TEMP=/tmp

export TMPDIR=/tmp

  1. 安装相应rpm包

64-bit的RHEL5系统中,需要安装以下包:

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

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

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

numactl-devel-0.9.8.x86_64

sysstat-7.0.2

检查包是否已经安装:

rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat

可使用以下两种方式安装rpm包:

  1. 插入系统安装盘,挂载安装盘:

mkdir -p /media/cdrom

mount -r /dev/cdrom /media/cdrom

cd /media/cdrom/Server

  1. http://rpm.pbone.net/网站搜索下载(使用wget命令)

使用如下命令安装未安装的包:

Rpm –Uvh 包名称

下载Oracle Database 11g R2软件

  1. 若无Metalink账号,可注册OTN账号,登录Oracle官网下载Oracle 11.2.0.1软件。
  2. 若有Metalink账号,可直接下载Oracle 11.2.0.2软件:

如果使用Windows操作系统,可直接下面链接访问Metalink并下载软件:

https://updates.oracle.com/Orion/PatchDetails/handle_plat_lang_change?plat_lang=267P&patch_file=&file_id=&password_required=&password_required_readme=&merged_trans=&aru=12960454&patch_num=10098816&patch_num_id=1294815&default_release=80112020&default_plat_lang=226P&default_compatible_with=&patch_password=&orderby=&direction=&no_header=0&sortcolpressed=&tab_number=&urlc=v1.2

如果使用linux操作系统,可直接用wget命令下载:

先创建目录,以保存压缩包:

# su – oracle

$ mkdir -p ~oracle/orainstall

$ cd ~oracle/orainstall

执行下列命令,设置Metalink用户名和密码:

[email protected]
$PASSWORD=yourpwd

执行以下两个命令,让linux从后台自动下载Oracle 11.2.0.2:

$ wget -c –http-user=$USERNAME –http-password=$PASSWORD \
–output-document=p10098816_112020_Linux-x86-64_1of7.zip \
“https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_1of7.zip?file_id=34840697&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_1of7.zip” \
-o download1.log &

 

$ wget -c –http-user=$USERNAME –http-password=$PASSWORD \
–output-document=p10098816_112020_Linux-x86-64_2of7.zip \
“https://updates.oracle.com/Orion/Download/process_form/p10098816_112020_Linux-x86-64_2of7.zip?file_id=34840698&aru=13149219&userid=o-$USERNAME&email=$USERNAME&patch_password=&patch_file=p10098816_112020_Linux-x86-64_2of7.zip” \
-o download2.log &

可以使用如下命令,查看下载进度:

$ tailf download1.log

$ tailf download2.log

除此之外要从Metalink上下载Patch和Opatch:

6880880 112000 Opatch

10248523 PSU    11.2.0.2.1

下载以上软件及patch后,解压缩:

Unzip p10098816_112020_Linux-x86-64_1of7.zip

Unzip p10098816_112020_Linux-x86-64_2of7.zip

安装Oracle数据库软件

在以下的步骤中,我们只安装数据库软件,不创建数据库。

在安装前我们要确认连接的服务器是否是我们要安装数据库的服务器,同时打开X server连接。

以root用户登录

su –

验证服务器:

hostname

允许X server连接:

xhost +

access control disabled, clients can connect from any host

以oracle用户登录

su – oracle

可用过windows下的ipconfig命令或linux下的who命令查看远程用户ip,用以替换<your local workstation>

如果使用远程用户连接,需要设置DISPLAY变量,以允许图形化界面在远程用户主机上显示。

DISPLAY=<your local workstation>:0.0

export DISPLAY

使用以下命令启动runInstaller安装程序:

/home/oracle/orainstall/database/runInstaller -ignoreSysPrereqs -ignoreInternalDriverError

多数情况不用加-ignoreSysPrereqs –ignoreInternalDriverError

之所以加-ignoreInternalDriverError,请参考:

INS-30060: Check for group existence failed.

Cause: Unexpected error occurred while trying to check for group existence.

Action: Refer to the logs or contact Oracle Support Services. Note for advanced users: Launch the installer by passing the following flag ‘-ignoreInternalDriverError’.

  1. Configure Security Updates

    去除勾选,点击NEXT。

  1. Download Software Updates

    选择Skip software updates,点击NEXT。

  1. Installation Option

    选择只安装数据库软件,点击NEXT。

  1. Grid Installation Options

    选择单实例数据库安装,点击NEXT。

  1. 选择产品语言

默认英语,点击NEXT。

  1. Database Edition

    选择企业版,然后选择相应选件,点击OK,NEXT。

  1. Installation Location

    软件自动选择ORACLE_BASE与ORACLE_HOME目录,我们之前已经在操作系统配置部分已经配置了oracle用户的/home/oracle/.bash_profile文件,其中指定了ORACLE_BASE与ORACLE_HOME目录。所以在此步中系统会自动选择路径。

  1. Create Inventory

  1. Operating System Groups

    选择操作系统组。

  1. Prerequisite Checks和Summary

    如果系统配置有问题(系统内核参数设置有误、磁盘空间不足、内存不足、某些包未安装全),会在Prerequisite Checks这一步给出提示。

    在Summary中,有对整体安装的配置概要。

  2. Install Product

    安装产品

  1. 执行脚本

    以root用户身份登录,执行图示的两个脚本:

/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.1.0/db_1/root.sh

  1. 安装成功

    执行完脚本后,点击OK,提示Oracle Database安装成功!

安装数据库补丁集

根据My Oracle Support提示,最新的PSU为10248523p10248523_112020_Linux-x86-64.zip),可以从Metalink上下载。这个补丁集需要11.2.0.1.5版本的OPatch才能安装。OPatch也可以从Metalink上找到:p6880880_112000_Linux-x86-64.zip

根据PSUREADME的提示,先检测PSU是否与其他one-off patches冲突:

[[email protected] OPatch]$ opatch prereq CheckConflictAg ainstOHWithDetail -phBaseDir ../10248523

Invoking OPatch 11.2.0.1.5

 

Oracle Interim Patch Installer version 11.2.0.1.5

Copyright (c) 2010, Oracle Corporation. All rights reserved.

 

PREREQ session

 

Oracle Home : /u01/app/oracle/product/11.1.0/db_1

Central Inventory : /u01/app/oraInventory

from : /etc/oraInst.loc

OPatch version : 11.2.0.1.5

OUI version : 11.2.0.2.0

OUI location : /u01/app/oracle/product/11.1.0/db_1/oui

Log file location : /u01/app/oracle/product/11.1.0/db_1 /cfgtoollogs/opatch/opatch2011-04-05_18-27-50PM.log

 

Patch history file: /u01/app/oracle/product/11.1.0/db_1 /cfgtoollogs/opatch/opatch_history.txt

 

Invoking prereq “checkconflictagainstohwithdetail”

 

Prereq “checkConflictAgainstOHWithDetail” passed.

 

OPatch succeeded.

如果有冲突,可查看My Oracle Support Note 1061295.1 Patch Set Updates – One-off Patch Conflict Resolution解决。我们看到没有冲突,可以直接安装:

[[email protected] OPatch]$ cd ../10248523/

[[email protected] 10248523]$ ../OPatch/opatch apply

Invoking OPatch 11.2.0.1.5

 

Oracle Interim Patch Installer version 11.2.0.1.5

Copyright (c) 2010, Oracle Corporation. All rights reserved.

 

 

Oracle Home : /u01/app/oracle/product/11.1.0/db_1

Central Inventory : /u01/app/oraInventory

from : /etc/oraInst.loc

OPatch version : 11.2.0.1.5

OUI version : 11.2.0.2.0

OUI location : /u01/app/oracle/product/11.1.0/db_1/oui

Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2011-04-05_18-35-02PM.log

 

Patch history file: /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch_history.txt

 

ApplySession applying interim patch ‘10248523’ to OH ‘/u01/app/oracle/product/11.1.0/db_1′

 

Running prerequisite checks…

Prerequisite check “CheckActiveFilesAndExecutables” failed.

The details are:

 

 

Following executables are active :

/u01/app/oracle/product/11.1.0/db_1/bin/oracle

ApplySession failed during prerequisite checks: Prerequisite check “CheckActiveFilesAndExecutables” failed.

System intact, OPatch will not attempt to restore the system

 

OPatch failed with error code 74

根据提示Oracle正在运行,我们可以重启系统,再次尝试:

[[email protected] 10248523]$ ../OPatch/opatch apply Invoking OPatch 11.2.0.1.5 Oracle Interim Patch Installer version 11.2.0.1.5 Copyright (c) 2010, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.1.5 OUI version : 11.2.0.2.0 OUI location : /u01/app/oracle/product/11.1.0/db_1/oui Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch 2011-04-05_21-46-18PM.log Patch history file: /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch _history.txt ApplySession applying interim patch ‘10248523’ to OH ‘/u01/app/oracle/product/11. 1.0/db_1′

Running prerequisite checks…

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name: 随便输入一个邮箱

Password (optional): 密码可以选择不填

Unable to establish connection to Oracle Configuration Manager server. Hostname (https://ccr.oracle.com) is unknown. Unable to establish a network connection to Oracle. Specify the URL for an Oracle Support Hub in this format: Password (optional): Unable to establish connection to Oracle Configuration Manager server. Hostname (https://ccr.oracle.com) is unknown. Unable to establish a network connection to Oracle. Specify the URL for an Oracle Support Hub in this format: http[s]://<OracleSupportHubHost>:<OracleSupportHubPort> If you do not wish to configure OCM through an Oracle Support Hub, enter NONE Oracle Support Hub URL: NONE Unable to establish a network connection to Oracle. If your systems require a proxy server for outbound Internet connections, enter the proxy server details in this format: [<proxy-user>@]<proxy-host>[:<proxy-port>] If you want to remain uninformed of critical security issues in your configuration, enter NONE Proxy specification: NONE OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = ‘/u01/app/oracle/product/11.1.0/db_1′) Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files and inventory (not for auto-rollback) for the Oracle Home Backing up files affected by the patch ‘10248523’ for restore. This might take a while… Backing up files affected by the patch ‘10248523’ for rollback. This might take a while… Patching component oracle.rdbms.rsf, 11.2.0.2.0… Updating archive file “/u01/app/oracle/product/11.1.0/db_1/lib/libgeneric11.a” with “lib/libgeneric11.a/kgl2.o” Copying file to “/u01/app/oracle/product/11.1.0/db_1/rdbms/mesg/oraus.msb” Copying file to “/u01/app/oracle/product/11.1.0/db_1/rdbms/mesg/oraus.msg” Patching component oracle.rdbms, 11.2.0.2.0… Updating archive file “/u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a” with “lib/libserver11.a/kfc.o” Updating archive file “/u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a” with “lib/libserver11.a/kfcl.o”

……省略部分更新archive file的内容

Updating archive file “/u01/app/oracle/product/11.1.0/db_1/lib/libasmclntsh11.a” with “lib/libasmclntsh11.a/kgfdputl.o”

Copying file to “/u01/app/oracle/product/11.1.0/db_1/rdbms/admin/bundledata_PSU.xml”

Copying file to “/u01/app/oracle/product/11.1.0/db_1/psu/11.2.0.2.1/catpsu.sql”

Copying file to “/u01/app/oracle/product/11.1.0/db_1/psu/11.2.0.2.1/catpsu_rollback.sql”

Running make for target client_sharedlib

Running make for target client_sharedlib

Running make for target ioracle

ApplySession adding interim patch ‘10248523’ to inventory

Verifying the update…

Inventory check OK: Patch ID 10248523 is registered in Oracle Home inventory with proper meta-data.

Files check OK: Files from Patch ID 10248523 are present in Oracle Home.

 

The local system has been patched and can be restarted.

 

OPatch succeeded.

查看已安装的补丁,从下面的内容可以看到我们刚刚打好的补丁10248523:

[[email protected] 10248523]$ ../OPatch/opatch lsinventory

Invoking OPatch 11.2.0.1.5

 

Oracle Interim Patch Installer version 11.2.0.1.5

Copyright (c) 2010, Oracle Corporation. All rights reserved.

 

Oracle Home : /u01/app/oracle/product/11.1.0/db_1

Central Inventory : /u01/app/oraInventory

from : /etc/oraInst.loc

OPatch version : 11.2.0.1.5

OUI version : 11.2.0.2.0

OUI location : /u01/app/oracle/product/11.1.0/db_1/oui

Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2011-04-05_21-53-31PM.log

 

Patch history file: /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch_history.txt

 

Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-04-05_21-53-31PM.txt

 

——————————————————————————–

Installed Top-level Products (1):

 

Oracle Database 11g 11.2.0.2.0

There are 1 products installed in this Oracle Home.

 

Interim patches (1) :

 

Patch 10248523 : applied on Tue Apr 05 21:48:46 CST 2011

Unique Patch ID: 13260025

Created on 16 Dec 2010, 23:39:23 hrs PST8PDT

Bugs fixed:

10151017, 10158965, 10080579, 9788588, 10073683, 10077191, 9744252

9735237, 10248523, 9956713, 10019218, 9715581, 9770451, 9539440, 10022980

10209232, 10079168, 10013431, 9881076, 10238786, 10040531

——————————————————————————–

 

OPatch succeeded.

  1. 问题汇总

    在安装的过程中我们遇到很多的问题,在此一并汇总:

linux命令行变成-bash-3.2$

在测试中,转换到oracle用户,其命令行变成bash-3.2格式,通常是在创建oracle用户是改变了oracle的默认指定目录导致的。

解决方法:将所有的配置文件从/etc/skel复制到新用户的主目录下即可。

TNS错误

注意在3.1.8章节中,我们去掉了/etc/hosts文件中的hostname部分,这可能导致在创建监听时出现错误TNS-12545及TNS-00515。具体显示如下:

$ lsnrctl status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=secdb)(PORT=1521)))

TNS-12545: Connect failed because target host or object does not exist

TNS-12560: TNS:protocol adapter error

TNS-00515: Connect failed because target host or object does not exist

问题原因多数因为/etc/hosts文件设置错误,我们将hostname重新加上即可:

Vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 marshall localhost.localdomain localhost

::1 localhost6.localdomain6 localhost6

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress