Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle XE 18c #259

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you need additional help, there is a [How-To video](http://www.oraopensource.
# Current Software Versions
App | Version | Description
------ | ------ | ------
Oracle XE | 11.2.0.2.0 |
Oracle XE | 18.4.0.0.0 |
SQLcl | 4.2.0 | Command line SQL
APEX | 18.2 | Currently supports APEX 18.x, 5.x and APEX 4.x releases. Just reference the appropriate file in `config.properties`
ORDS | 18.3.0 |
Expand Down Expand Up @@ -109,15 +109,15 @@ These can be references to files on a web server or to the location on the serve

```bash
#Assuming the file resided on myserver.com
OOS_ORACLE_FILE_URL=http://myserver.com/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
OOS_ORACLE_FILE_URL=http://myserver.com/oracle-database-xe-18c-1.0-1.x86_64.rpm
#Assuming the file is placed in the /tmp folder on the machine
OOS_ORACLE_FILE_URL=file:///tmp/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
OOS_ORACLE_FILE_URL=file:///tmp/oracle-database-xe-18c-1.0-1.x86_64.rpm
```

You can copy files from your local machine to the remote server easily using ```scp```. Example:

```bash
scp oracle-xe-11.2.0-1.0.x86_64.rpm.zip [email protected]:/tmp
scp oracle-database-xe-18c-1.0-1.x86_64.rpm [email protected]:/tmp
```

#### File Help
Expand All @@ -126,7 +126,7 @@ To assist getting your Oracle installation files configured for OXAR one approac

Instead of having to use `vi` to edit the file you can use `sed` to find and replace. An example is as follows: *(Note: the escaping of forward slashes (`/`) in the URL)*
```bash
sed -i 's/OOS_ORACLE_FILE_URL=CHANGEME/OOS_ORACLE_FILE_URL=https:\/\/www.dropbox.com\/s\/SHAREDLINKCODE\/oracle-xe-11.2.0-1.0.x86_64.rpm.zip?dl=1/g' config.properties
sed -i 's/OOS_ORACLE_FILE_URL=CHANGEME/OOS_ORACLE_FILE_URL=https:\/\/www.dropbox.com\/s\/SHAREDLINKCODE\/oracle-database-xe-18c-1.0-1.x86_64.rpm?dl=1/g' config.properties
sed -i 's/OOS_APEX_FILE_URL=CHANGEME/OOS_APEX_FILE_URL=https:\/\/www.dropbox.com\/s\/SHAREDLINKCODE\/apex_5.0.3_en.zip?dl=1/g' config.properties
sed -i 's/OOS_ORDS_FILE_URL=CHANGEME/OOS_ORDS_FILE_URL=https:\/\/www.dropbox.com\/s\/SHAREDLINKCODE\/ords.3.0.2.294.08.40.zip?dl=1/g' config.properties
sed -i 's/OOS_SQLCL_FILE_URL=/OOS_SQLCL_FILE_URL=https:\/\/www.dropbox.com\/s\/SHAREDLINKCODE\/sqlcl-4.2.0.16.049.0843-no-jre.zip?dl=1/g' config.properties
Expand All @@ -137,7 +137,7 @@ Vagrant automatically maps your current folder to `/vagrant` on its VM. You can

Example:
```bash
OOS_ORACLE_FILE_URL=file:///vagrant/files/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
OOS_ORACLE_FILE_URL=file:///vagrant/files/oracle-database-xe-18c-1.0-1.x86_64.rpm
```

### Modules
Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Vagrant.configure(2) do |config|
# vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.cpus = "1"
vb.memory = "1024"
vb.cpus = 1
vb.memory = 2048

vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]

Expand Down
20 changes: 10 additions & 10 deletions addons/aop/aop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ cd $OOS_SOURCE_DIR

# Create schema for AOP
cd $OOS_SOURCE_DIR/oracle
echo exit | sqlplus sys/$OOS_ORACLE_PWD as sysdba @create_user.sql $OOS_AOP_SCHEMA_NAME $OOS_AOP_SCHEMA_PASS Y
echo exit | sqlplus sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_user.sql $OOS_AOP_SCHEMA_NAME $OOS_AOP_SCHEMA_PASS Y


cd $OOS_SOURCE_DIR

# Create AOP Workspace
echo creating AOP APEX Workspace
echo exit | sqlplus sys/$OOS_ORACLE_PWD as sysdba @apex/create_workspace.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME
echo exit | sqlplus sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex/create_workspace.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME

# Create AOP Workspace User
echo creating AOP APEX User
echo exit | sqlplus sys/$OOS_ORACLE_PWD as sysdba @apex/create_user.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME $OOS_AOP_APEX_USER_NAME $OOS_AOP_APEX_USER_PWD
echo exit | sqlplus sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex/create_user.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME $OOS_AOP_APEX_USER_NAME $OOS_AOP_APEX_USER_PWD


# AOP ACL
echo Setting up AOP
cd $OOS_SOURCE_DIR/addons/aop
echo exit | sqlplus sys/$OOS_ORACLE_PWD as sysdba @aop_setup.sql $OOS_AOP_SCHEMA_NAME
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS @aop_db_pkg.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS @install_db_sample_obj.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS @aop_sample3_db_obj.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS @aop_db_sample_pkg.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS @db_pkg_native_compile.sql
echo exit | sqlplus sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @aop_setup.sql $OOS_AOP_SCHEMA_NAME
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 @aop_db_pkg.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 @install_db_sample_obj.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 @aop_sample3_db_obj.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 @aop_db_sample_pkg.sql
echo exit | sqlplus $OOS_AOP_SCHEMA_NAME/$OOS_AOP_SCHEMA_PASS@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 @db_pkg_native_compile.sql
# install sample database app here (change to _51 for APEX 5.1 version)
echo exit | sqlplus sys/$OOS_ORACLE_PWD as sysdba @install_apex_app.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME 500 AOP aop_sample3_apex_app_50.sql
echo exit | sqlplus sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @install_apex_app.sql $OOS_AOP_APEX_WORKSPACE $OOS_AOP_SCHEMA_NAME 500 AOP aop_sample3_apex_app_50.sql
2 changes: 1 addition & 1 deletion docs/install_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Software that is installed apart of this package:

## Oracle XE 11g

Oracle is installed into the folder: ``/u01/app/oracle/product/11.2.0/xe`. This is most conveniently navigated to with the `$ORACLE_HOME` environment variable. This is set up when ever you log into the terminal via the profile: `/etc/profile.d/20oos_oraclexe.sh`.
Oracle is installed into the folder: `/opt/oracle/product/18c/dbhomeXE`. This is most conveniently navigated to with the `$ORACLE_HOME` environment variable. This is set up when ever you log into the terminal via the profile: `/etc/profile.d/20oos_oraclexe.sh`.

## Application Express 5.0

Expand Down
21 changes: 4 additions & 17 deletions oracle/listener.ora
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
# listener.ora Network Configuration File:
# listener.ora Network Configuration File: /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
)
#resolves issue with using localhost as HOST
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
)
)
DEFAULT_SERVICE_LISTENER = XE

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
#If having listener connection issues comment out the line below: http://verma-sourabh.blogspot.ca/2014/09/solved-while-starting-listener-oracle.html
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

