在Redhat linux ADS3上安装单机oracle的过程

本文档详细介绍了在Redhat Linux ADS3系统上安装Oracle的过程,包括解压安装文件、调整内存设置、安装依赖包、应用补丁以及启动Agent的步骤,确保数据库顺利安装并运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

将oracle的cpio文件解压缩:
  # Uncompress
  gunzip Linux9i_Disk1.cpio.gz Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz

  # Unpack the downloaded files:
  cpio -idmv < Linux9i_Disk1.cpio
  cpio -idmv < Linux9i_Disk2.cpio
  cpio -idmv < Linux9i_Disk3.cpio

[root@rac1 tools]# ll
total 12
drwxr-xr-x    5 root     root         4096 Aug 29 07:49 oracle9
drwxr-xr-x    2 root     root         4096 Aug 29 07:42 ras3_iso
drwxr-xr-x    4 root     root         4096 Aug 29 08:44 vmware251
[root@rac1 tools]# chown -R oracle:dba oracle9
[root@rac1 tools]# ll
total 12
drwxr-xr-x    5 oracle   dba          4096 Aug 29 07:49 oracle9
drwxr-xr-x    2 root     root         4096 Aug 29 07:42 ras3_iso
drwxr-xr-x    4 root     root         4096 Aug 29 08:44 vmware251
[root@rac1 tools]# ll oracle9/
total 12
drwxr-xr-x    3 oracle   dba          4096 Aug 29 08:31 disk1
drwxr-xr-x    3 oracle   dba          4096 Aug 29 08:31 disk2
drwxr-xr-x    3 oracle   dba          4096 Aug 29 08:30 disk3
[root@rac1 tools]#

设置物理内存和SWAP:
检查物理内存:
[root@rac1 tools]# grep MemTotal /proc/meminfo
MemTotal:      1029608 kB
[root@rac1 tools]#

也可以使用free来检查内存的使用:
[root@rac1 tools]# free
             total       used       free     shared    buffers     cached
Mem:       1029608    1001972      27636          0      48556     852340
-/+ buffers/cache:     101076     928532
Swap:      2048248          0    2048248
[root@rac1 tools]#


检查swap的使用情况:
[root@rac1 tools]# cat /proc/swaps
Filename                        Type            Size    Used    Priority
/dev/hda6                       partition       2048248 0       -1
[root@rac1 tools]#


检查共享内存的设置(shmmax setting):
[root@rac1 tools]# cat /proc/sys/kernel/shmmax
33554432   ---这是缺省值
[root@rac1 tools]#


检查当前所有的共享内存的设置:
[root@rac1 tools]# ipcs -lm

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

[root@rac1 tools]#

我们最好将共享内存设置为大于SGA的大小,比如1G(因为我的物理内存小):
设置共享内存的方法有2个:
方法1:
echo "1073741824" > /proc/sys/kernel/shmmax
方法2: 使用 sysctl(8) 来修改内核参数的值:
sysctl -w kernel.shmmax=1073741824

为了永久的改变内核参数的值,需要将该参数加入到/etc/sysctl.conf中:
echo "kernel.shmmax=1073741824" >> /etc/sysctl.conf

操作结果类似:
[root@rac1 root]# echo "1073741824" > /proc/sys/kernel/shmmax
[root@rac1 root]# echo "kernel.shmmax=1073741824" >> /etc/sysctl.conf

检查修改后的参数是否生效:
[root@rac1 root]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax=1073741824
[root@rac1 root]# cat /proc/sys/kernel/shmmax
1073741824
[root@rac1 root]# ipcs -lm

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 1048576
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

[root@rac1 root]#  内核参数需要重新启动才可以生效

系统级别的共享内存段的最大个数(数量),linux默认是4096:
[root@rac1 root]# cat /proc/sys/kernel/shmmni
4096
[root@rac1 root]#

检查所有的信号量:
[root@rac1 tools]# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

[root@rac1 tools]#

//////////////////////////////////////////////////////////////////////////
系统共享内存页的大小(至少为: SHMMAX/PAGE_SIZE)
[root@rac1 root]# cat /proc/sys/kernel/shmall
2097152
[root@rac1 root]#
This parameter sets the total amount of shared memory in pages that can be used at one time on the system. So shmall should always be at least ceil(SHMMAX/PAGE_SIZE).
The default size for shmall on RH 2.1 AS is 2097152. This should be sufficient since it means that the total amount of shared memory available on the system is 2097152*4096 bytes (shmall*PAGE_SIZE). On i386 architectures, the PAGE_SIZE in RHAS 2.1 (UP and SMP kernel) is 4096 bytes unless you use bigpages which supports the configuration of larger memory pages.
# cat /proc/sys/kernel/shmall
2097152

If you don't know what PAGE_SIZE is on your Linux system, copy/paste the following commands into a shell:
cat << EOF |
#include
main() { printf ("%d bytes/n",getpagesize()); }
EOF
gcc -xc - -o /tmp/getpagesize
/tmp/getpagesize; rm -f /tmp/getpagesize

