fedora¿¡ oracle9i ¼³Ä¡Çϱâ
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2004-05-03 21:05:11
 

http://www.oracle-base.com/articles/9i/Oracle9iInstallationOnFedora1.p
hp

Oracle9i (9.2.0.4.0) Installation on Fedora Core 1 Linux
This article is intended as a brief guide to installing Oracle9i (9.2.0.4.0) on Fedora Core1 Linux. For additional information and platform variations read the Installation Guide for UNIX Systems. The article is based on a Fedora Core 1 Server Installation with a minimum of 2G swap and the following package groups installed:

X Window System
GNOME Desktop Environment
KDE Desktop Environment
Editors
Graphical Internet
Text-based Internet
Server Configuration Tools
Windows File Server
Network Servers
Development Tools
Kernel Development
Administration Tools
System Tools
Alternative installations may require additional packages to be loaded in addition to the ones listed below.

Download Software
Unpack Files
Set Kernel Parameters
Setup
Installation
Post Installation
Download Software
Download Sun's Java Development Kit (JDK 1.3.1).

Download the Oracle installation files from otn.oracle.com.

Download the Oracle 9.2.0.4.0 patchset files from metalink.oracle.com.

Download the following patches (3006854, 3119415) from metalink.oracle.com.

Unpack Files
First unzip the files:

gunzip lnx_920_disk1.cpio.gz
gunzip lnx_920_disk2.cpio.gz
gunzip lnx_920_disk3.cpio.gz
Next unpack the contents of the files:

cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
mkdir 92040
unzip -d 92040 p3095277_9204_LINUX.zip
cd 92040
cpio -idmv < 9204_lnx32_release.cpio
You should now have three directories (Disk1, Disk2 and Disk3) containing installation files and a 92040/Disk1 directory containing the patch installation files.

Set Kernel Parameters
The following table contains minimum kernel settings. If the current settings exceed these figures then do not alter them:

Parameter Minimum Setting
SEMMNI 100
SEMMNS 256
SEMOPM 100
SEMMSL 100
SHMMAX 2147483648
SHMMIN 1
SHMMNI 100
SHMSEG 4096
SHMVMX 32767

The current semaphore settings can be viewed using the following command:

cat /proc/sys/kernel/sem

250 32000 32 128
The values listed are for the SEMMSL, SEMMNS, SEMOPM, and SEMMNI parameters. The adjusted values can be set using:

# echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > /proc/sys/kernel/sem
echo 250 32000 100 128 > /proc/sys/kernel/sem
The shared memory settings can be viewed using the following command:

cat shared_memory_parameter
The values can be set using:

echo 2147483648 >  /proc/sys/kernel/shmmax
Set the File Handles, Sockets and Process limit using:

echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u 16384
The necessary parameter changes can be combined in a script and run during system startup:

echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u 16384
Alternatively the following lines can be added to the /etc/sysctl.conf file:

kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
In addition the following lines can be added to the /etc/security/limits.conf file:

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
Adding lines into these files requires a reboot before they take effect.

Setup
Install the Java development kit:

# Make the bin file executable
chmod u+x j2sdk-1_3_1_09-linux-i586.rpm.bin
# Run the bin file. Agree to the terms and conditions.
./j2sdk-1_3_1_09-linux-i586.rpm.bin
# Install the RPM file.
rpm -ivh jdk-1.3.1_09.i586.rpm
Create the new groups and users:

groupadd oinstall
groupadd dba
groupadd oper
groupadd apache

useradd -g oinstall -G dba oracle
passwd oracle

useradd -g oinstall -G apache apache
passwd apache
Create the directories in which the Oracle software will be installed:

mkdir -p /u01/app/oracle/product/9.2.0.1.0
chown -R oracle.oinstall /u01
Login as the oracle user and add the following lines at the end of the .bash_profile file:

# Oracle 9i
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.0; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH:/usr/java/jdk1.3.1_09/bin; export PATH
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_SID=TSH1; export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
ORACLE_OEM_JAVARUNTIME=/usr/java/jdk1.3.1_09; export ORACLE_OEM_JAVARUNTIME

LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
THREADS_FLAG=native; export THREADS_FLAG
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

Save the .bash_profile file and re-login as the oracle user. Make sure the .bash_profile ran correctly by issuing the following command:

set | more
The following setup steps relate to Metalink Note:252217.1 and must be performed as the root user.

Install the following packages:

# From Fedora Core 1 Disk 1
cd /mnt/cdrom/Fedora/RPMS
rpm -Uvh libpng10-1.0.13-9.i386.rpm

# From Fedora Core 1 Disk 2
cd /mnt/cdrom/Fedora/RPMS
rpm -Uvh gnome-libs-1.4.1.2.90-35.i386.rpm