DEFAULT_SERVICE_LISTENER = (XE)
16 changes: 4 additions & 12 deletions oracle/tnsnames.ora
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# tnsnames.ora Network Configuration File:
# tnsnames.ora Network Configuration File: /opt/oracle/product/18c/dbhomeXE/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

XE =
(DESCRIPTION =
#Change the values below
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
2 changes: 1 addition & 1 deletion ords/ords_params.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
db.hostname=localhost
db.password=OOS_APEX_PUB_USR_PWD
db.port=OOS_ORACLE_TNS_PORT
db.sid=xe
db.servicename=xepdb1
db.username=APEX_PUBLIC_USER
migrate.apex.rest=false
plsql.gateway.add=true
Expand Down
4 changes: 3 additions & 1 deletion profile.d/20oos_oraclexe.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source ORACLE_HOME/bin/oracle_env.sh
export ORACLE_SID=XE
export ORAENV_ASK=NO
. ORACLE_HOME/bin/oraenv
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
17 changes: 8 additions & 9 deletions scripts/apex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ unzip $OOS_APEX_ZIP_FILENAME

#Install APEX
echo "@apexins SYSAUX SYSAUX TEMP /i/" > run.sql
echo 'exit' >> run.sql
cd apex
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @../run.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @../run.sql

#Change APEX admin password
cd $OOS_SOURCE_DIR/tmp
Expand All @@ -22,7 +23,7 @@ then
echo "@apxxepwd $OOS_APEX_ADMIN_PWD" > run.sql
echo 'exit' >> run.sql
cd apex
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @../run.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @../run.sql

else
echo "APEX 5.x/18.x Install. Using new change password method";
Expand All @@ -32,26 +33,24 @@ else
perl -i -p -e 's/password \[\] " HIDE/password \[\] "/g' apxchpwd.sql

#Make sure no indents
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @apxchpwd << EOF1
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apxchpwd << EOF1
$OOS_APEX_ADMIN_USER_NAME
$OOS_APEX_ADMIN_EMAIL
$OOS_APEX_ADMIN_PWD
EOF1
fi




#APEX REST install
cd $OOS_SOURCE_DIR/tmp
#Setup restful services
if [[ ${OOS_APEX_ZIP_FILENAME,,} == "apex_18.2"* ]]
if [[ ${OOS_APEX_ZIP_FILENAME,,} == "apex_18.2"*
|| ${OOS_APEX_ZIP_FILENAME,,} == "apex_19.1"* ]]
then
echo "@apex_rest_config_core.sql @ $OOS_APEX_LISTENERUN_PWD $OOS_APEX_REST_PUB_USR_PWD" > run.sql
else
else
echo "@apex_rest_config_core.sql $OOS_APEX_LISTENERUN_PWD $OOS_APEX_REST_PUB_USR_PWD" > run.sql
fi

echo "exit" >> run.sql
cd apex
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @../run.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @../run.sql
8 changes: 4 additions & 4 deletions scripts/apex_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
cd $OOS_SOURCE_DIR/apex
perl -i -p -e "s/OOS_APEX_PUB_USR_PWD/$OOS_APEX_PUB_USR_PWD/g" apex_config.sql

sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @apex_config.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex_config.sql


#Create APEX Users
if [ "$OOS_APEX_CREATE_USER_YN" = "Y" ]; then
#Starting in APEX 5 need to separate since can only set one set_security_group_id per session
echo creating APEX Workspace
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @create_workspace.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_workspace.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME

echo creating APEX User
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @create_user.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME $OOS_APEX_USER_NAME $OOS_APEX_USER_PASS
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_user.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME $OOS_APEX_USER_NAME $OOS_APEX_USER_PASS


else
Expand All @@ -22,7 +22,7 @@ fi
#Create ACL
if [ "$OOS_ORACLE_ACL_APEX_ALL_YN" = "Y" ]; then
echo Creating Network ACL ALL
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @apex_acl_all.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex_acl_all.sql
else
echo Not created APEX ACL
fi
5 changes: 3 additions & 2 deletions scripts/config_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ if [ "$OOS_MODULE_ORDS" = "Y" ]; then
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "17.4.1" ]] \
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "18.1.1" ]] \
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "18.2.0" ]] \
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "18.3.0" ]]; then
echo "This version of ORDS is not yet supprted in OXAR" >&2
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "18.3.0" ]] \
&& [[ ! "${ORDS_MAJOR}.${ORDS_MINOR}.${ORDS_REVISION}" == "19.1.0" ]]; then
echo "This version of ORDS is not yet supported in OXAR" >&2
echo "Please report this at http://github.com/OraOpenSource/oxar/issues" >&2
exit 1
else
Expand Down
8 changes: 4 additions & 4 deletions scripts/oracle_config.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/bash
cd $OOS_SOURCE_DIR/oracle
sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @oracle_config.sql
sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @oracle_config.sql