This program will display the size of PAGE_SIZE in bytes.
//////////////////////////////////////////////////////////////////////////

检查内核参数的设置:
[root@rac1 tools]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax=1073741824
[root@rac1 tools]#


检查/tmp空间的设置,至少应该在400M,如果磁盘空间够用的话,建议设置在1G以上:
df /tmp

///////////////////////////////////////////////////////////////
检查操作系统RPM包的信息:
ADS3上需要的rpm有:
-----------------------------------------------------------
来自metalink:
        * Linux kernel version would be 2.4.21-4.EL 
        * Glibc Version Number glibc 2.3.2-95.3 
        * Required OS Components
             - compat-db-4.0.14.5
             - compat-gcc-7.3-2.96.122
             - compat-gcc-c++-7.3-2.96.122
             - compat-libstdc++-7.3-2.96.122
             - compat-libstdc++-devel-7.3-2.96.122
             - openmotif21-2.1.30-8.i386.rpm 
             - setarch-1.3-1

检查结果:
[root@rac1 root]# cat a.sh
rpm -qa compat-db-4.0*
rpm -qa compat-gcc-7.3*
rpm -qa compat-gcc-c++-7.3*
rpm -qa compat-libstdc++-7.3*
rpm -qa compat-libstdc++-devel*
rpm -qa openmotif*
rpm -qa setarch*
[root@rac1 root]# ./a.sh
openmotif-2.2.2-16
setarch-1.3-1
[root@rac1 root]#

根据 Note:263715.1
Subject:  Configuring RHAS 30 for Usage with Oracle
查考内容:
=======================================
- After system bootup, login as root and insert the Disk2:

  mount /mnt/cdrom
  rpm -iv /mnt/cdrom/RedHat/RPMS/sysstat-4.*.rpm
  eject

- insert Disk3:

  mount /mnt/cdrom
  rpm -iv /mnt/cdrom/RedHat/RPMS/compat-db-4.*.rpm
  rpm -iv /mnt/cdrom/RedHat/RPMS/ORBit-0.*.rpm
  rpm -iv /mnt/cdrom/RedHat/RPMS/libpng10-1.*.rpm
  rpm -iv /mnt/cdrom/RedHat/RPMS/gnome-libs-1.*.rpm
  eject
=======================================

安装下面的包:
[root@rac1 root]# rpm -iv /mnt/cdrom/RedHat/RPMS/sysstat-4.*.rpm
warning: /mnt/cdrom/RedHat/RPMS/sysstat-4.0.7-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
sysstat-4.0.7-4
[root@rac1 root]# rpm -qa sysstat*
sysstat-4.0.7-4
[root@rac1 root]#

[root@rac1 root]#   rpm -iv /mnt/cdrom/RedHat/RPMS/compat-db-4.*.rpm
warning: /mnt/cdrom/RedHat/RPMS/compat-db-4.0.14-5.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
        package compat-db-4.0.14-5.1 (which is newer than compat-db-4.0.14-5) is already installed
        file /lib/libdb-3.1.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /lib/libdb-3.2.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /lib/libdb-3.3.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /lib/libdb-4.0.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /lib/libdb2.so.3 from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/berkeley_db31_svc from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/berkeley_db32_svc from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/berkeley_db33_svc from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/berkeley_db40_svc from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_archive from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_checkpoint from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_deadlock from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_dump from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_load from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_printlog from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_recover from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db2_stat from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_archive from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_checkpoint from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_deadlock from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_dump from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_load from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_printlog from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_recover from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_stat from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_upgrade from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db31_verify from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_archive from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_checkpoint from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_deadlock from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_dump from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_load from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_printlog from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_recover from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_stat from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_upgrade from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db32_verify from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_archive from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_checkpoint from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_deadlock from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_dump from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_load from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_printlog from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_recover from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_stat from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_upgrade from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db33_verify from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_archive from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_checkpoint from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_deadlock from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_dump from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_load from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_printlog from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_recover from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_stat from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_upgrade from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/bin/db40_verify from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_cxx-3.1.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_cxx-3.2.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_cxx-3.3.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_cxx-4.0.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_tcl-3.1.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_tcl-3.2.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_tcl-3.3.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb_tcl-4.0.so from install of compat-db-4.0.14-5 conflicts with file from package compat-db-4.0.14-5.1
[root@rac1 root]#
[root@rac1 root]#   rpm -iv /mnt/cdrom/RedHat/RPMS/ORBit-0.*.rpm
warning: /mnt/cdrom/RedHat/RPMS/ORBit-0.5.17-10.4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
ORBit-0.5.17-10.4
[root@rac1 root]#   rpm -iv /mnt/cdrom/RedHat/RPMS/libpng10-1.*.rpm
warning: /mnt/cdrom/RedHat/RPMS/libpng10-1.0.13-8.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
libpng10-1.0.13-8
[root@rac1 root]#   rpm -iv /mnt/cdrom/RedHat/RPMS/gnome-libs-1.*.rpm
warning: /mnt/cdrom/RedHat/RPMS/gnome-libs-1.4.1.2.90-34.1.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
        file /usr/bin/db1_dump185 from install of gnome-libs-1.4.1.2.90-34.1 conflicts with file from package compat-db-4.0.14-5.1
        file /usr/lib/libdb1.so.2 from install of gnome-libs-1.4.1.2.90-34.1 conflicts with file from package compat-db-4.0.14-5.1
