-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallDBBinaries.sh
More file actions
87 lines (78 loc) · 2.65 KB
/
Copy pathinstallDBBinaries.sh
File metadata and controls
87 lines (78 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# LICENSE UPL 1.0
#
# Copyright (c) 1982-2022 Oracle and/or its affiliates. All rights reserved.
#
# Since: December, 2016
# Author: gerald.venzl@oracle.com
# Description: Sets up the unix environment for DB installation.
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Convert $1 into upper case via "^^" (bash version 4 onwards)
EDITION=${1^^}
# Check whether edition has been passed on
if [ "$EDITION" == "" ]; then
echo "ERROR: No edition has been passed on!"
echo "Please specify the correct edition!"
exit 1;
fi;
# Check whether correct edition has been passed on
if [ "$EDITION" != "EE" ] && [ "$EDITION" != "SE2" ]; then
echo "ERROR: Wrong edition has been passed on!"
echo "Edition $EDITION is no a valid edition!"
exit 1;
fi;
# Check whether ORACLE_BASE is set
if [ "$ORACLE_BASE" == "" ]; then
echo "ERROR: ORACLE_BASE has not been set!"
echo "You have to have the ORACLE_BASE environment variable set to a valid value!"
exit 1;
fi;
# Check whether ORACLE_HOME is set
if [ "$ORACLE_HOME" == "" ]; then
echo "ERROR: ORACLE_HOME has not been set!"
echo "You have to have the ORACLE_HOME environment variable set to a valid value!"
exit 1;
fi;
# Replace place holders
# ---------------------
sed -i -e "s|###ORACLE_EDITION###|$EDITION|g" "$INSTALL_DIR"/"$INSTALL_RSP" && \
sed -i -e "s|###ORACLE_BASE###|$ORACLE_BASE|g" "$INSTALL_DIR"/"$INSTALL_RSP" && \
sed -i -e "s|###ORACLE_HOME###|$ORACLE_HOME|g" "$INSTALL_DIR"/"$INSTALL_RSP"
# Install Oracle binaries
cd "$ORACLE_HOME" && \
mv "$INSTALL_DIR"/"$INSTALL_FILE_1" "$ORACLE_HOME"/ && \
unzip "$INSTALL_FILE_1" && \
rm "$INSTALL_FILE_1" && \
"$ORACLE_HOME"/runInstaller -silent -force -waitforcompletion -responsefile "$INSTALL_DIR"/"$INSTALL_RSP" -ignorePrereqFailure && \
cd "$HOME"
if $SLIMMING; then
# Remove not needed components
# APEX
rm -rf "$ORACLE_HOME"/apex && \
# ORDS
rm -rf "$ORACLE_HOME"/ords && \
# SQL Developer
rm -rf "$ORACLE_HOME"/sqldeveloper && \
# UCP connection pool
rm -rf "$ORACLE_HOME"/ucp && \
# All installer files
rm -rf "$ORACLE_HOME"/lib/*.zip && \
# OUI backup
rm -rf "$ORACLE_HOME"/inventory/backup/* && \
# Network tools help
rm -rf "$ORACLE_HOME"/network/tools/help && \
# Database upgrade assistant
rm -rf "$ORACLE_HOME"/assistants/dbua && \
# Database migration assistant
rm -rf "$ORACLE_HOME"/dmu && \
# Remove pilot workflow installer
rm -rf "$ORACLE_HOME"/install/pilot && \
# Support tools
rm -rf "$ORACLE_HOME"/suptools && \
# Temp location
rm -rf /tmp/* && \
# Database files directory
rm -rf "$INSTALL_DIR"/database
fi