Installation of Oracle on Red Hat Linux E3
Complete Reference available at
http://www.oracle.com/technology/tech/php/htdocs/php-oracle-tutorial.html
 
Download the packages
I downloaded the following packages from Oracle and Zend Site: http://www.oracle.com/technology/products/database/xe/index.html
http://www.oracle.com/technology/tech/php/zendcore/index.html
Package Details
The files that were downloaded are : oracle-xe-univ-10.2.0.1-1.0.i386.rpm and ZendCoreForOracle-v1.3.1-Linux-x86.tar.gz
Installation Process
I took the installation details from the page referred in the php-oracle-tutorial.
The details of the commands that have been run are as follows:
Log in or su as root
su
Password:
If u uninstall earlier instance then remove the entries from /etc/oratab.
Copy oracle-xe-univ-10.2.0.1-1.0.i386.rpm to /tmp, then change directory to /tmp.
cp oracle-xe-univ-10.2.0.1-1.0.i386.rpm /tmp
cd /tmp

Install the RPM
rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm

Oracle Database XE installs.

Configure the database.
/etc/init.d/oracle-xe configure

Accept the default ports of 8080 for Application Express, and 1521 for the Database Listener.
I changed the port for Tomcat from existing 8080 to 8091.

Enter and confirm the password for the default users.


Enter Y or N for whether you want the database to start automatically on reboot. The database and database listener are configured and started.

I checked the following file /etc/init.d/oracle-xe and found that the fllowing variables would be required during running Oracle and also for running the listener etc. So I added the following variables in the .bash_profile:
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server; export ORACLE_HOME
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_SID=XE; export ORACLE_SID
LSNR=$ORACLE_HOME/bin/lsnrctl; export LSNR
SQLPLUS=$ORACLE_HOME/bin/sqlplus; export SQLPLUS

Added the following lines in the listener.ora located in : /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
  There is an option of opening the web browser and connecting to port 8080. But this did not work at all. So I had to manually configure the database.
  Added the following lines in the listener.ora located in : /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin

LISDRISHT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.108.246)(PORT = 1521))
)

SID_LIST_LISDRISHT =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = XE.ORG)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(SID_NAME = XE)
)
)



Added the following lines tnsnames.ora located in : /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin

LISDRISHT =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.108.246)(PORT = 1521))
)


There was a problem in writing the log entry while starting listener. So I changed the permission of the directory
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log to 777.

Started Oracle using the command : $SQLPLUS sys as sysdba
Password : password

startup

$LSNR start LISDRISHT



The following part involved the creation of a database named DRISHT. I am immensely thankful to my friend S Ranganand who guided me in this area as I had never done a Oracle installation till now and he having done the installation knew about the complete process.


Now create new Oracle Instance:

Go to the directory (/imgdata3/oracle/DRISHT) where you want to create the dump fo the background processes in the new instance:

[root@DRISHT oracle]# mkdir bdump --Contains details when bg process fails
[root@DRISHT oracle]# mkdir udump --Contains details when user process fails
[root@DRISHT oracle]# mkdir pfile --Contains init parameter files.
[root@DRISHT imgdata3]# chown -R oracle:dba oracle
[root@DRISHT imgdata3]# mkdir oradata
cd oradata
mkdir DRISHT
cd /imgdata3/oracle/DRISHT
cp /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/init.ora initDRISHT.ora
vi initDRISHT.ora
Make the following changes :
db_name=DRISHT
Add the following entries:
control_files = ("/imgdata3/oradata/DRISHT/control01.ctl",
"/imgdata3/oradata/DRISHT/control02.ctl",
"/imgdata3/oradata/DRISHT/control03.ctl")

background_dump_dest = /imgdata3/oracle/DRISHT/bdump
user_dump_dest=/imgdata3/oracle/DRISHT/udump
undo_management=auto
at the bottom.
Set the following parameters:

ORACLE_SID=DRISHT; export ORACLE_SID