# From RedHat Core 1 Disk 3
cd /mnt/cdrom/Fedora/RPMS
rpm -Uvh compat-libstdc++-7.3-2.96.118.i386.rpm
rpm -Uvh compat-libstdc++-devel-7.3-2.96.118.i386.rpm
rpm -Uvh compat-db-4.0.14-2.i386.rpm
rpm -Uvh compat-gcc-7.3-2.96.118.i386.rpm
rpm -Uvh compat-gcc-c++-7.3-2.96.118.i386.rpm
rpm -Uvh sysstat-4.0.7-5.i386.rpm       
rpm -Uvh openmotif21-2.1.30-8.i386.rpm
rpm -Uvh pdksh-5.2.14-23.i386.rpm
Put gcc296 and g++296 first in $PATH variable by creating the following symbolic links:

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++
Make sure the hostname command returns a fully qualified host name by amending the /etc/hosts file if necessary:

hostname
Install the 3006854 patch:

unzip p3006854_9204_LINUX.zip
cd 3006854
sh rhel3_pre_install.sh
Installation
Edit the JRE_LOCATION setting in the Disk1/install/linux/oraparam.ini file to point to the java 1.3.1 installation:

JRE_LOCATION=/usr/java/jdk1.3.1_09
Start the Oracle Universal Installer (OUI) by issuing the following command in the Disk1 directory:

./runInstaller
Continue with the installation, selecting the "Software Only" option. Ignore any installation errors.

With the installation complete start the 9.2.0.4.0 patchset installation. First edit the JRE_LOCATION setting in the 92040/Disk1/oraparam.ini and $ORACLE_BASE/oui/oraparam.ini files to point to the java 1.3.1 installation:

JRE_LOCATION=/usr/java/jdk1.3.1_09
Start the Oracle Universal Installer (OUI) by issuing the following command in the 92040/Disk1 directory:

./runInstaller
First complete the "Oracle Universal Installer 2.2.0.18.0" installation option, then complete the "Oracle9iR2 Patch Set 3 9.2.0.4.0" installation.

The installation will produce two errors:

Problems with ins_oemagent.mk.
"Error in invoking target install of makefile $ORACLE_HOME/ctx/lib/ins_ctx.mk".
Ignore the first error as we will fix this in the post installation step.

When the second error occurs open up a new console, login as the oracle user and edit the $ORACLE_HOME/ctx/lib/env_ctx.mk file. Add a "$(LDLIBFLAG)dl" flag into the line starting with "INSO_LINK =", save it and click the "Retry" button on the OUI error dialog. The amended line looks like:

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 $(LDLIBFLAG)sc_lo $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(SYSLIBS) $(COMPEOBJS)
Post Installation
Open up a console, login as the oracle user and execute these lines:

cd $ORACLE_HOME/network/lib
make -f ins_net_client.mk install
Then edit the $ORACLE_HOME/ctx/lib/ins_ctx.mk file so that lines 13-14 change from:

ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) $(INSO_LINK)
to:

ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)
The execute the following command:

make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install
The agent can now be started using:

/u01/app/oracle/product/9.2.0.1.0/bin/agentctl start
Before a database instance can be created some of the Oracle tools must be forced to look at an alternative JRE:

mv $ORACLE_HOME/JRE $ORACLE_HOME/JRE_ORIG
ln -s /usr/java/jdk1.3.1_09/jre $ORACLE_HOME/JRE
su - root
ln -s /usr/java/jdk1.3.1_09/jre/bin/java /usr/java/jdk1.3.1_09/jre/bin/jre
ln -s /usr/java/jdk1.3.1_09/jre/bin/i386/native_threads/java /usr/java/jdk1.3.1_09/jre/bin/i386/native_threads/jre
exit
With this done the DBCA can be started using dbca from the command line.

Once the instance is created edit the /etc/oratab file setting the restart flag for each instance to 'Y':

TSH1:/u01/app/oracle/product/9.2.0.1.0:Y
Create a file called /etc/init.d/dbora containing the following:

#!/bin/sh
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/9.2.0.1.0
ORA_OWNER=oracle
if [! -f $ORA_HOME/bin/dbstart]
then
    echo "Oracle startup: cannot start"
    exit
fi
case "$1" in
    'start')
          # Start the Oracle databases:
          # The following command assumes that the oracle login
          # will not prompt the user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
    ;;
    'stop')
          # Stop the Oracle databases:
          # The following command assumes that the oracle login
          # will not prompt the user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
    ;;
esac
Use chmod to set the privileges to 750:

chmod 750 /etc/init.d/dbora
Link the file into the appropriate run-level script directories:

ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
Add root user to the dba and oinstall groups (/etc/group) to allow the script to function correctly. The relevant instances should now startup/shutdown automatically at system startup/shutdown.

For more information see:

Installation Guide for UNIX Systems
Installing Oracle 9i on RedHat Linux 7.1, 7.2, 7.3, 8.0, 9 and on Red Hat Advanced Server 2.1
Oracle on Linux
Hope this helps. Regards Tim...

Back to the Top.


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