[root@rac1 root]#


检查一下安装结果:
[root@rac1 root]# cat >a.sh
  rpm -qa sysstat*
  rpm -qa compat-db*
  rpm -qa ORBit*
  rpm -qa libpng10*
  rpm -qa gnome-lib
 
[root@rac1 root]# ./a.sh
sysstat-4.0.7-4
compat-db-4.0.14-5.1
ORBit2-2.6.2-1
ORBit-0.5.17-10.4
libpng10-1.0.13-8
[root@rac1 root]#

-----------------------------------------------------------
来自 www.puschitz.com:
rpm -q make /
       binutils /
       gcc /
       cpp /
       glibc-devel /
       glibc-headers /
       glibc-kernheaders /
       compat-db /
       compat-gcc /
       compat-gcc-c++ /
       compat-libstdc++ /
       compat-libstdc++-devel /
       gnome-libs /
       openmotif21 /
       setarch


检查结果:
[root@rac1 root]# rpm -qa compat*
compat-libstdc++-7.3-2.96.128
compat-db-4.0.14-5.1
compat-libstdc++-devel-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-gcc-7.3-2.96.128
[root@rac1 root]#

从网站上下载的rpm来安装:
[root@rac1 rpm_patch]# pwd
/oracle/tools/rpm_patch
[root@rac1 rpm_patch]# ll
total 9160
-rw-r--r--    1 root     root      3643323 Aug 29 11:50 compat-db-4.0.14-5.1.i386.rpm
-rw-r--r--    1 root     root      2439343 Aug 29 11:50 compat-gcc-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root      1850362 Aug 29 11:50 compat-gcc-c++-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root      1056574 Aug 29 11:50 compat-libstdc++-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root       362405 Aug 29 11:50 compat-libstdc++-devel-7.3-2.96.128.i386.rpm
[root@rac1 rpm_patch]# rpm -Uvh compat-db-4.0.14-5.1.i386.rpm
warning: compat-db-4.0.14-5.1.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package compat-db-4.0.14-5.1 is already installed
[root@rac1 rpm_patch]# rpm -Uvh compat-gcc-7.3-2.96.128.i386.rpm
warning: compat-gcc-7.3-2.96.128.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package compat-gcc-7.3-2.96.128 is already installed
[root@rac1 rpm_patch]# rpm -Uvh compat-gcc-c++-7.3-2.96.128.i386.rpm
warning: compat-gcc-c++-7.3-2.96.128.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package compat-gcc-c++-7.3-2.96.128 is already installed
[root@rac1 rpm_patch]# rpm -Uvh compat-libstdc++-7.3-2.96.128.i386.rpm
warning: compat-libstdc++-7.3-2.96.128.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package compat-libstdc++-7.3-2.96.128 is already installed
[root@rac1 rpm_patch]# rpm -Uvh compat-libstdc++-devel-7.3-2.96.128.i386.rpm
warning: compat-libstdc++-devel-7.3-2.96.128.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package compat-libstdc++-devel-7.3-2.96.128 is already installed
[root@rac1 rpm_patch]#
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
需要将gcc,g++更换为2.96版本的:
mv /usr/bin/gcc /usr/bin/gcc323
mv /usr/bin/g++ /usr/bin/g++323
ln -s /usr/bin/gcc296 /usr/bin/gcc
ln -s /usr/bin/g++296 /usr/bin/g++

[root@rac1 rpm_patch]# mv /usr/bin/gcc /usr/bin/gcc323
[root@rac1 rpm_patch]# mv /usr/bin/g++ /usr/bin/g++323
[root@rac1 rpm_patch]# ln -s /usr/bin/gcc296 /usr/bin/gcc
[root@rac1 rpm_patch]# ln -s /usr/bin/g++296 /usr/bin/g++

