Oracle DBA Tips Corner |
|
Installing Oracle9i Release 2 on Red Hat Linux 7.3 - 8.0
by Jeff Hunter, Sr. Database Administrator
Contents
Overview
# free
- OR -
# cat /proc/swaps
- OR -
# cat /proc/meminfo | grep MemTotal
As root, make a file that will act as additional swap space, let's say about 300MB:
Now we should change the file permissions:
Finally we format the "partition" as swap and add it to the swap space:
Install the Java Development Kit (JDK)
As per the JDK documentation, install JDK under /usr/local.
Download from: http://java.sun.com/j2se/1.4.1/download.html
Download the "Linux self-extracting file / SDK" option. (I still don't trust or use RPMs).
Install as root:
# groupadd -g 115 dba
Create Oracle Directories:
# mkdir /u01
# mkdir /u03
# mkdir /u04
# mkdir /u05
# mkdir /u06
# mkdir /u07
# mkdir /u08
# mkdir /u09
# mkdir /u10
# mkdir /opt/bin
Oracle Environment Variable Settings:
An example ".bash_profile" is provided in the
Configuration Files / Scripts section below.
Ensure to set the environment variable: LD_ASSUME_KERNEL=2.2.5
NOTE: Failing to set the LD_ASSUME_KERNEL parameter
will cause the Oracle Universal Installer to hang!
http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.html
Eg. gunzip lnx_920_disk1.cpio.gz
Eg. cpio -idmv < lnx_920_disk1.cpio
Important Note: Some browsers
will uncompress the files but leave the
extension the same (gz) when downloading. If the above steps do not
work for you, try skipping step 1 and go directly to step 2 without
changing the filename.
Eg. "cpio -idmv < lnx_920_disk1.cpio.gz"
/Disk1
Run the Oracle Installer
% DISPLAY=<Any X-Windows Host>:0.0
NOTE:
If you forgot to set the DISPLAY environment variable and you get the following error:
Xlib: connection to ":0.0" refused by server
you will then need to execute the following command to get "runInstaller" working again:
If you don't do this, the Installer will hang without giving any error messages.
Also make sure that "runInstaller" has stopped running in the background. If not, kill it.
% cd <your temp directory>/Disk1
About 84% into the Link phase of the install, you will get an error
when invoking the target of "install" in makefile:
/u01/app/oracle/product/9.2.0/ctx/lib/ins_ctx.mk. Leave this
error message up and refer to the next section,
Errors during the Relink Phase of the Install
, on how to resolve and
continue from this error. You will come back to this error dialog
box after modify the $ORACLE_HOME/ctx/lib/env_ctx.mk file.
The "Link" phase will now successfully continue to 100% complete.
When the "Link" phase is complete, you will be prompted to run
the $ORACLE_HOME/root.sh script as the "root" user account.
Go ahead and perform this action. When prompted for the "local bin directory",
I generally choose to put the files in /opt/bin keeping with
by old conventions of Solaris. You may choose to use the default of
/usr/local/bin if you would like. Just make sure that whatever
directory you choose that it is in the PATH environment variable of the
"oracle" user account.
After running the root.sh script in the above step, you have successfully installed
the Oracle9i database software. At the "End of Installation" screen,
simply hit the "Exit" button. A few seconds after hitting the "Exit" button will
bring up "Oracle Enterprise Manager" (OEM). I generally exit from the OEM application
as I keep a central repository for all nodes and databases.
From here, it is time to create the O920DB Oracle database. In the
Configuration Files / Scripts section of this document,
I put together
an example initO920DB.ora instance parameter file along with
a set of CREATE DATABASE... scripts in an archive named
create_database920.tar.
Good Luck!
The following errors will exist in $ORACLE_HOME/install/make.log
/lib/libdl.so.2: undefined reference to `__ctype_b_loc@GLIBC_2.3'
This error occurs when the following is executed:
/usr/bin/make -f ins_ctx.mk install ORACLE_HOME=/u01/app/oracle/product/9.2.0
Solution
The solution is to edit the file $ORACLE_HOME/ctx/lib/env_ctx.mk and go to
"INSO_LINK =", 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)
Set LD_ASSUME_KERNEL
You will also need to enter LD_ASSUME_KERNEL=2.2.5 in your .profile
(or .bash_profile if you are using BASH)
for the "oracle" user account so that they you can
run programs like "dbssist" and "netca".
Return and Retry
After making the above change, return to the popup error dialog box
and hit "Retry". It should continue from here with no errors.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter
and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express,
prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate,
but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from
relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.
This article is a comprehensive guide for installing
Oracle9i Release 2 on the Red Hat Linux 8.0
operating environment. Keep in mind the following assumptions
throughout this article:
Swap Space Considerations
(An inadequate amount of swap during the installation
will cause the Oracle Universal Installer to either "hang" or "die")
# dd if=/dev/zero of=tempswap bs=1k count=300000
# chmod 600 tempswap
# mke2fs tempswap
# mkswap tempswap
# swapon tempswap
In order to use Oracle's HTTP [Apache] Server, you will need to download the appropiate SDK from Sun.
Create Oracle Account and Directories
Then create a symbolic link to the JDK under /usr/local/java.
# cp j2sdk-1_4_1_01-linux-i586.bin /usr/local
# cd /usr/local
# chmod 755 j2sdk-1_4_1_01-linux-i586.bin
# ./j2sdk-1_4_1_01-linux-i586.bin
# ln -s /usr/local/j2sdk1.4.1_01 /usr/local/java
# rm j2sdk-1_4_1_01-linux-i586.bin
Create Oracle User Account:
Downloading / Unpacking the Oracle9i Installation Files
# useradd -u 173 -c "Oracle Software Owner" -d /u01/app/oracle -g "dba" -m -s /bin/bash oracle
# passwd oracle
# mkdir /u01/app
# mkdir /u01/app/oracle
# mkdir /u01/app/oracle/admin
# mkdir /u01/app/oracle/admin/O920DB
# mkdir /u01/app/oracle/admin/O920DB/adhoc
# mkdir /u01/app/oracle/admin/O920DB/adump
# mkdir /u01/app/oracle/admin/O920DB/arch
# mkdir /u01/app/oracle/admin/O920DB/backups
# mkdir /u01/app/oracle/admin/O920DB/bdump
# mkdir /u01/app/oracle/admin/O920DB/cdump
# mkdir /u01/app/oracle/admin/O920DB/create
# mkdir /u01/app/oracle/admin/O920DB/dba
# mkdir /u01/app/oracle/admin/O920DB/exp
# mkdir /u01/app/oracle/admin/O920DB/logbook
# mkdir /u01/app/oracle/admin/O920DB/pfile
# mkdir /u01/app/oracle/admin/O920DB/release
# mkdir /u01/app/oracle/admin/O920DB/report
# mkdir /u01/app/oracle/admin/O920DB/tuning
# mkdir /u01/app/oracle/admin/O920DB/udump
# mkdir /u01/app/oracle/product
# chown -R oracle:dba /u01/app/oracle
# mkdir /u03/app
# mkdir /u03/app/oradata
# mkdir /u03/app/oradata/O920DB
# chown -R oracle:dba /u03/app/oradata
# mkdir /u04/app
# mkdir /u04/app/oradata
# mkdir /u04/app/oradata/O920DB
# chown -R oracle:dba /u04/app/oradata
# mkdir /u05/app
# mkdir /u05/app/oradata
# mkdir /u05/app/oradata/O920DB
# chown -R oracle:dba /u05/app/oradata
# mkdir /u06/app
# mkdir /u06/app/oradata
# mkdir /u06/app/oradata/O920DB
# chown -R oracle:dba /u06/app/oradata
# mkdir /u07/app
# mkdir /u07/app/oradata
# mkdir /u07/app/oradata/O920DB
# chown -R oracle:dba /u07/app/oradata
# mkdir /u08/app
# mkdir /u08/app/oradata
# mkdir /u08/app/oradata/O920DB
# chown -R oracle:dba /u08/app/oradata
# mkdir /u09/app
# mkdir /u09/app/oradata
# mkdir /u09/app/oradata/O920DB
# chown -R oracle:dba /u09/app/oradata
# mkdir /u10/app
# mkdir /u10/app/oradata
# mkdir /u10/app/oradata/O920DB
# chown -R oracle:dba /u10/app/oradata
# chown oracle:dba /opt/bin
(If you do not currently have an account with Oracle OTN, you will need to
create one. This is a FREE account!)
/Disk2
/Disk3
As the "oracle" user account:
Errors during the Relink Phase of the Install
% export DISPLAY
Xlib: Client is not authorized to connect to Server
% rm -rf /tmp/OraInstall
% ./runInstaller
During the "Link Phase" of the install, you will get an error while trying
to make/install CTX. (The same issue exists in 9.0.1 on Red Hat Linux).
Configuration Files / Scripts
/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'
collect2: ld returned 1 exit status
make: *** [ctxhx] Error 1
Example:
.bash_profile
$HOME/.bash_profile for the "oracle" user account.
initO920DB.ora
Sample instance parameter script for Oracle9i. Place this file in ~oracle/admin/O920DB/pfile before running the RUN_CRDB.sh script below.
create_database920.tar
An example "create database" set of scripts. Untar the file to ~oracle/admin/O920DB/create.
If you decide to change the name of the ORACLE_SID, here are the files that need to be changed:
The main script to run is: RUN_CRDB.sh.
Tuesday, 22-Jan-2008 21:55:27 EST
Page Count: 262