LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 11304|回复: 15

Installing Oracle 9i on RedHat Linux 7., 8.0, 9 and on Red Hat Advanced Server

[复制链接]
发表于 2003-7-17 07:12:39 | 显示全部楼层 |阅读模式
以下文章转贴自 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
 楼主| 发表于 2003-7-17 07:13:29 | 显示全部楼层
For instance, when I installed Red Hat 9.0 and when I used the default packages for the Installation Type "Server", I had to install the following RPMs afterwards:
su - root
rpm -ivh binutils-2.13.90.0.18-9.i386.rpm \
cpp-3.2.2-5.i386.rpm \
gcc-3.2.2-5.i386.rpm \
glibc-devel-2.3.2-5.i386.rpm \
glibc-kernheaders-2.4-8.10.i386.rpm
NOTE: Before you install Oracle9iR2, make sure that you also 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!


JDK

You can skip this step for Oracle9iR2.

I successfully installed Oracle9iR2 without installing JDK on the system. Oracle comes now with its own Java. This means that you don't have to execute the following steps which were required for older Oracle versions:

Download JDK 1.3.1 or Blackdown 1.1.8_v3: (I usually used Blackdown)
http://www.blackdown.org
http://java.sun.com

According to the JDK documentation, install JDK under /usr/local. Then create a symbolic link to the JDK under /usr/local/java:
su - root
bzip2 -dc jdk118_v3-glibc-2.1.3.tar.bz2 | tar xf - -C  /usr/local
ln -s /usr/local/jdk118_v3 /usr/local/java


Create Oracle User Accounts

su - root
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
passwd oracle
For more information on the "oinstall" group account, see When to use "OINSTALL" group during install of oracle.


Create Oracle Directories

In this example, make sure that the /opt filesystem is large enough, see Oracle Disk Space for more information. If /opt is not on a separate filesystem, then make sure the root filesystem "/" has enough space.

su - root
mkdir /opt/oracle
mkdir /opt/oracle/product
mkdir /opt/oracle/product/9.2.0
chown -R oracle.oinstall /opt/oracle
                                          
mkdir /var/opt/oracle
chown oracle.dba /var/opt/oracle
chmod 755 /var/opt/oracle


Set Oracle Environments

Set the following Oracle environment variables before you start runInstaller.

As the oracle user execute the following commands:
# !!! Set the following environment variable only for Red Hat 9 !!!
# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:

export LD_ASSUME_KERNEL=2.4.1

# Oracle Environment
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2.0
export ORACLE_SID=test
export ORACLE_TERM=xterm
# export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN;
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

# Set shell search paths
export PATH=$PATHORACLE_HOME/bin

I successfully installed Oracle9iR2 without setting the following CLASSPATH environment variable:
# CLASSPATH=$ORACLE_HOME/JREORACLE_HOME/jlibORACLE_HOME/rdbms/jlib
# CLASSPATH=$CLASSPATHORACLE_HOME/network/jlib
# export CLASSPATH

You can put these environment settings at the end of the ~oracle/.bash_profile file if you use bash. By this way you don't have to set the environment variables again when you login as "oracle", or when you switch to the user "oracle" by executing "su - oracle".


Start runInstaller

Before you continue, make sure you have set the Oracle environment variables, see above.

Oracle no longer supports a character mode installer. Therefore, in order to execute runInstaller directly from a console of a machine you are logged into (in this example the node name where Oracle is running is called "oracleserver"), you need to set the DISPLAY environment variable. Before you do that, make sure that you also allow runInstaller on "oracleserver" to display X information on your Linux desktop machine (in this example, the PC name where you are running X Windows like KDE or GNOME is called "yourdesktop"), because programs running on remote machines cannot display information to your screen unless you give them the authority to do so. Note that the X display relink mechanism does not work for NT desktop machines unless you use Exceed.

Before you run runInstaller, execute e.g. 'xterm' to see if your X setup is really working! If you install Oracle on your desktop PC and not on a remote node, then you can skip step 1 and 3.