[root@rac1 bin]# ll gcc*
lrwxrwxrwx    1 root     root           15 Aug 29 11:57 gcc -> /usr/bin/gcc296
-rwxr-xr-x    2 root     root        81864 Mar 24  2004 gcc296
lrwxrwxrwx    1 root     root            7 Aug 28 12:58 gcc323 -> gcc3.23
-rwxr-xr-x    2 root     root        84740 Sep 16  2003 gcc3.23
-rwxr-xr-x    1 root     root        86184 Sep 18  2003 gcc-ssa
[root@rac1 bin]# ll g++*
lrwxrwxrwx    1 root     root           15 Aug 29 11:57 g++ -> /usr/bin/g++296
-rwxr-xr-x    3 root     root        81864 Mar 24  2004 g++296
-rwxr-xr-x    4 root     root        84740 Sep 16  2003 g++323
-rwxr-xr-x    1 root     root        88888 Sep 18  2003 g++-ssa
[root@rac1 bin]#
///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
设置内核参数:
  echo "" >> /etc/sysctl.conf
  echo "# Oracle specific settings" >> /etc/sysctl.conf
  echo "kernel.hostname = rac1.oracle.com" >> /etc/sysctl.conf
  echo "# semaphores in kernel.sem: semmsl semmns semopm semmni" >> /etc/sysctl.conf
  echo "kernel.sem = 256 32000 100 142" >> /etc/sysctl.conf
  echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
  echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
  echo "kernel.shmall = 3279547" >> /etc/sysctl.conf
  echo "fs.file-max = 327679" >> /etc/sysctl.conf
  echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
  echo "kernel.msgmni = 2878" >> /etc/sysctl.conf
  echo "kernel.msgmnb = 65535" >> /etc/sysctl.conf
  echo "" >> /etc/security/limits.conf
  echo "# Oracle specific settings" >> /etc/security/limits.conf
  echo "oracle soft nofile  1024" >> /etc/security/limits.conf
  echo "oracle hard nofile 65536" >> /etc/security/limits.conf
  echo "oracle soft nproc   2047" >> /etc/security/limits.conf
  echo "oracle hard nproc  16384" >> /etc/security/limits.conf
 

操作过程:
[root@rac1 rpm_patch]# >a.sh
[root@rac1 rpm_patch]# cat >a.sh
  echo "" >> /etc/sysctl.conf
  echo "# Oracle specific settings" >> /etc/sysctl.conf
  echo "kernel.hostname = rac1.oracle.com" >> /etc/sysctl.conf
  echo "# semaphores in kernel.sem: semmsl semmns semopm semmni" >> /etc/sysctl.conf
  echo "kernel.sem = 256 32000 100 142" >> /etc/sysctl.conf
  echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
  echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
  echo "kernel.shmall = 3279547" >> /etc/sysctl.conf
  echo "fs.file-max = 327679" >> /etc/sysctl.conf
  echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
  echo "kernel.msgmni = 2878" >> /etc/sysctl.conf
  echo "kernel.msgmnb = 65535" >> /etc/sysctl.conf
  echo "" >> /etc/security/limits.conf
  echo "# Oracle specific settings" >> /etc/security/limits.conf
  echo "oracle soft nofile  1024" >> /etc/security/limits.conf
  echo "oracle hard nofile 65536" >> /etc/security/limits.conf
  echo "oracle soft nproc   2047" >> /etc/security/limits.conf
  echo "oracle hard nproc  16384" >> /etc/security/limits.conf

[root@rac1 rpm_patch]# chmod 777 a.sh
[root@rac1 rpm_patch]# ./a.sh
[root@rac1 rpm_patch]#

检查内核参数的设置:
[root@rac1 rpm_patch]# cat /etc/sysctl.conf 
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax=1073741824

# Oracle specific settings
kernel.hostname = rac1.oracle.com
# semaphores in kernel.sem: semmsl semmns semopm semmni
kernel.sem = 256 32000 100 142
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 3279547
fs.file-max = 327679
net.ipv4.ip_local_port_range = 1024 65000
kernel.msgmni = 2878
kernel.msgmnb = 65535
[root@rac1 rpm_patch]#
 
///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
安装patch:
[root@rac1 tools]# cd other
[root@rac1 other]# ll
total 68
-rw-r--r--    1 oracle   dba         61549 Aug 29 12:14 unzip_lnx.Z
[root@rac1 other]# uncompress unzip_lnx.Z
[root@rac1 other]# ll
total 104
-rw-r--r--    1 oracle   dba        100472 Aug 29 12:14 unzip_lnx
[root@rac1 other]# cp unzip_lnx ../ora_patch/
[root@rac1 other]# cd ../ora_patch/
[root@rac1 ora_patch]# ll
total 108
-rw-r--r--    1 oracle   dba          1670 Aug 29 12:14 p3006854_9204_LINUX.zip
-rw-r--r--    1 root     root       100472 Aug 29 12:15 unzip_lnx
[root@rac1 ora_patch]# mv unzip_lnx unzip
[root@rac1 ora_patch]# ll
total 108
-rw-r--r--    1 oracle   dba          1670 Aug 29 12:14 p3006854_9204_LINUX.zip
-rw-r--r--    1 root     root       100472 Aug 29 12:15 unzip
[root@rac1 ora_patch]# unzip p3006854_9204_LINUX.zip
Archive:  p3006854_9204_LINUX.zip
   creating: 3006854/
  inflating: 3006854/rhel3_pre_install.sh 
  inflating: 3006854/README.txt     
