Oracle Database 19c EE
Download the following software:
OS setup
Install Oracle Linux 7. Select Server with a GUI. or Minimal.
As the root user, configure the OS and create the directory structure.
5
1
yum install -y oracle-database-preinstall-19c wget
2
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
3
mkdir -p /u02/oradata
4
chown -R oracle:oinstall /u01 /u02
5
chmod -R 775 /u01 /u02
Database installation.
As the oracle user:
Make a scripts folder
1
1
mkdir /home/oracle/scripts
Create an environment script. This will hold all of the settings.
17
1
cat > /home/oracle/scripts/setEnv.sh <<EOF
2
# Oracle Settings
3
export TMP=/tmp
4
export TMPDIR=\$TMP
5
export ORACLE_HOSTNAME=ora19c.core.bluepointmanor.com
6
export ORACLE_UNQNAME=cdb1
7
export ORACLE_BASE=/u01/app/oracle
8
export ORACLE_HOME=\$ORACLE_BASE/product/19.0.0/dbhome_1
9
export ORA_INVENTORY=/u01/app/oraInventory
10
export ORACLE_SID=cdb1
11
export PDB_NAME=pdb1
12
export DATA_DIR=/u02/oradata
13
export PATH=/usr/sbin:/usr/local/bin:\$PATH
14
export PATH=\$ORACLE_HOME/bin:\$PATH
15
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
16
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
17
EOF
Add the contents of setEnv.sh to Oracle's .bash_profile.
1
1
echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profile
Create a start script.
10
1
cat > /home/oracle/scripts/start_all.sh <<EOF
2
3
. /home/oracle/scripts/setEnv.sh
4
5
export ORAENV_ASK=NO
6
. oraenv
7
export ORAENV_ASK=YES
8
9
dbstart \$ORACLE_HOME
10
EOF
Create a stop script.
10
1
cat > /home/oracle/scripts/stop_all.sh <<EOF
2
3
. /home/oracle/scripts/setEnv.sh
4
5
export ORAENV_ASK=NO
6
. oraenv
7
export ORAENV_ASK=YES
8
9
dbshut \$ORACLE_HOME
10
EOF
Set the owner and folder and execute on the scripts.
2
1
chown -R oracle:oinstall /home/oracle/scripts
2
chmod u+x /home/oracle/scripts/*.sh
Unzip the installer.
2
1
cd $ORACLE_HOME
2
unzip -oq /tmp/LINUX.X64_193000_db_home.zip
Run the installer.
17
1
./runInstaller -ignorePrereq -waitforcompletion -silent \
2
-responseFile ${ORACLE_HOME}/install/response/db_install.rsp \
3
oracle.install.option=INSTALL_DB_SWONLY \
4
ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \
5
UNIX_GROUP_NAME=oinstall \
6
INVENTORY_LOCATION=${ORA_INVENTORY} \
7
SELECTED_LANGUAGES=en,en_US \
8
ORACLE_HOME=${ORACLE_HOME} \
9
ORACLE_BASE=${ORACLE_BASE} \
10
oracle.install.db.InstallEdition=EE \
11
oracle.install.db.OSDBA_GROUP=dba \
12
oracle.install.db.OSBACKUPDBA_GROUP=dba \
13
oracle.install.db.OSDGDBA_GROUP=dba \
14
oracle.install.db.OSKMDBA_GROUP=dba \
15
oracle.install.db.OSRACDBA_GROUP=dba \
16
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
17
DECLINE_SECURITY_UPDATES=true
As a root user, execute the followin:
2
1
/u01/app/oraInventory/orainstRoot.sh
2
/u01/app/oracle/product/19.0.0/dbhome_1/root.sh
As the oracle user:
Start the listener
1
1
lsnrctl start
Create the first database.
18
1
dbca -silent -createDatabase \
2
-templateName General_Purpose.dbc \
3
-gdbname ${ORACLE_SID} -sid ${ORACLE_SID} -responseFile NO_VALUE \
4
-characterSet AL32UTF8 \
5
-sysPassword Som3bTt3rpwd \
6
-systemPassword Som3bTt3rpwd \
7
-createAsContainerDatabase true \
8
-numberOfPDBs 1 \
9
-pdbName ${PDB_NAME} \
10
-pdbAdminPassword Som3bTt3rpwd \
11
-databaseType MULTIPURPOSE \
12
-automaticMemoryManagement false \
13
-totalMemory 2000 \
14
-storageType FS \
15
-datafileDestination "${DATA_DIR}" \
16
-redoLogFileSize 50 \
17
-emConfiguration NONE \
18
-ignorePreReqs
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
Example:
cdb1:/u01/app/oracle/product/19.0.0/db_1:Y
Enable Oracle Managed Files and make the PDB start when the instance starts
5
1
sqlplus / as sysdba <<EOF
2
alter system set db_create_file_dest='/u02/oradata';
3
alter pluggable database pdb1 save state;
4
exit;
5
EOF
APEX
As the oracle user:
Make the apex directory and unzip the apex files.
4
1
mkdir -p /home/oracle/apex
2
unzip /tmp/apex_19.*.zip -d /home/oracle
3
chown -R oracle:oinstall /home/oracle/apex
4
cd /home/oracle/apex
Create an ACL script. This will be need later.
25
1
cat > apex_acl.sql << EOF
2
BEGIN
3
BEGIN
4
dbms_network_acl_admin.drop_acl(acl => 'all-network-PUBLIC.xml');
5
EXCEPTION
6
WHEN OTHERS THEN
7
NULL;
8
END;
9
dbms_network_acl_admin.create_acl(acl => 'all-network-PUBLIC.xml',
10
description => 'Allow all network traffic',
11
principal => 'PUBLIC',
12
is_grant => TRUE,
13
privilege => 'connect');
14
dbms_network_acl_admin.add_privilege(acl => 'all-network-PUBLIC.xml',
15
principal => 'PUBLIC',
16
is_grant => TRUE,
17
privilege => 'resolve');
18
dbms_network_acl_admin.assign_acl(acl => 'all-network-PUBLIC.xml',
19
host => '*');
20
END;
21
/
22
sho err
23
COMMIT;
24
/
25
EOF
Connect to the database
1
1
sqlplus /nolog
Change roles
1
1
CONN pdb1 AS SYSDBA
Run the script to install a full development environment
1
1
@apexins.sql SYSAUX SYSAUX TEMP /i/
Create an instance administrator user and set their password
1
1
@apxchpwd.sql
Configure REST Data Services
1
1
@apex_rest_config.sql Som3bTt3rpwd Som3bTt3rpwd
Unlock APEX users
4
1
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
Configure
REST
Data Services2
@apex_rest_config.sql
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY "Som3bTt3rpwd";
3
ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY "Som3bTt3rpwd" ACCOUNT UNLOCK;
4
ALTER USER APEX_LISTENER IDENTIFIED BY "Som3bTt3rpwd" ACCOUNT UNLOCK;
Run the ACL setup script created earlier.
1
1
@apex_acl.sql
If you've never installed ORDS before. Ignore errors on the next command.
9
1
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Som3bTt3rpwd ACCOUNT UNLOCK;
2
3
BEGIN
4
WWV_FLOW_SECURITY.g_security_group_id := 10;
5
WWV_FLOW_FND_USER_API.unlock_account('ADMIN');
6
COMMIT;
7
END;
8
/
9