Step 1: Allow "oracleserver" to display X information to your desktop PC "yourdesktop":

  yourdesktop:user$ xhost +oracleserver
Step 2: Open a new window and login to the Oracle server "oracleserver" as root. This window will be used for mounting and unmounting the Oracle CDs.
  oracleserver su - root
  oracleserver:root# mount /mnt/cdrom

Step 3: From the console of your Oracle server "oracleserver" where you will run runInstaller, execute the following commands:
  oracleserver su - oracle
  oracleserverracle$ export DISPLAY=yourdesktop:0.0
Step 4: Now execute runInstaller as "oracle". Do not cd to /mnt/cdrom !!
  oracleserverracle$ /mnt/cdrom/runInstaller



Running Oracle Installation

Keep in mind that you will get one or more errors here during the Oracle installation! See Oracle Installation Errors for more information.

This is how I answered the questions for the runInstaller:

- What would you like as the base directory (Inventory Location):

  /opt/oracle/oraInventory
- UNIX Group Name (permission for updating Oracle software):

  oinstall
  You could also use "dba" which I do not recommend for security reasons.
  For more information on the "oinstall" group account, see
  When to use "OINSTALL" group during install of oracle.
  
- Full path name for Oracle Home:
  /opt/oracle/product/9.2.0
etc.


Startup and Shutdown of the Oracle 9i Database

sqlplus:

svrmgrl is not supported any more. You can now do everything with sqlplus.

For instance, to startup the database, run the following commands:

oracle$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
The slash connects you to the schema owned by SYS. So in this example you will be connected to the schema owned by SYS with the privilege SYSDBA. SYSDBA gives you the following privileges:
  - sysoper privileges WITH ADMIN OPTION
  - create database
  - recover database until

$ORACLE_HOME/bin/dbstart and $ORACLE_HOME/bin/dbshut

You can also use $ORACLE_HOME/bin/dbstart to startup the database, and $ORACLE_HOME/bin/dbshut to shutdown the database. You can place $ORACLE_HOME/bin/dbstart into the /etc/rc.d/rc.local boot script to automatically bring up the database at system boot time. To get $ORACLE_HOME/bin/dbstart and $ORACLE_HOME/bin/dbshut working, you need to change the third field for your Oracle SID in /etc/oratab from "N" to "Y".

For example, for the Oracle SID "test" I changed the line in /etc/oratab from:

test:/opt/oracle/product/9.2.0:N
to read:
test:/opt/oracle/product/9.2.0:Y

For 9.2.0, I also had to copy the init file for my SID "test" from /opt/oracle/admin/test/pfile to $ORACLE_HOME/dbs to get dbstart and dbshut working:
cp /opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora
But first make sure if your init file already exists in $ORACLE_HOME/dbs!

If you want to properly integrate Oracle9i into the Red Hat Linux 7 SysV init process, check out http://www.gurulabs.com/downloads.html. "Oracle9i RHL Run Package" is based on a GPLd RPM provided by SuSE, but has been heavily modified to fit as seamlessly as possible into Red Hat Linux.


Oracle Installation Problems, Tips and Hints

Some of these problems apply only to 9.0.1!
Do not cd to /mnt/cdrom to run ./runInstaller!
If you do so, the installation will fail because you won't be able to change the CDs.


If you forgot to set the DISPLAY environment variable (e.g. export DISPLAY=oracleserver:0.0), or if you forgot to give the remote console - your Oracle Server - authority to display X information on your desktop PC (e.g. xhost +oracleserver), then you will get the following error:
Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
In this case, I always had to kill runInstaller in Oracle9iR1 (9.0.1) which was still running in the background. If I didn't do this in 9.0.1, runInstaller didn't completely come up any more without displaying any error messages. You might also want to clean up /tmp/OraInstall.

