Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2018.1

Table of Contents
outlinetrue
stylenone

Oracle version 12.1.0.2 .0 (12c r1) or greater is required.

Install Notes

...

We highly recommend installing Oracle on a dedicated database server. To communicate with Oracle on that server completing this installation will require the username, password, hostname, port (e.g. 1521) and SID.

Download and install the the Oracle Instant Client on  on the PCR-360 application server. This is required before installing the PHP oracle driver (oci8).

...

Code Block
languagebash
rpm -ivh oracle-instantclient12instantclient18.13-basic-1218.13.0.20.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12instantclient18.13-devel-1218.13.0.20.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12instantclient18.13-sqlplus-1218.13.0.20.0-1.x86_64.rpm

Install OCI8 (for PHP < 7):

Code Block
languagebash
pecl install oci8

...

-2.0.12

Install OCI8 for PHP 7+

Code Block
languagebash
yum -y install php72-php-oci8

Oracle OCI8 and SQL Plus Configuration

On the Oracle database server:web server, apache needs the environment vars to run the OCI adapter

PHP56

Code Block
languagebash
# for php56
cd /home/oracle
vi .profile

Paste in this data. Be sure to adjust for install directory and version.

Code Block
languagebashlinenumberstrue
ORACLE_HOME=/usr/lib/oracle/1218.13/client64
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME
export LD_LIBRARY_PATH
export PATH

...

PHP72

Code Block
#for php72, the environment vars must be set globally
vi /etc/sysconfig/httpd

Add the following to the end of the file

Code Block
languagebash
source .profile# OCI8 PHP Extension
ORACLE_HOME=/usr/lib/oracle/18.3/client64
LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
export ORACLE_HOME
export LD_LIBRARY_PATH

User Configuration

On the Oracle database server, create two Oracle users and two schema. These will hold the application data and the application metadata, the examples below use pcr360_prod and pcr360_prod_metadata.

...

Code Block
languagebash
sudo su
su - oracle
sqlplus / as sysdba

Grant the required permissions to the users. Be sure to modify the passwords.

Code Block
languagesql
linenumberstrue
ALTER SESSION SET NLS_LENGTH_SEMANTICS = 'CHAR';
CREATE USER pcr360_prod IDENTIFIED BY password1;
CREATE USER pcr360_prod_metadata IDENTIFIED BY password2;
 
GRANT CREATE TABLE TO pcr360_prod;
GRANT CREATE SEQUENCE TO pcr360_prod;
GRANT CREATE ANY INDEX TO pcr360_prod;
GRANT CREATE PROCEDURE TO pcr360_prod;
GRANT CREATE VIEW TO pcr360_prod;
GRANT CREATE SESSION TO pcr360_prod;
GRANT ALTER ANY TABLE TO pcr360_prod;
GRANT ALTER SESSION TO pcr360_prod;
GRANT LOCK ANY TABLE TO pcr360_prod;
GRANT DROP ANY SEQUENCE TO pcr360_prod;
GRANT SELECT ON V_$SESSION TO pcr360_prod;
GRANT UNLIMITED TABLESPACE TO pcr360_prod;
 
GRANT CREATE TABLE TO pcr360_prod_metadata;
GRANT CREATE SEQUENCE TO pcr360_prod_metadata;
GRANT CREATE ANY INDEX TO pcr360_prod_metadata;
GRANT CREATE PROCEDURE TO pcr360_prod_metadata;
GRANT CREATE VIEW TO pcr360_prod_metadata;
GRANT CREATE SESSION TO pcr360_prod_metadata;
GRANT ALTER ANY TABLE TO pcr360_prod_metadata;
GRANT ALTER SESSION TO pcr360_prod_metadata;
GRANT LOCK ANY TABLE TO pcr360_prod_metadata;
GRANT DROP ANY SEQUENCE TO pcr360_prod_metadata;
GRANT SELECT ON V_$SESSION TO pcr360_prod_metadata;
GRANT UNLIMITED TABLESPACE TO pcr360_prod_metadata;


Child pages (Children Display)
styleh6
sorttitle