[root@rac1 ora_patch]# ll
total 112
drwxrwxr-x    2 root     root         4096 May 10  2004 3006854
-rw-r--r--    1 oracle   dba          1670 Aug 29 12:14 p3006854_9204_LINUX.zip
-rw-r--r--    1 root     root       100472 Aug 29 12:15 unzip
[root@rac1 ora_patch]# cd 3006854/
[root@rac1 3006854]# ll
total 8
-rw-rw-r--    1 root     root         1360 Mar 18 07:03 README.txt
-rw-r--r--    1 root     root         1254 Mar 18 07:11 rhel3_pre_install.sh
[root@rac1 3006854]# chmod 777 rhel3_pre_install.sh
[root@rac1 3006854]# ./rhel3_pre_install.sh
Applying patch...
Ensuring permissions are correctly set...
Done.
Patch successfully applied
[root@rac1 3006854]#
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
安装rsh:
[root@rac1 rpm_patch]# ll
total 9236
-rw-r--r--    1 root     root      3643323 Aug 29 11:50 compat-db-4.0.14-5.1.i386.rpm
-rw-r--r--    1 root     root      2439343 Aug 29 11:50 compat-gcc-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root      1850362 Aug 29 11:50 compat-gcc-c++-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root      1056574 Aug 29 11:50 compat-libstdc++-7.3-2.96.128.i386.rpm
-rw-r--r--    1 root     root       362405 Aug 29 11:50 compat-libstdc++-devel-7.3-2.96.128.i386.rpm
-rw-r--r--    1 oracle   dba         37531 Aug 29 13:32 rsh-0.17-19.i386.rpm
-rw-r--r--    1 oracle   dba         35339 Aug 29 13:32 rsh-server-0.17-19.i386.rpm
[root@rac1 rpm_patch]# rpm -Uvh rsh-0.17-19.i386.rpm
warning: rsh-0.17-19.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:rsh                    ########################################### [100%]
[root@rac1 rpm_patch]# rpm -Uvh rsh-server-0.17-19.i386.rpm
warning: rsh-server-0.17-19.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:rsh-server             ########################################### [100%]
[root@rac1 rpm_patch]#
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
重新启动主机:
[root@rac1 /]# shutdown -h now

Broadcast message from root (pts/2) (Mon Aug 29 13:42:58 2005):

The system is going down for system halt NOW!
[root@rac1 /]#
///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
准备安装oracle:
建立用户和组:
- create the group oinstall and dba

  groupadd -g 500 oinstall
  groupadd -g 501 dba

- create the user oracle

  useradd -u 502 -g oinstall -G dba -d /home/oracle oracle -s /bin/bash

- Specify a password for user oracle

  passwd oracle

- Make oracle the owner of the oracle install directory

  chown oracle:oinstall /oracle
///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
修改安装盘所在目录属主:
[root@rac1 /]# chown -R oracle:dba /oracle/
[root@rac1 /]# ll /oracle/
total 20
drwx------    2 oracle   dba         16384 Aug 28 07:51 lost+found
drwxr-xr-x    8 oracle   dba          4096 Aug 29 12:12 tools
[root@rac1 /]#
///////////////////////////////////////////////////////////////


[oracle@rac1 oracle]$ cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file

# Oracle specific settings
oracle soft nofile  1024
oracle hard nofile 65536
oracle soft nproc   2047
oracle hard nproc  16384
[oracle@rac1 oracle]$

[oracle@rac1 oracle]$ ulimit -n
1024
[oracle@rac1 oracle]$
[root@rac1 root]# ulimit -n 63536
[root@rac1 root]# ulimit -n
63536
[root@rac1 root]#

///////////////////////////////////////////////////////////////
设置oracle用户环境变量:
原始的.bash_profile文件内容:
[oracle@rac1 oracle]$ 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
unset USERNAME
[oracle@rac1 oracle]$

修改后的内容:
# .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
unset USERNAME

export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/app
export ORACLE_SID=test
export PATH=$ORACLE_HOME/bin:$PATH
export LIBPATH=$ORACLE_HOME/lib
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;
export NLS_LANG=american_america.AL32UTF8
export DISPLAY=10.2.10.250:0

PS1='[/u@$ORACLE_SID@/h $PWD]$ ';export PS1
PATH=$ORACLE_HOME/bin:$PATH;export PATH

alias ll='ls -l --color'
alias cdo='cd $ORACLE_HOME'
alias sql='sqlplus "/ as sysdba"'

umask 022
cd $ORACLE_HOME

export LD_ASSUME_KERNEL=2.4.19
 注意:  如果不设置LD_ASSUME_KERNEL, 则不能启动jre,也就不能启动安装界面.

///////////////////////////////////////////////////////////////
安装前再作一次检查:
检查一些必须的rpm包:
[oracle@rac1 oracle]$ rpm -qa | grep compat
compat-libstdc++-7.3-2.96.128
compat-db-4.0.14-5.1
compat-libstdc++-devel-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-gcc-7.3-2.96.128
[oracle@rac1 oracle]$

[oracle@rac1 oracle]$ rpm -qa | grep openmotif
openmotif21-2.1.30-8
openmotif-2.2.2-16
[oracle@rac1 oracle]$ rpm -qa | grep setarch
setarch-1.3-1
[oracle@rac1 oracle]$

确认gcc和g++版本正确:
[oracle@rac1 oracle]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-128)
[oracle@rac1 oracle]$

[oracle@rac1 oracle]$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-128)
[oracle@rac1 oracle]$


检查环境变量:
[oracle@rac1 oracle]$ uname -a
Linux rac1.oracle.com 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux
[oracle@rac1 oracle]$