export PATH=$PATH:$ORACLE_HOME/bin;
Go to ORACLE_HOME/dbs directory (Contains the password files)
orapwd password=siddhi file=orapwDRISHT entries=5 force=y
Change Owner and Group of orapwDRISHT to oracle:dba

$SQLPLUS sys as sysdba
Password : siddhi

This is to set the sys password for the new Oracle Instance DRISHT (ensure that in initDRISHT.ora file the shared pool memory is at least 62198988. SQL>startup nomount pfile='/imgdata3/oracle/DRISHT/pfile/initDRISHT.ora'
SQL>CREATE Database DRISHT
logfile
GROUP 1 ('/imgdata3/oradata/DRISHT/log01_DRISHT.log') SIZE 15M,
GROUP 2 ('/imgdata3/oradata/DRISHT/log02_DRISHT.log') SIZE 15M,
GROUP 3 ('/imgdata3/oradata/DRISHT/log03_DRISHT.log') SIZE 15M
DATAFILE '/imgdata3/oradata/DRISHT/system01_DRISHT.dbf' SIZE 100M
sysaux datafile '/imgdata3/oradata/DRISHT/sysaux_DRISHT.dbf' SIZE 30M
default temporary tablespace TEMP
TEMPFILE '/imgdata3/oradata/DRISHT/temp01_DRISHT.dbf' SIZE 50M
extent management local
national character set utf8
character set WE8ISO8859P1

mkdir /imgdata3/oradata/DRISHT/users
mkdir /imgdata3/oradata/DRISHT/undo
chown oracle:dba /imgdata3/oradata/DRISHT/users
chown oracle:dba /imgdata3/oradata/DRISHT/undo
alter tablespace system add datafile '/imgdata3/oradata/DRISHT/system02.dbf' size 1000m;
create tablespace users datafile '/imgdata3/oradata/DRISHT/users/users01.dbf' size 1000m;
create undo tablespace undo datafile '/imgdata3/oradata/DRISHT/undo/undo01.dbf' size 1000m;
alter system set undo_tablespace=UNDO;


SQL>@/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/admin/catalog.sql
SQL>@/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/admin/catexp.sql
SQL>@/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/admin/catproc.sql




SQL> create spfile from pfile='/imgdata3/oracle/DRISHT/pfile/initDRISHT.ora';
SQL> shutdown
SQL> startup

Open listener.ora and make the following changes :
# listener.ora Network Configuration File:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = DRISHT)(PORT = 1521))
)
)


LISDRISHT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.108.246)(PORT = 1521))
)

SID_LIST_LISDRISHT =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DRISHT)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(SID_NAME = DRISHT)
)
)
DEFAULT_SERVICE_LISTENER = (DRISHT)



#
tnsnames.ora Network Configuration File:

DRISHT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.108.246)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DRISHT)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)


LISDRISHT =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.108.246)(PORT = 1521))
)

  Installation of Zend:
 

Installing Zend Core for Oracle

 

To install ZCO:

 

  1. Log in or su as root if you are not already.
    su
    Password:
    
  2. Copy ZendCoreForOracle-v1.3.1-Linux-x86.tar.gz to /tmp, then change directory to /tmp.
    cp ZendCoreForOracle-v1.3.1-Linux-x86.tar.gz /tmp
    cd /tmp
    
  3. Extract the contents of the downloaded Zend Core for Oracle software:
    tar -zxf ZendCoreForOracle-v1.3.1-Linux-x86.tar.gz
    

    Files are extracted to a subdirectory called ZendCoreForOracle-v1.3.1-Linux-x86.

     

  4. Change directory to ZendCoreForOracle-v1.3.1-Linux-x8 and start the Zend Core for Oracle installation:
    cd ZendCoreForOracle-v1.3.1-Linux-x86
    ./install
    

Since I had the Apache already installed in the server, I selected the option that integrate with the existing Apache Web Server. This modified the existing apachectl and httpd.conf files.
Viewing the index.php -- <? phpinfo() ?> displayed the complete php info along with the Zend Integration.