When runInstaller starts to configure the tools ("Configuration Tools"), the "Oracle Net Configuration Assistant" will sometimes hang. Simply stop the Assistant and restart it, or continue the installation. When the rest of the installation is finished, do a "Retry" for "Oracle Net Configuration Assistant". This always worked for me.
When the system stops responding during the Oracle installation in particular during the database creation, then that's probably because you don't have enough RAM or enough swap space. I saw the whole system not responding or to "hang" for several minutes when I did not have enough swap space. If this happens, simply wait until the system starts to respond again.
The Oracle installation also runs make etc. In a production environment you might not have compilers and other development packages installed. Therefore make sure you have temporarily the following packages installed: 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.0), binutils. See also Development Packages for more information.

If for any reason the Oracle9i installation didn't finish successfully, you might want to clean up the following files and directories before you start over again: /etc/oraInst.loc /etc/oratab /tmp/<OtherOracleOwnedFiles> $ORACLE_BASE/*
Other Problems:
You might want to check out the Oracle on Linux Discussion Forum.


Oracle Installation Errors

Here is a list of Oracle 9i (9.0.1 & 9.2.0) installation problems and issues. Some issues, errors, problems, and solutions apply only to 9.0.1 and some only to 9.2.0. Since I did not experience all of the problems here, I am not able to verify the correctness of all the solutions. However, I experienced almost all of the problems listed here. If you have other problems and you were able to resolve them, then please drop me an email at webmaster_at_puschitz.com so that I can add it to the list here.

Here is a list of issues issues, errors, problems and solutions:
Log Files
First check always the error logs for 9.2.0 in /tmp/OraInstall (e.g /tmp/OraInstall2002-07-04_09-50-19PM), and for 9.0.1 in /tmp/OraInstall. When you get make problems, check also the file $ORACLE_HOME/install/make.log.


"Various make Problems"
Make sure that gcc is installed on your system:
$ which gcc
/usr/bin/gcc

Here is the command to find the RPM package name for /usr/bin/gcc:
$ rpm -qf /usr/bin/gcc
gcc-2.96-98

Check also the other error messages below. See also Development Packages for more information.
 楼主| 发表于 2003-7-17 07:14:15 | 显示全部楼层
"Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk"
I saw this error only when I installed Oracle9iR2 (9.2.0). This was also the only problem I experienced with Oracle 9i R2 on Red Hat 8.0. However, this does not necessarily mean that you won't experience other problems described here.

When I had this problem, the following errors showed up in $ORACLE_HOME/install/make.log:
  /lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
  /lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE'
  /lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
  /lib/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE'
  /lib/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'

This error comes up when the following step is executed:
  /usr/bin/make -f ins_ctx.mk install ORACLE_HOME=/opt/oracle/product/9.2.0

Edit the file $ORACLE_HOME/ctx/lib/env_ctx.mk, go to "INSO_LINK =", and add a "$(LDLIBFLAG)dl" to the line and save it.

Here is the full line with the added "$(LDLIBFLAG)dl" flag:

INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)

After that hit retry in the error popup.


ORA-27123: unable to attach to shared memory segment.

I saw this error only when I installed Oracle 9i R2 (9.2.0).

This error message came up when the Oracle Database Configuration Assistant was running. I executed the following command to temporarily increase the maximum shared memory size:
su - root
# cat /proc/sys/kernel/shmmax
33554432
# echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax
# cat /proc/sys/kernel/shmmax
1073741824
#
Then click "Retry" for the Oracle Database Configuration Assistant.

It is recommended to increase the shmmax setting permanently for Oracle9i. So if you want to increase the maximum shared memory size permanently, add the following line to the /etc/sysctl.conf file:

kernel.shmmax=1073741824
For more information on setting shared memory parameters for Oracle, see Setting Shared Memory.


ORA-03113: end-of-file on communication channel
I saw this error when I've run the "Database Configuration Assistant" and "sqlplus". When the "Database Configuration Assistant" gave me this error during Oracle9iR2 (9.2.0) installation on Red Hat 2.1 AS, I simply removed the shared memory segments owned by the Oracle user and I restarted the "Database Configuration Assistant". I'm not sure if this is the right way but it always worked for me. Here is what I did to get the "Database Configuration Assistant" running again:

Database Configuration Assistant:

I executed the ipcs command to get the address of the shared memory segments that have been allocated by Oracle:
$ su - root
# ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 0          root      600        196608     2
0x00000001 32769      root      600        655360     2
0x00000000 458755     oracle    660        4194304    0
0x00000000 491524     oracle    660        33554432   0
0x00000000 524293     oracle    660        33554432   0
0x00000000 557062     oracle    660        33554432   0
0x00000000 589831     oracle    660        33554432   0
0x00000000 622600     oracle    660        33554432   0
0x00000000 655369     oracle    660        33554432   0
0x00000000 688138     oracle    660        33554432   0
0x3ecee0b0 720907     oracle    660        4194304    0

------ Semaphore Arrays --------
key        semid      owner      perms      nsems      status

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

#
Then I removed all shared memory segments that were owned by the Oracle user during the installation with the following command:
# ipcrm shm 458755 491524 524293 557062 589831 622600 655369 688138 720907
After that I restarted the "Database Configuration Assistant". Once the installation was done I immediately restarted the DB as well.
Caveat: I'm not sure if this procedure can cause any further problems if this is done during the installation. But so far I haven't seen any issues with this approach.

sqlplus:

If you get this problem in connection with sqlplus, then simply make sure that the database is down and exit sqlplus. After that, follow the procedure above by removing all shared memory segments that belong to the Oracle user. To my knowledge, this should not cause any problems.

For more information on shared memory segments, see Determining Which Semaphore Sets and Shared Memory Segments Belong to Each Oracle Database or Instance.


"Error invoking target install of makefile /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
"Error invoking target install of makefile /opt/oracle/product/9.0.1/precomp/lib/ins-precomp.mk"
"Error invoking target install of makefile /opt/oracle/product/9.0.1/precomp/lib/ins-net-client"

I saw this error only when I installed Oracle 9i (9.0.1). People have sent me emails pointing out that the following solution also works for Mandrake 8.1, Mandrake 8.2, and for SuSE 8.0.

Edit the file $ORACLE_HOME/bin/genclntsh and change the following line:
  LD_SELF_CONTAINED="-z defs"
to read:
  LD_SELF_CONTAINED=""
After that run the script $ORACLE_HOME/bin/genclntsh as the user "oracle" and not as the user "root". Also make sure you have all the Oracle environments set correctly!
$ su - oracle
$ $ORACLE_HOME/bin/genclntsh
Created /opt/oracle/product/9.0.1/lib/libclntst9.a
$
After that hit Retry in the error dialog window. This always worked for me.

Here is Oracle's official solution for Oracle 9iR1 and 9iR1 iAS on RedHat 2.1 Advanced Server:
http://otn.oracle.com/software/p ... inutils_readme.html


"Error in invoking target install of make file /opt/oracle/product/9.2.0/network/lib/ins_oemagent.mk"