[oracle@rac1 oracle]$ rpm -qa | grep glibc
glibc-profile-2.3.2-95.3
glibc-common-2.3.2-95.3
glibc-kernheaders-2.4-8.34
glibc-devel-2.3.2-95.3
glibc-2.3.2-95.3
glibc-utils-2.3.2-95.3
glibc-headers-2.3.2-95.3
[oracle@rac1 oracle]$

[oracle@rac1 app]$ env | grep ORA
ORACLE_SID=test
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/app
ORA_NLS33=/oracle/app/ocommon/nls/admin/data
[oracle@rac1 app]$


[oracle@rac1 oracle]$ env | grep LD_ASSUME_KERNEL
LD_ASSUME_KERNEL=2.4.19
[oracle@rac1 oracle]$
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
运行runInstaller之前,需要打补丁3006854: 注意,必须以root身份运行.

# unzip p3006854_9204_LINUX.zip
Archive: p3006854_9204_LINUX.zip
creating: 3006854/
inflating: 3006854/rhel3_pre_install.sh
inflating: 3006854/README.txt

# cd 3006854
# sh rhel3_pre_install.sh
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
开始安装:
需要的oracle patch:
需要的补丁:
(1)、p3095277_9204_LINUX.zip 9.2.0.4.0的升级补丁包.(升级到9402的大patch)
  这个补丁等安装完9201(只安装软件,不建库)以后再打。
  即: Oracle 9i Release 2 Patch Set 3 Version 9.2.0.4.0 for Linux x86
  
(2)、p3006854_9204_LINUX.zip 在运行 runInstaller 之前打.(修改一些文件的权限)
  这个补丁需要在安装9201以前就打

(3)、p3119415_9204_LINUX.zip
  这个补丁需要在升级到9.2.0.4.0之后打.(升级到9204以后,即安装完(1)中的升级补丁后,需要安装的小patch)
  因为在安装(1)的升级patch时,link过程到82%时,系统会提示一个错误,点击“igrone”后,等升级到9204后,打这里的这个patch就可以解决问题。
  
(4)、p2617419_210_GENERIC.zip 这是oracle关键打小patch时需要的opatch工具,
  这里Opatch是打3119415补丁时所需要的工具


安装过程中需要以root身份执行两个sh,分别是:
(1)在安装开始时,oracle会提示需要 “以root身份执行 /tmp/orainstRoot.sh ”:
[root@rac1 oracle9]# /tmp/orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /oracle/oraInventory to dba.
[root@rac1 oracle9]#

会遇到2个错误,点击ignore就可以了,等到升级到9204以后再打patch。
 错误1:Error in invoking target install of makefile /oracle/product/9.2.0/network/lib/ins_oemagent.mk.
 错误2:Error in invoking target install of makefile /oracle/product/9.2.0/ctx/lib/ins_ctx.mk.


(2)在安装快结束时,oracle会提示需要 “以 root 身份执行$ORACLE/root.sh ”:
[root@rac1 oracle9]# /oracle/app/root.sh
Running Oracle9 root.sh script...
/nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/app

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

/nCreating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@rac1 oracle9]#

///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
安装OPatch:
从metalink上下载 —— p2617419_210_GENERIC.zip

在 profiile中添加:
PATH=$ORACLE_HOME/bin:/home/oracle/OPatch:$PATH;export PATH

或者在命令行使用:
$ export PATH=$PATH:/tmp/OPatch
$ export PATH=$PATH:/sbin       


例如:
[oracle@rac1 oracle]$ cat /home/oracle/.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_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/app
export ORACLE_SID=test
export PATH=$ORACLE_HOME/bin:$PATH
export LIBPATH=$ORACLE_HOME/lib
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;
export NLS_LANG=american_america.AL32UTF8
export DISPLAY=10.2.10.250:0

unset USERNAME

iPS1='[/u@$ORACLE_SID@/h $PWD]$ ';export PS1
PATH=$ORACLE_HOME/bin:/home/oracle/OPatch:$PATH;export PATH

alias ll='ls -l --color'
alias cdo='cd $ORACLE_HOME'
alias sql='sqlplus "/ as sysdba"'

umask 022
cd $ORACLE_HOME

export LD_ASSUME_KERNEL=2.4.19

[oracle@rac1 oracle]$
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
安装p3095277_9204_LINUX.zip,来升级oracle 9201 到 9204
(1)解压缩patch:
su - oracle
$ cp p3095277_9204_LINUX.zip /oracle/tools/ora_patch/update_to_9204
$ cd /oracle/tools/ora_patch/update_to_9204
$ unzip p3095277_9204_LINUX.zip
Archive:  p3095277_9204_LINUX.zip
  inflating: 9204_lnx32_release.cpio
  inflating: README.html
  inflating: patchnote.css
$
$ cpio -idmv < 9204_lnx32_release.cpio
Disk1/stage/locks
Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/bin.1.1.jar
Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/lib.1.1.jar
...

$