#Create Oracle Users
if [ "$OOS_ORACLE_CREATE_USER_YN" = "Y" ]; then
echo Creating Oracle User
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD as sysdba @create_user.sql $OOS_ORACLE_USER_NAME $OOS_ORACLE_USER_PASS $OOS_ORACLE_CREATE_USER_DEMO_DATA_YN
echo exit | sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_user.sql $OOS_ORACLE_USER_NAME $OOS_ORACLE_USER_PASS $OOS_ORACLE_CREATE_USER_DEMO_DATA_YN
else
echo Not creating Oracle User
fi
cd $OOS_SOURCE_DIR/oracle

#XE has SYSTEM as the Default tablespace by default. Set back to USERS
echo Setting default tablespace
sqlplus -L sys/${OOS_ORACLE_PWD} as sysdba @default_tablespace.sql << EOF1
sqlplus -L sys/${OOS_ORACLE_PWD}@localhost:${OOS_ORACLE_TNS_PORT}/xepdb1 as sysdba @default_tablespace.sql << EOF1
USERS
EOF1

#Unlock sample data as described in docs: http://docs.oracle.com/cd/E17781_01/admin.112/e18585/toc.htm#XEGSG120
echo Unlocking sample data \(schema: hr\)
sqlplus -L sys/${OOS_ORACLE_PWD} as sysdba @unlock_sample_data.sql << EOF1
sqlplus -L sys/${OOS_ORACLE_PWD}@localhost:${OOS_ORACLE_TNS_PORT}/xepdb1 as sysdba @unlock_sample_data.sql << EOF1
${OOS_HR_PASSWORD}
EOF1
Loading