Skip to content

Commit 9e88a0b

Browse files
authored
Merge pull request #6 from fuzziebrain/base-wallet-support
Added support to create an Oracle Wallet for APEX
2 parents 8dbea83 + 0845e38 commit 9e88a0b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

scripts/setup/01-install.sh

+7
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,11 @@ if [ $UID = "0" ]; then
4747
runuser oracle -m -s /bin/bash -c ". $SCRIPT_DIR/package/installOrds.sh"
4848
else
4949
. $SCRIPT_DIR/package/installOrds.sh
50+
fi
51+
52+
# Setup Oracle Wallet for APEX
53+
if [ $UID = "0" ]; then
54+
runuser oracle -m -s /bin/bash -c ". $SCRIPT_DIR/package/setupBaseWallet.sh"
55+
else
56+
. $SCRIPT_DIR/package/setupBaseWallet.sh
5057
fi
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Run as oracle user
4+
5+
ORAENV_ASK=NO
6+
ORACLE_SID=${ORACLE_SID:-XE}
7+
8+
. oraenv
9+
10+
export BUNDLE_FILE=/etc/pki/tls/cert.pem
11+
export WALLET_PATH=$ORACLE_BASE/admin/$ORACLE_SID/tls_wallet
12+
export WALLET_PWD=$ORACLE_PWD
13+
export WALLET_PWD_CONFIRM=$WALLET_PWD
14+
15+
sh -c "$(curl -fsSL https://gist.githubusercontent.com/fuzziebrain/202f902d8fc6d8de586da5097a501047/raw/78dba192f4c15f59d14ac17491734897fc440e40/createBaseWallet.sh)"
16+
17+
echo "Setup APEX Wallet"
18+
sqlplus / as sysdba << EOF
19+
alter session set container = ${ORACLE_PDB:-XEPDB1};
20+
21+
begin
22+
apex_instance_admin.set_parameter(
23+
p_parameter => 'WALLET_PATH'
24+
, p_value => 'file:$WALLET_PATH'
25+
);
26+
27+
apex_instance_admin.set_parameter(
28+
p_parameter => 'WALLET_PWD'
29+
, p_value => '$WALLET_PWD'
30+
);
31+
32+
commit;
33+
end;
34+
/
35+
EOF

0 commit comments

Comments
 (0)