I saw this error only on Red Hat 9. The ORACLE_HOME/install/make.log file contains the following error messages:
  ...
  /opt/oracle/product/9.2.0/network/lib/libnmi.a(snmitcln.o)(.text+0x159d): In function `Nls_ScanCmd':
  : undefined reference to `__ctype_b'
  /opt/oracle/product/9.2.0/network/lib/libnmi.a(snmitcln.o)(.text+0x1603): more undefined references to `__ctype_b' follow


The issue here is that __ctype_b() is actually gone for __ctype_b_loc() because Red Hat uses a new locale model. However, in libc.so, __ctype_b is still exported as compatibility symbol; at least that's the case with RH 9 glibc-2.3.2-5. And here is the reason why some people have this problem with Red Hat 9 and why some don't:

When you bought the Red Hat 9 CDs in a store, then you will probably find glibc-2.3.2-5.i686.rpm on the first CD. This glibc version exports __ctype_b():
$ rpm -ql glibc-2.3.2-5 | grep libc.so
/lib/i686/libc.so.6
/lib/libc.so.6
/lib/tls/libc.so.6
$ nm -a /lib/i686/libc.so.6 | grep __ctype_b
001315f8 D __ctype_b
00022340 T __ctype_b_loc
$ nm -a /lib/libc.so.6 | grep __ctype_b
00133c58 D __ctype_b
000223a0 T __ctype_b_loc
$
But when you downloaded Red Hat 9 from redhat.com or from one of the mirror sites, then you will find glibc-2.3.2-11.9.i686.rpm on the image. This glibc version does not export __ctype_b(). This is also the case with glibc-devel-2.3.2-27.9.i386.rpm.
$ rpm -ql glibc-2.3.2-11.9 | grep libc.so
/lib/i686/libc.so.6
/lib/libc.so.6
/lib/tls/libc.so.6
$ nm -a /lib/i686/libc.so.6 | grep __ctype_b
00131718 D __ctype_b@GLIBC_2.0
000223a0 T __ctype_b_loc
$ nm -a /lib/libc.so.6 | grep __ctype_b
00133d58 D __ctype_b@GLIBC_2.0
000223f0 T __ctype_b_loc
$

Check the glibc version on your system:

First check if the glibc packages on your RH 9 system work with the Oracle installer:
$ rpm -q glibc-2.3.2-5 glibc-common-2.3.2-5 glibc-devel-2.3.2-5

If you got the following error mesages:
package glibc-2.3.2-5 is not installed
package glibc-common-2.3.2-5 is not installed
package glibc-devel-2.3.2-5 is not installed

then you have glibc packages on your system that don't work with the Oracle installer and you need to follow the "Work Around" procedure here.
But if your system has the 2.3.2-5 glibc versions installed, then you are fine and you don't need to follow the described "Work Around" procedure!


Work Around Procedure:

Since I was not able to find the glibc-2.3.2-5 RPMs available for download, I'm making the RPMs available on my website. These RPMs are copies of the glibc RPMs that came with the RH 9 CDs I bought in the store. I do not recommend to use any of the "compat" RPMs from older Red Hat distributions since RH 9 contains major changes.

Here is the procedure for installing glibc-2.3.2-5 temporarely on your RH 9 server:

Download the 2.3.2-5 glibc RPMs from here on my web site.

Make sure to check all the digests and signatures contained in the downloaded RPMs since you never know if someone made changes to these RPMs or if someone replaced them. To ensure the integrity and origin of the RPMs, run the following commands:
$ su - root
# rpm --import /usr/share/rhn/RPM-GPG-KEY
# rpm --checksig glibc-2.3.2-5.i686.rpm glibc-common-2.3.2-5.i386.rpm glibc-devel-2.3.2-5.i386.rpm
glibc-2.3.2-5.i686.rpm: (sha1) dsa sha1 md5 gpg OK
glibc-common-2.3.2-5.i386.rpm: (sha1) dsa sha1 md5 gpg OK
glibc-devel-2.3.2-5.i386.rpm: (sha1) dsa sha1 md5 gpg OK
#
Downgrade glibc, glibc-common, and glibc-devel:
# rpm -Uvh --force glibc-2.3.2-5.i686.rpm glibc-common-2.3.2-5.i386.rpm glibc-devel-2.3.2-5.i386.rpm
If you get the following error:
error: Failed dependencies:
         glibc = 2.3.2-11.9 is needed by (installed) glibc-debug-2.3.2-11.9
         glibc = 2.3.2-11.9 is needed by (installed) glibc-utils-2.3.2-11.9
         glibc-devel = 2.3.2-11.9 is needed by (installed) glibc-debug-2.3.2-11.9
         glibc-devel = 2.3.2-11.9 is needed by (installed) nptl-devel-2.3.2-11.9

then you can temporarily remove the RPMs from your system until you upgrade the glibc RPMs after your Oracle installation:
# rpm -e glibc-debug glibc-utils nptl-devel

Now try to run runInstaller again.

After Oracle has been installed, you can upgrade glibc, glibc-common, and glibc-devel again. For example:
# rpm -Uvh glibc-2.3.2-11.9.i686.rpm glibc-common-2.3.2-11.9.i386.rpm glibc-devel-2.3.2-11.9.i386.rpm

If you have any problems or issues with this solution, or if you have any comments, please let me know. You can find my email address at the bottom of this web site.


$ dbca
SIGSEGV   11*  segmentation violation
        stackbase=0x453da000, stackpointer=0x453d9d5c
Full thread dump:
    "AWT-EventQueue-0" (TID:0x411d1e20, sys_thread_t:0x453d9e0c,
state:R) prio=5 *current thread*
        java.lang.Object.wait(Object.java)
        java.awt.EventQueue.getNextEvent(EventQueue.java:126)
...
I got reports about dbca crashing on Red Hat 8.0 and on Red Hat 9. If this happens, try the following suggestion:

$ su - root
touch /etc/rac_on
Now try to restart dbca.


./runInstaller: line 58: ./runInstaller: cannot execute binary file.
You are probably trying to run a 64-bit Oracle version on a 32-bit Linux system. Make sure you downloaded the right Oracle version for your Linux system.

To check if runInstaller is a 32-bit binary or a 64-bit binary, run the following command:
$ cd /mnt/cdrom
$ file install/linux/runInstaller
install/linux/runInstaller: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped

To check if your Linux system is 32-bit system or a 64-bit system, run e.g. the following command:
$ file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped



The Oracle installer runInstaller hangs at:   Installing Java Runtime Environment... Link pending... Copying README...
This problems comes up only on RH 9. You probably forgot to set the environment variable LD_ASSUME_KERNEL to 2.4.1.

To rectify this problem, run the following command and restart runInstaller:
oracle$ export LD_ASSUME_KERNEL=2.4.1
For more information on this issue, see Red Hat 9.


Can't find init file for Database "SID".
I saw this error only with Oracle 9i R2 (9.2.0) when It tried to start the database with dbstart.

I copied the init file for my SID "test" from /opt/oracle/admin/test/pfile to $ORACLE_HOME/dbs to get dbstart and dbshut working:
cp /opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora


"Error in setting permissions of file/directory /opt/oracle/jre/1.1.8/bin/i686/native_threads/.extract_args"
While the error dialog is open, manually find and copy the .extract_args file from your installed jre to where runInstaller complains it is missing.


"jre was not found in /tmp/OraInstall/jre/bin/i586/green_threads/jre"
You are probably running runInstaller on a 586 machine, or your AMD CPU gets recognized as 586 (e.g. AMD K6-III-400). You can check your machine (hardware) type by executing "uname -m". If you are not running on a 586 or on a AMD machine, try to link jre to java and see if this solves your problem.

To rectify the problem with the 586 machine or with the AMD CPU, create a link for lib and bin from i586 to i686 and make the i686 directories read only. For example:

ln -s /tmp/OraInstall/jre/bin/i686 /tmp/OraInstall/jre/bin/i586
ln -s /tmp/OraInstall/jre/lib/i686 /tmp/OraInstall/jre/lib/i586
chmod u-w /tmp/OraInstall/jre/bin/i686/tmp/OraInstall/jre/lib/i686
Now restart runInstaller.


../jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
You probably forgot to install the compat-libstdc++ RPM which is a package for "Standard C++ libraries for Red Hat Linux 6.2 backwards compatibility". To rectify this problem, install the compat-libstdc++ RPM. For example on Red Hat 9:
rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm
See also Development Packages for more information.


/opt/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
I experienced this problem when I was running the Database Configuration Assistant dbca on Red Hat 9 without setting the LD_ASSUME_KERNEL environment variable.

To rectify this problem, run the following command on Red Hat 9 and restart dbca:
oracle$ export LD_ASSUME_KERNEL=2.4.1
For more information on this issue, see Red Hat 9.


Other Errors
You might want to check out the Oracle on Linux Discussion Forum
发表于 2003-7-17 15:39:41 | 显示全部楼层
翻译成中文就最好了
发表于 2003-11-10 21:13:14 | 显示全部楼层
-su-2.05b$ Initializing Java Virtual Machine from /tmp/OraInstall2003-11-10_09-13-34PM/jre/bin/java. Please wait...
/tmp/OraInstall2003-11-10_09-13-34PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
出现这样的错误怎么办呢?我用的是glibc-2.3.2的。
是不是glibc要降版本呢?我的是LFS的系统。
 楼主| 发表于 2003-11-14 20:26:36 | 显示全部楼层
发表于 2003-11-20 13:07:47 | 显示全部楼层
RH AS已经支持3了啊
发表于 2003-12-24 14:06:00 | 显示全部楼层
我翻译吧,3天后贴出,因为这两天我要考试,到时候贴出来,请你们指正
发表于 2003-12-24 14:50:15 | 显示全部楼层
在RedHat Linux 7.1, 7.2, 7.3, 8.0, 9 and on Red Hat Advanced Server 2.1上安装Oracle 9i
Here is a summary (HOWTO) of how I installed:
这里是我如何安装的摘要(HOWTO):
Oracle 9iR2 (9.2.0) Database 在 Red Hat Advanced Server 2.1 (内核2.4.9-e.3, glibc 2.2.4-26)
Oracle 9iR2 (9.2.0) Database 在 Red Hat 9 (内核 kernel-2.4.20-6, glibc 2.3.2-5)
Oracle 9iR2 (9.2.0) Database 在 Red Hat 8.0 (内核 2.4.18-18.8.0, glibc 2.2.93-5)
Oracle 9iR2 (9.2.0) Database 在 Red Hat 7.3 (内核 2.4.18-3, glibc 2.2.5-34)
Oracle 9iR1 (9.0.1) Database 在 Red Hat 7.3 (内核 2.4.18-3, glibc 2.2.5-34)
Oracle 9iR1 (9.0.1) Database 在 Red Hat 7.2 (内核 2.4.7-10, glibc 2.2.4-13)
Oracle 9iR1 (9.0.1) Database 在 Red Hat 7.1 (内核 2.4.2-2, glibc 2.2.2-10)
检验/验证
Oracle 9i数据库和应用程序服务器的Release 2发行版,以及Oracle E-Business Suite 11.5.7 已经在 Red Hat Linux Advanced Server 2.1上得到验证.详情请看" Oracle and Red Hat Collaborate to Develop Enhanced Enterprise Capabilities for Red Hat Linux Advanced Server."( Oracle 和Red Hat合作开发增强Red Hat Linux Advanced Server 的企业兼容性能) Red Hat 7.1得到对Oracle 9i数据库和应用程序服务器的验证,详情请看Red Hat宣布 Red Hat Linux 对oracle的验证.
Errors and Problems:
错误和问题:
这里提及的一些Oracle错误和问题仅仅在连接9i(9.0.1)和9iR2(9.2.0)上体验到.但是我不敢确定的说9i(9.0.1)安装的错误从来不会在9iR2(9.2.0)的安装过程中出现,我简单的把所有的错误和问题列在一起,详情请看Oracle安装错误和Oracle安装问题,重要建议和提示.
Red Hat 9:
红帽9:
Red Hat 9现在包含本地POSIX线程库(NPTL),一个对Linux的POSIX线程的改进的实现.但是使用NPTL会导致Oracle程序的一些问题.注意:Oracle9I在Red Hat9上得到了验证!这样,要修复这个问题,你可以设置环境变量 LD_ASSUME_KERNEL成2.4.1,这意味着会使用旧的”带浮点堆栈的Linux线程”实现.要不,Oracle安装器 runInstaller会挂起,数据库配置助理dbca不会运行等等.请查看安装错误得到更多的信息.要查看这个环境变量可以设置在哪里,请看设置Oracle环境.要得到更多的关于 LD_ASSUME_KERNEL的消息,请看 Red Hat Linux 9发行注记.注意:在你安装Oracle9iR2之前,确定你首先阅读了在Oracle安装错误一节中关于错误信息"Error in invoking target install of make fileopt/oracle/product/9.2.0/network/lib/ins_oemagent.mk" 的信息.
发表于 2003-12-26 14:20:39 | 显示全部楼层
文档

Oracle9i数据库文档 在Linux上运行的Oracle9i 和 Oracle9iR2 数据库调整和优化 Red Hat:性能,可靠性与增强的易处理在 Red Hat Linux Advanced Server 2.1上  Red Hat Advanced Server V2.1可靠性,可用性,可伸缩性和易处理性特性

下载和安装Red Hat Linux 7.1, 7.2, 7.3, 8.0, 9.要下载 Red Hat Linux 7.x, 8.0, 9,请检查http://www.puschitz.com/RedhatDo ... 接.你可以在Red Hat Linux手册上找到Red Hat Linux安装向导.

注意:你不能下载 Red Hat Linux Advanced Server 2.1,你只可以下载源代码.如果你想得到二进制CD,你需要在http://www.redhat.com/software/linux/advanced/购买.但是Red Hat提供了一个在可供得起价格范围的开发版的 Advanced Server 2.1

开包下载的 Oracle9i安装文件并烧录 Oracle9i CD
从下面的网站下载 Oracle9i:
http://otn.oracle.com/software/prod.../linuxsoft.html
<http://otn.oracle.com/software/p ... docs/linuxsoft.html>

解压和开包下载的文件:
对于Oracle9i (9.2.0):
一步过程(使用最少的磁盘空间并且更快):
zcat lnx_920_disk1.cpio.gz | cpio -idmv
zcat lnx_920_disk2.cpio.gz | cpio -idmv
zcat lnx_920_disk3.cpio.gz | cpio -idmv
两步过程:
解压
gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz
Linux9i_Disk3.cpio.gz
开包下载的文件:
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
对于Oracle9i (9.0.1):
一步过程(使用最少的磁盘空间并且更快):
zcat Linux9i_Disk1.cpio.gz | cpio -idmv
zcat Linux9i_Disk2.cpio.gz | cpio -idmv
zcat Linux9i_Disk3.cpio.gz | cpio -idmv
两步过程:
解压
gunzip Linux9i_Disk1.cpio.gz Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz
开包下载的文件:
cpio -idmv < Linux9i_Disk1.cpio
cpio -idmv < Linux9i_Disk2.cpio
cpio -idmv < Linux9i_Disk3.cpio

现在你应该有3个包含安装文件的目录:
Disk1
Disk2
Disk3
我执行下面的命令来烧录3个CD:
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 -

(当你执行cdrecord -scanbus 可以得到设备号).

交换空间
为了执行一个典型的 Oracle 9i安装并且创建一个简单的标准数据库, Oracle认为你需要最少512MB的RAM给Oracle9i (9.0.1)服务器,磁盘空间(交换空间)的数量应该等于RAM的两倍或者至少400MB,越多越好.当我安装Oracle 9i (9.0.1 & 9.2.0)时,我使用带256MB 内存的PC机上600MB的交换分区.当我使用少量的交换分区(256MB RAM)时,我的内存用完了.我明确无误的建议使用按照Oracle安装向导里指定的更多的RAM和/或者更多的交换空间.
  注意:如果在Oracle安装过程中没有足够的交换空间或者RAM的话,特别是在数据库创建过程中,你的Oracle服务器(Linux)会暂时的对任何事件没有任何回应几分钟.

要得到更多的关于给你的数据库正确分配交换空间大小的信息,请看调整交换分区大小

要检查你的内存,运行 grep MemTotal /proc/meminfo 要得到交换空间信息,运行cat /proc/swaps

你也可以通过创建临时交换文件来增加临时的交换空间而不是使用一个raw设备.这里是其过程:
su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap

要关闭临时交换空间,执行下面的命令:
su - root
swapoff tmpswap
rm tmpswap

共享内存
对于Oracle 9i (9.2.0)安装我需要给在我的linux服务器上的所有Red Hat版本创建最大的共享内存大小.Oracle数据库配置助理显示下面的错误消息在我的服务器上:
ORA-27123: unable to attach to shared memory segment.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表