|
以下文章转贴自 http://www.puschitz.com
原文链接如下:
http://www.puschitz.com/InstallingOracle9i.shtml
Copyright Notice
This article may not be published, sold, reproduced or copied in whole or in part without obtaining permission first. But you are welcome to put links from your site to the article.
The information provided in this article shows how I installed Oracle on my server(s) and is distributed AS IS. Every effort has been made to provide the information as accurate as possible, but no warranty or fitness is implied. The use of this information described herein is your responsibility, and to use it in your own environments do so at your own risk.
Here is a summary (HOWTO) of how I installed:
Oracle 9iR2 (9.2.0) Database on Red Hat Advanced Server 2.1 (kernel 2.4.9-e.3, glibc 2.2.4-26)
Oracle 9iR2 (9.2.0) Database on Red Hat 9 (kernel kernel-2.4.20-6, glibc 2.3.2-5)
Oracle 9iR2 (9.2.0) Database on Red Hat 8.0 (kernel 2.4.18-18.8.0, glibc 2.2.93-5)
Oracle 9iR2 (9.2.0) Database on Red Hat 7.3 (kernel 2.4.18-3, glibc 2.2.5-34)
Oracle 9iR1 (9.0.1) Database on Red Hat 7.3 (kernel 2.4.18-3, glibc 2.2.5-34)
Oracle 9iR1 (9.0.1) Database on Red Hat 7.2 (kernel 2.4.7-10, glibc 2.2.4-13)
Oracle 9iR1 (9.0.1) Database on Red Hat 7.1 (kernel 2.4.2-2, glibc 2.2.2-10)
Validation/Certification:
Release 2 of Oracle 9i Database and Application Server, and Oracle E-Business Suite 11.5.7 have been certified on Red Hat Linux Advanced Server 2.1, see " Oracle and Red Hat Collaborate to Develop Enhanced Enterprise Capabilities for Red Hat Linux Advanced Server." Red Hat 7.1 has been validated for Oracle9i Database and for Oracle9i Application Server, see Red Hat Announces Validation of Red Hat Linux For Oracle.
Errors and Problems:
Some of the Oracle errors and problems covered here were only experienced in connection with 9i (9.0.1) and some only with 9iR2 (9.2.0). But since I cannot say for sure that a 9i (9.0.1) installation error will never show up during 9iR2 (9.2.0) installation, I simply kept all errors and problems listed together, see Oracle Installation Errors and Oracle Installation Problems, Important Tips and Hints.
Red Hat 9:
Red Hat 9 includes now the the Native POSIX Thread Library (NPTL) which is an improved implementation of POSIX threads for Linux. But using NPTL will cause several problems for Oracle applications. Note that Oracle9i has not been certified on Red Hat 9!
So to fix this problem, you can set the environment variable LD_ASSUME_KERNEL to 2.4.1, which means that the old "Linuxthreads with floating stacks" implementation will be used. Otherwise the Oracle installer runInstaller will hang, the Database Configuration Assistant dbca won't start etc.; see Oracle Installation Errors for more information. To see where this environment variable can be set, see Set Oracle Environments. For more information on LD_ASSUME_KERNEL, see Red Hat Linux 9 Release Notes.
NOTE: Before you install Oracle9iR2, make sure that you first read the information about the error message "Error in invoking target install of make file /opt/oracle/product/9.2.0/network/lib/ins_oemagent.mk" in the Oracle Installation Errors section!
Red Hat 8.0:
The only problem I experienced with Oracle 9iR2 (9.2.0) on Red Hat 8.0 was:
"Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk"
But this does not necessarily mean that you won't see other problems described here. See Oracle Installation Errors for more information.
Documentation
Oracle9i Database Documentation for Linux
Tuning and Optimizing Red Hat Linux Advanced Server for Oracle9i Database
Oracle9iR2 on Linux: Performance, Reliability and Manageability Enhancements on Red Hat Linux Advanced Server 2.1
An Overview of Red Hat Advanced Server V2.1 Reliability, Availability, Scalability, and Manageability (RASM) Features
Downloading and Installing Red Hat Linux 7.1, 7.2, 7.3, 8.0, 9
To download Red Hat Linux 7.x, 8.0, 9, check the links at http://www.puschitz.com/RedhatDownload.html
You can find the installation guides for installing Red Hat Linux under Red Hat Linux Manuals.
NOTE: You cannot download Red Hat Linux Advanced Server 2.1, you can only download the source code. If you want to get the binary CDs, you will have to buy it at http://www.redhat.com/software/linux/advanced/. But Red Hat is offering a Developer Edition of Advanced Server 2.1 at a very affordable price.
Unpacking Downloaded Oracle9i Installation Files and Burning Oracle9i CDs
Download Oracle9i for Linux from the following web site:
http://otn.oracle.com/software/p ... docs/linuxsoft.html
Uncompress and unpack downloaded files:
For Oracle9i (9.2.0):
One step procedure (uses less disk space and is faster):
zcat lnx_920_disk1.cpio.gz | cpio -idmv
zcat lnx_920_disk2.cpio.gz | cpio -idmv
zcat lnx_920_disk3.cpio.gz | cpio -idmv
Two step procedure:
# Uncompress
gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz Linux9i_Disk3.cpio.gz
# Unpack the downloaded files:
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
For Oracle9i (9.0.1):
One step procedure (uses less disk space and is faster):
zcat Linux9i_Disk1.cpio.gz | cpio -idmv
zcat Linux9i_Disk2.cpio.gz | cpio -idmv
zcat Linux9i_Disk3.cpio.gz | cpio -idmv
Two step procedure:
# 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
Now you should have 3 directories containing installation files:
Disk1
Disk2
Disk3
I executed the following commands when I burned the 3 CDs:
mkisofs -r Disk1 | cdrecord -v --eject dev=0,0,0 speed=15 -
mkisofs -r Disk2 | cdrecord -v --eject dev=0,0,0 speed=15 -
mkisofs -r Disk3 | cdrecord -v --eject dev=0,0,0 speed=15 -
(You can get the dev numbers when you execute cdrecord -scanbus).
Swap Space
In order to perform a typical Oracle 9i installation and to create a simple prototype database, Oracle says that you need a minimum of 512MB of RAM for the Oracle9i (9.0.1) Server, and the amount of disk space (swap space) should be equal to twice the amount of RAM or at least 400 MB, whichever is greater.
When I installed Oracle 9i (9.0.1 & 9.2.0), I used 600 MB of swap space on a PC with 256MB of RAM which worked for me. When I used less swap space on this PC (256MB RAM), I ran out of memory. I definitely recommend to use more RAM and/or more swap space as specified in the Oracle installation guide.
NOTE: If you do not have enough swap space or RAM during the Oracle installation, in particular during the database creation, your Oracle server (Linux) will temporarily become unresponsive to any events for several minutes.
For more information on correctly sizing the swap space for your database, see Sizing Swap Space.
To check the memory, run:
grep MemTotal /proc/meminfo
To check the swap space, run:
cat /proc/swaps
You can also add temporary swap space by creating a temporary swap file instead of using a raw device. Here is the procedure:
su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap
To disable the temporary swap space execute the following commands:
su - root
swapoff tmpswap
rm tmpswap
Shared Memory
For Oracle 9i (9.2.0) installation I had to increase the maximum shared memory size on my Linux server for all Red Hat versions. The Oracle Database Configuration Assistant displayed the following error message on my server:
ORA-27123: unable to attach to shared memory segment.
I temporarely increased the shmmax setting for the kernel by executing the following command:
$ su - root
# cat /proc/sys/kernel/shmmax
33554432
# echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax
# cat /proc/sys/kernel/shmmax
1073741824
It is recommended to increase the shmmax setting permanently for Oracle. For more information, see Oracle Installation Errors.
For more information on optimizing shared memory settings for Oracle databases on Linux, see Setting Shared Memory. These parameters apply to all Red Hat Linux versions. But note that except for the shmmax parameter, these parameter do not need to be changed for installing Oracle on Linux. But you might want to adjust all shared memory settings later to optimize the server for Oracle.
/tmp Space
The Oracle Universal Installer requires up to 400 MB of free space in the /tmp directory. If you do not have enough space in the /tmp directory, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:
su - root
mkdir /<AnotherFilesystem>/tmp
chown root.root /<AnotherFilesystem>/tmp
chmod 1777 /<AnotherFilesystem>/tmp
export TEMP=/<AnotherFilesystem> # used by Oracle
export TMPDIR=/<AnotherFilesystem> # used by Linux programs like the linker "ld"
When you are done with your Oracle installation, shutdown Oracle and remove the temporary directory:
su - root
rmdir /<AnotherFilesystem>/tmp
unset TEMP
unset TMPDIR
Oracle Disk Space
You will need about 2.5 GB for the database software. If you perform a typical database installation and not a customized database installation, then you will need about 3.5 GB of disk space.
The "binutils" Issue
You can skip this step for Oracle9iR2.
I did not experience this problem with Oracle 9i (9.2.0), but only with Oracle 9i (9.0.1).
The binutils package that comes with Red Hat 7.1, 7.2, 7.3, and with RedHat 2.1 Advanced Server doesn't work with Oracle 9i (9.0.1) Universal Installer. Here are the options you have for 9.0.1:
I recommend the following approach:
Wait for the following Oracle installation error:
"Error invoking target install of makefile /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
And fix this problem as described in Oracle Installation Errors.
I recommend this approach since it obviates the need to change binutils.
I do not recommend the following approach:
Download the following binutil RPM version and downgrade binutil on the Oracle server:
ftp://ftp.redhat.com/pub/redhat/ ... .10.0.18-1.i386.rpm
su - root
rpm -Uvh --force --nodeps binutils-2.10.0.18-1.i386.rpm
When you are done with the Oracle installation, you upgrade your binutil RPM back to the version you had before you downgraded. E.g. on the Red Hat 7.2 server I did:
rpm -Uvh --force --nodeps binutils-2.11.90.0.8-9.i386.rpm
Here is Oracle's official solution for Oracle 9iR1 or 9iR1 iAS on RedHat 2.1 Advanced Server which I don't like:
http://otn.oracle.com/software/p ... inutils_readme.html
Development Packages (RPMs)
You will need the following RPM development packages for the Oracle installer to compile the Oracle modules etc.:
gcc
cpp
glibc-devel
compat-libstdc++
kernel-headers (for RH 7.1, 7.2, 2.1AS)
glibc-kernheaders (for RH 7.3, 8.0, 9)
binutils
If you do not have these RPMs installed, you'll get for example an error message like this one:
Error in invoking target ntcontab.o of makefile
/opt/oracle/product/9.2.0/network/lib/ins_net_client.mk
To see if these development packages are installed on your server, run the following command for RH 7.1, 7.2, and 2.1AS:
rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils
Run the following command for RH 7.3, 8.0, and 9:
rpm -q gcc cpp compat-libstdc++ glibc-devel glibc-kernheaders binutils
For instance, most of these packages will be missing when you installed RedHat 2.1 Advanced Server and if you did not select the "Software Development" package. For the RedHat 2.1 Advanced Server I executed the following commands to install the missing RPMs from the two CDs:
su - root
rpm -ivh cpp-2.96-108.1.i386.rpm \
glibc-devel-2.2.4-26.i386.rpm \
kernel-headers-2.4.9-e.3.i386.rpm \
gcc-2.96-108.1.i386.rpm \
binutils-2.11.90.0.8-12.i386.rpm1 |
|