(2)安装patch:
安装patch时,首先需要安装 “Oracle Universial Installer 2.2.0.18.0”,然后再安装相映的patch(从oracle9201以后都是这样的)。
因此,需要运行两次“runInstaller”,第一次是选择安装“Oracle Universial Installer 2.2.0.18.0”;
第二次,选择安装“Oracle9iR2 Patch Set 3 9.2.0.4.0 !”

例如:
第一次
[oracle@rac1 oracle]$ echo $LD_ASSUME_KERNEL
2.4.19
[oracle@rac1 oracle]$ cd /oracle/tools/ora_patch/update_to_9204/Disk1/
[oracle@rac1 Disk1]$ $ ./runInstaller

 - Welcome Screen:       Click Next
 - File Locations:       Use default values
 - Available Products:   Select "Oracle Universial Installer 2.2.0.18.0 !"  注意这个地方
 - Components Locations: Accept default values and click Next
 - Summary:              Start the Install
 - At the end of the installation, you must exit runInstaller!

第二次
su - oracle
$ echo $LD_ASSUME_KERNEL    # it is important that this variable is set!
2.4.1
$ cd $ORACLE_HOME/bin
$ ./runInstaller

 - Welcome Screen:       Click Next
 - File Locations:       Use default values
 - Available Products:   Select "Oracle9iR2 Patch Set 3 9.2.0.4.0 !"  注意这个地方
 - Summary:              Start the Install
 - At the end of the installation, exit runInstaller

在安装“Oracle9iR2 Patch Set 3 9.2.0.4.0”的过程中,link过程到82%时会提示:
  Error in invoking target install of makefile /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk.
这时点击“ignore”,等到安装过程结束后,通过打patch 3119415,可以解决问题。

在安装过程快结束时,系统会提示“使用root用户执行脚本 /oracle/app/root.sh”,例如:
[root@rac1 app]# /oracle/app/root.sh
Running Oracle9 root.sh script...
/nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/app

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@rac1 app]#

///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
安装 patch 3119415:
[oracle@rac1 3119415]$ pwd
/oracle/tools/ora_patch/3119415
[oracle@rac1 3119415]$ which perl
/usr/bin/perl
[oracle@rac1 3119415]$ which opatch
~/OPatch/opatch
[oracle@rac1 3119415]$ opatch apply

Oracle Interim Patch Installer version 1.0.0.0.53
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..

We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com

Oracle Home = /oracle/app
Location of Oracle Universal Installer components = /oracle/oui
Location of OraInstaller.jar  = "/oracle/oui/lib"
Oracle Universal Installer shared library = /oracle/oui/bin/linux/liboraInstaller.so
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Inventory = /oracle/oraInventory
Path to Java = /oracle/jre/1.3.1/bin/java
Log file = /oracle/app/.patch_storage/<patch ID>/*.log

Creating log file "/oracle/app/.patch_storage/3119415/Apply_3119415_09-01-2005_08-55-19.log"

Invoking fuser to check for active processes.

Invoking fuser on "/oracle/app/bin/sqlplus"
Backing up comps.xml ...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shut down Oracle instances running out of this ORACLE_HOME
(Oracle Home = /oracle/app)
Is this system ready for updating?
Please respond Y|N >


Please shut down Oracle instances running out of this ORACLE_HOME
(Oracle Home = /oracle/app)
Is this system ready for updating?
Please respond Y|N >
y
Applying patch 3119415...

Patching copy files...


Updating inventory...
Backing up comps.xml ...


OPatch succeeded.
[oracle@rac1 3119415]$


检查patch是否安装成功:
[oracle@rac1 3119415]$ opatch lsinventory

Oracle Interim Patch Installer version 1.0.0.0.53
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..

We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com

Oracle Home = /oracle/app
Location of Oracle Universal Installer components = /oracle/oui
Location of OraInstaller.jar  = "/oracle/oui/lib"
Oracle Universal Installer shared library = /oracle/oui/bin/linux/liboraInstaller.so
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Inventory = /oracle/oraInventory
Path to Java = /oracle/jre/1.3.1/bin/java
Log file = /oracle/app/.patch_storage/<patch ID>/*.log

Creating log file "/oracle/app/.patch_storage/LsInventory__09-01-2005_08-57-35.log"

Result:

Now calling getCompatCompEntry, ohIndex is: 1

  Installed Patch List:
  =====================
  1) Patch 3119415 applied on Thu Sep 01 08:55:40 EDT 2005
      [ Base Bug(s): 3119415  ]


OPatch succeeded.
[oracle@rac1 3119415]$

///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
检查agentctl工作是否正常:
[oracle@rac1 3119415]$ agentctl
agentctl: error while loading shared libraries: libvppdc.so: cannot open shared object file: No such file or directory
[oracle@rac1 3119415]$

(1)、遇到上述问题的解决方法(我遇到了这个问题):
[oracle@rac1 3119415]$ agentctl
agentctl: error while loading shared libraries: libvppdc.so: cannot open shared object file: No such file or directory
[oracle@rac1 3119415]$ find $ORACLE_HOME -name libvppdc.so
/oracle/app/lib/libvppdc.so
[oracle@rac1 3119415]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
[oracle@rac1 3119415]$ agentctl start

DBSNMP for Linux: Version 9.2.0.4.0 - Production on 01-SEP-2005 09:11:38

Copyright (c) 2003 Oracle Corporation.  All rights reserved.

Starting Oracle Intelligent Agent....[oracle@rac1 3119415]$

(2)、如果遇到下面的问题(我没有遇到这个问题):
$ agentctl start

DBSNMP for Linux: Version 9.2.0.4.0 - Production on 07-JAN-2004 19:11:14

Copyright (c) 2003 Oracle Corporation.  All rights reserved.

Starting Oracle Intelligent Agent.../u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156:  1855 Segmentation fault      nohup $ORACLE_HOME/bin/dbsnmp $*
>>$DBSNMP_WDLOGFILE 2>&1
/u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156:  1868 Segmentation fault      nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156:  1880 Segmentation fault      nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/u01/app/oracle/product/9.2.0/bin/dbsnmpwd: line 156:  1892 Segmentation fault      nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1

可以通过安装 patch 3238244 解决:
[oracle@rac1 ora_patch]$ ll
total 416
drwxrwxr-x    2 oracle   dba          4096 May 10  2004 3006854
drwxr-xr-x    4 oracle   dba          4096 Oct 20  2003 3119415
drwxr-xr-x    2 oracle   dba          4096 Aug 29 15:52 opatch
-rw-r--r--    1 oracle   dba          1670 Aug 29 12:14 p3006854_9204_LINUX.zip
-rw-r--r--    1 oracle   dba          6432 Aug 29 15:18 p3119415_9204_LINUX.zip
-rw-r--r--    1 oracle   dba        286639 Sep  1 09:16 p3238244_9204_LINUX.zip
-rw-r--r--    1 oracle   dba        100472 Aug 29 12:15 unzip
drwxr-xr-x    3 root     root         4096 Sep  1 07:48 update_to_9204
[oracle@rac1 ora_patch]$ unzip p3238244_9204_LINUX.zip
Archive:  p3238244_9204_LINUX.zip
   creating: 3238244/
   creating: 3238244/files/
   creating: 3238244/files/lib/
   creating: 3238244/files/lib/stubs/
  inflating: 3238244/files/lib/stubs/ld-linux-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libBrokenLocale-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libBrokenLocale.so 
  inflating: 3238244/files/lib/stubs/libNoVersion-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libc-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libc.so 
  inflating: 3238244/files/lib/stubs/libc.so.6 
  inflating: 3238244/files/lib/stubs/libcrypt-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libcrypt.so 
  inflating: 3238244/files/lib/stubs/libdl-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libdl.so 
  inflating: 3238244/files/lib/stubs/libm-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libm.so 
  inflating: 3238244/files/lib/stubs/libnsl-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libnsl.so 
  inflating: 3238244/files/lib/stubs/libpthread-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libpthread.so 
  inflating: 3238244/files/lib/stubs/libresolv-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libresolv.so 
  inflating: 3238244/files/lib/stubs/librt-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/librt.so 
  inflating: 3238244/files/lib/stubs/libutil-2.2.2-stub.so 
  inflating: 3238244/files/lib/stubs/libutil.so 
   creating: 3238244/etc/
   creating: 3238244/etc/config/
  inflating: 3238244/etc/config/inventory 
  inflating: 3238244/etc/config/actions 
   creating: 3238244/etc/xml/
  inflating: 3238244/etc/xml/GenericActions.xml 
  inflating: 3238244/etc/xml/ShiphomeDirectoryStructure.xml 
  inflating: 3238244/README.txt     
[oracle@rac1 ora_patch]$ ll
total 420
drwxrwxr-x    2 oracle   dba          4096 May 10  2004 3006854
drwxr-xr-x    4 oracle   dba          4096 Oct 20  2003 3119415
drwxr-xr-x    4 oracle   dba          4096 Dec 19  2003 3238244
drwxr-xr-x    2 oracle   dba          4096 Aug 29 15:52 opatch
-rw-r--r--    1 oracle   dba          1670 Aug 29 12:14 p3006854_9204_LINUX.zip
-rw-r--r--    1 oracle   dba          6432 Aug 29 15:18 p3119415_9204_LINUX.zip
-rw-r--r--    1 oracle   dba        286639 Sep  1 09:16 p3238244_9204_LINUX.zip
-rw-r--r--    1 oracle   dba        100472 Aug 29 12:15 unzip
drwxr-xr-x    3 root     root         4096 Sep  1 07:48 update_to_9204
[oracle@rac1 ora_patch]$ cd 3238244/
[oracle@rac1 3238244]$ ll
total 16
drwxr-xr-x    4 oracle   dba          4096 Dec 19  2003 etc
drwxr-xr-x    3 oracle   dba          4096 Dec 19  2003 files
-rw-r--r--    1 oracle   dba          4733 Dec 19  2003 README.txt
[oracle@rac1 3238244]$ opatch apply


///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
创建数据库:
使用DBCA建库,或者手工建库都可以,这个就很简单了,没什么可说的,呵呵。


///////////////////////////////////////////////////////////////

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值