Skip to content

Commit 8498807

Browse files
+19c on OL8
1 parent 6315188 commit 8498807

File tree

6 files changed

+117
-49
lines changed

6 files changed

+117
-49
lines changed

OracleRAC/OL7/scripts/05_setup_users.sh

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# LICENSE UPL 1.0
55
#
6-
# Copyright (c) 1982-2024 Oracle and/or its affiliates. All rights reserved.
6+
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
77
#
88
# NAME
99
# 06_setup_users.sh
@@ -18,11 +18,12 @@
1818
# Ruggero Citton - RAC Pack, Cloud Innovation and Solution Engineering Team
1919
#
2020
# MODIFIED (MM/DD/YY)
21+
# rcitton 11/18/24 - ORestart fix
2122
# rcitton 03/30/20 - VBox libvirt & kvm support
2223
# rcitton 11/06/18 - Creation
2324
#
2425
# REVISION
25-
# 20240603 - $Revision: 2.0.2.1 $
26+
# 20241118 - $Revision: 2.0.2.2 $
2627
#
2728
#│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
2829
. /vagrant/config/setup.env
@@ -95,34 +96,56 @@ chmod -R ug+rw /u01
9596
echo "-----------------------------------------------------------------"
9697
echo -e "${INFO}`date +%F' '%T`: Set user env"
9798
echo "-----------------------------------------------------------------"
98-
if [ `hostname` == ${NODE1_HOSTNAME} ]
99-
then
100-
cat >> /home/grid/.bash_profile << EOF
99+
if [ `hostname` == ${NODE1_HOSTNAME} ]; then
100+
if [ ${ORESTART} == "false" ]; then
101+
cat >> /home/grid/.bash_profile << EOF
101102
export ORACLE_HOME=${GI_HOME}
102103
export PATH=\$ORACLE_HOME/bin:$PATH
103104
export ORACLE_SID=+ASM1
104105
EOF
105-
106-
cat >> /home/oracle/.bash_profile << EOF
106+
cat >> /home/oracle/.bash_profile << EOF
107107
export ORACLE_HOME=${DB_HOME}
108108
export PATH=\$ORACLE_HOME/bin:$PATH
109109
export ORACLE_SID=${DB_NAME}1
110110
EOF
111+
else
112+
cat >> /home/grid/.bash_profile << EOF
113+
export ORACLE_HOME=${GI_HOME}
114+
export PATH=\$ORACLE_HOME/bin:$PATH
115+
export ORACLE_SID=+ASM
116+
EOF
117+
cat >> /home/oracle/.bash_profile << EOF
118+
export ORACLE_HOME=${DB_HOME}
119+
export PATH=\$ORACLE_HOME/bin:$PATH
120+
export ORACLE_SID=${DB_NAME}
121+
EOF
122+
fi
111123
fi
112124

113-
if [ `hostname` == ${NODE2_HOSTNAME} ]
114-
then
115-
cat >> /home/grid/.bash_profile << EOF
125+
if [ `hostname` == ${NODE2_HOSTNAME} ]; then
126+
if [ ${ORESTART} == "false" ]; then
127+
cat >> /home/grid/.bash_profile << EOF
116128
export ORACLE_HOME=${GI_HOME}
117129
export PATH=\$ORACLE_HOME/bin:$PATH
118130
export ORACLE_SID=+ASM2
119131
EOF
120-
121-
cat >> /home/oracle/.bash_profile << EOF
132+
cat >> /home/oracle/.bash_profile << EOF
122133
export ORACLE_HOME=${DB_HOME}
123134
export PATH=\$ORACLE_HOME/bin:$PATH
124135
export ORACLE_SID=${DB_NAME}2
125136
EOF
137+
else
138+
cat >> /home/grid/.bash_profile << EOF
139+
export ORACLE_HOME=${GI_HOME}
140+
export PATH=\$ORACLE_HOME/bin:$PATH
141+
export ORACLE_SID=+ASM
142+
EOF
143+
cat >> /home/oracle/.bash_profile << EOF
144+
export ORACLE_HOME=${DB_HOME}
145+
export PATH=\$ORACLE_HOME/bin:$PATH
146+
export ORACLE_SID=${DB_NAME}
147+
EOF
148+
fi
126149
fi
127150

128151

OracleRAC/OL8/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
This directory contains Vagrant build files to provision automatically
66
two Oracle RAC nodes (21c), using Vagrant, Oracle Linux 8 and shell scripts.
7+
(It has been tested and it works with 19.23 gold images & ASMLib too)
78

89
![](images/OracleRAC.png)
910

OracleRAC/OL8/Vagrantfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
# Ruggero Citton - RAC Pack, Cloud Innovation and Solution Engineering Team
1818
#
1919
# MODIFIED (MM/DD/YY)
20+
# rcitton 11/18/24 - +19c support
2021
# rcitton 03/03/23 - OL8 support + libvirt.graphics_type = "none"
2122
# rcitton 08/27/21 - ASMFD support added #335 + ASMFD with libvirt
2223
# rcitton 09/23/20 - Latest OL7 (7.8.142) box for VirtualBox is having only one disk
2324
# rcitton 03/30/20 - VBox libvirt & kvm support
2425
# rcitton 03/24/20 - Creation
2526
#
2627
# REVISION
27-
# 20240603 - $Revision: 2.0.2.5 $
28+
# 20241118 - $Revision: 2.0.2.6 $
2829
#
2930
#│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
3031

@@ -369,8 +370,8 @@ if ! File.exist?(path)
369370
end
370371

371372
var_gi_software_ver_major = var_gi_software_ver.digits.to_a[5].to_s + var_gi_software_ver.digits.to_a[4].to_s
372-
if var_gi_software_ver_major.to_i < 21
373-
puts "ERROR: gi_software version must be 21c"
373+
if var_gi_software_ver_major.to_i < 19
374+
puts "ERROR: gi_software version must be 19c or higher"
374375
exit
375376
end
376377

OracleRAC/OL8/scripts/05_setup_users.sh

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# LICENSE UPL 1.0
55
#
6-
# Copyright (c) 1982-2020 Oracle and/or its affiliates. All rights reserved.
6+
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
77
#
88
# NAME
99
# 06_setup_users.sh
@@ -18,11 +18,12 @@
1818
# Ruggero Citton - RAC Pack, Cloud Innovation and Solution Engineering Team
1919
#
2020
# MODIFIED (MM/DD/YY)
21+
# rcitton 11/18/24 - ORestart fix
2122
# rcitton 03/30/20 - VBox libvirt & kvm support
2223
# rcitton 11/06/18 - Creation
2324
#
2425
# REVISION
25-
# 20200330 - $Revision: 2.0.2.1 $
26+
# 20241118 - $Revision: 2.0.2.2 $
2627
#
2728
#│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
2829
. /vagrant/config/setup.env
@@ -95,34 +96,56 @@ chmod -R ug+rw /u01
9596
echo "-----------------------------------------------------------------"
9697
echo -e "${INFO}`date +%F' '%T`: Set user env"
9798
echo "-----------------------------------------------------------------"
98-
if [ `hostname` == ${NODE1_HOSTNAME} ]
99-
then
100-
cat >> /home/grid/.bash_profile << EOF
99+
if [ `hostname` == ${NODE1_HOSTNAME} ]; then
100+
if [ ${ORESTART} == "false" ]; then
101+
cat >> /home/grid/.bash_profile << EOF
101102
export ORACLE_HOME=${GI_HOME}
102103
export PATH=\$ORACLE_HOME/bin:$PATH
103104
export ORACLE_SID=+ASM1
104105
EOF
105-
106-
cat >> /home/oracle/.bash_profile << EOF
106+
cat >> /home/oracle/.bash_profile << EOF
107107
export ORACLE_HOME=${DB_HOME}
108108
export PATH=\$ORACLE_HOME/bin:$PATH
109109
export ORACLE_SID=${DB_NAME}1
110110
EOF
111+
else
112+
cat >> /home/grid/.bash_profile << EOF
113+
export ORACLE_HOME=${GI_HOME}
114+
export PATH=\$ORACLE_HOME/bin:$PATH
115+
export ORACLE_SID=+ASM
116+
EOF
117+
cat >> /home/oracle/.bash_profile << EOF
118+
export ORACLE_HOME=${DB_HOME}
119+
export PATH=\$ORACLE_HOME/bin:$PATH
120+
export ORACLE_SID=${DB_NAME}
121+
EOF
122+
fi
111123
fi
112124

113-
if [ `hostname` == ${NODE2_HOSTNAME} ]
114-
then
115-
cat >> /home/grid/.bash_profile << EOF
125+
if [ `hostname` == ${NODE2_HOSTNAME} ]; then
126+
if [ ${ORESTART} == "false" ]; then
127+
cat >> /home/grid/.bash_profile << EOF
116128
export ORACLE_HOME=${GI_HOME}
117129
export PATH=\$ORACLE_HOME/bin:$PATH
118130
export ORACLE_SID=+ASM2
119131
EOF
120-
121-
cat >> /home/oracle/.bash_profile << EOF
132+
cat >> /home/oracle/.bash_profile << EOF
122133
export ORACLE_HOME=${DB_HOME}
123134
export PATH=\$ORACLE_HOME/bin:$PATH
124135
export ORACLE_SID=${DB_NAME}2
125136
EOF
137+
else
138+
cat >> /home/grid/.bash_profile << EOF
139+
export ORACLE_HOME=${GI_HOME}
140+
export PATH=\$ORACLE_HOME/bin:$PATH
141+
export ORACLE_SID=+ASM
142+
EOF
143+
cat >> /home/oracle/.bash_profile << EOF
144+
export ORACLE_HOME=${DB_HOME}
145+
export PATH=\$ORACLE_HOME/bin:$PATH
146+
export ORACLE_SID=${DB_NAME}
147+
EOF
148+
fi
126149
fi
127150

128151

OracleRAC/OL8/scripts/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ then
307307
${DB_HOME}/database/runInstaller -ignorePrereq -waitforcompletion -silent \\
308308
-responseFile ${DB_HOME}/database/response/db_install.rsp \\
309309
EOF
310+
elif [ "${DB_MAJOR}" == "19" ]
311+
then
312+
cat >> /vagrant/scripts/13_RDBMS_software_installation.sh <<EOF
313+
export CV_ASSUME_DISTID=OEL7.8
314+
${DB_HOME}/runInstaller -ignorePrereq -waitforcompletion -silent \\
315+
-responseFile ${DB_HOME}/install/response/db_install.rsp \\
316+
EOF
310317
else
311318
cat >> /vagrant/scripts/13_RDBMS_software_installation.sh <<EOF
312319
${DB_HOME}/runInstaller -ignorePrereq -waitforcompletion -silent \\

OracleRAC/OL9/scripts/05_setup_users.sh

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# LICENSE UPL 1.0
55
#
6-
# Copyright (c) 1982-2024 Oracle and/or its affiliates. All rights reserved.
6+
# Copyright (c) 2018-2024 Oracle and/or its affiliates. All rights reserved.
77
#
88
# NAME
99
# 06_setup_users.sh
@@ -18,12 +18,12 @@
1818
# Ruggero Citton - RAC Pack, Cloud Innovation and Solution Engineering Team
1919
#
2020
# MODIFIED (MM/DD/YY)
21-
# rcitton 06/03/24 - OL9 support
21+
# rcitton 11/18/24 - ORestart fix
2222
# rcitton 03/30/20 - VBox libvirt & kvm support
2323
# rcitton 11/06/18 - Creation
2424
#
2525
# REVISION
26-
# 20240603 - $Revision: 2.0.2.1 $
26+
# 20241118 - $Revision: 2.0.2.2 $
2727
#
2828
#│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
2929
. /vagrant/config/setup.env
@@ -96,45 +96,58 @@ chmod -R ug+rw /u01
9696
echo "-----------------------------------------------------------------"
9797
echo -e "${INFO}`date +%F' '%T`: Set user env"
9898
echo "-----------------------------------------------------------------"
99-
if [ `hostname` == ${NODE1_HOSTNAME} ]
100-
then
101-
cat >> /home/grid/.bash_profile << EOF
99+
if [ `hostname` == ${NODE1_HOSTNAME} ]; then
100+
if [ ${ORESTART} == "false" ]; then
101+
cat >> /home/grid/.bash_profile << EOF
102102
export ORACLE_HOME=${GI_HOME}
103103
export PATH=\$ORACLE_HOME/bin:$PATH
104104
export ORACLE_SID=+ASM1
105105
EOF
106-
107-
cat >> /home/oracle/.bash_profile << EOF
106+
cat >> /home/oracle/.bash_profile << EOF
108107
export ORACLE_HOME=${DB_HOME}
109108
export PATH=\$ORACLE_HOME/bin:$PATH
110109
export ORACLE_SID=${DB_NAME}1
111110
EOF
111+
else
112+
cat >> /home/grid/.bash_profile << EOF
113+
export ORACLE_HOME=${GI_HOME}
114+
export PATH=\$ORACLE_HOME/bin:$PATH
115+
export ORACLE_SID=+ASM
116+
EOF
117+
cat >> /home/oracle/.bash_profile << EOF
118+
export ORACLE_HOME=${DB_HOME}
119+
export PATH=\$ORACLE_HOME/bin:$PATH
120+
export ORACLE_SID=${DB_NAME}
121+
EOF
122+
fi
112123
fi
113124

114-
if [ `hostname` == ${NODE2_HOSTNAME} ]
115-
then
116-
cat >> /home/grid/.bash_profile << EOF
125+
if [ `hostname` == ${NODE2_HOSTNAME} ]; then
126+
if [ ${ORESTART} == "false" ]; then
127+
cat >> /home/grid/.bash_profile << EOF
117128
export ORACLE_HOME=${GI_HOME}
118129
export PATH=\$ORACLE_HOME/bin:$PATH
119130
export ORACLE_SID=+ASM2
120131
EOF
121-
122-
cat >> /home/oracle/.bash_profile << EOF
132+
cat >> /home/oracle/.bash_profile << EOF
123133
export ORACLE_HOME=${DB_HOME}
124134
export PATH=\$ORACLE_HOME/bin:$PATH
125135
export ORACLE_SID=${DB_NAME}2
126136
EOF
137+
else
138+
cat >> /home/grid/.bash_profile << EOF
139+
export ORACLE_HOME=${GI_HOME}
140+
export PATH=\$ORACLE_HOME/bin:$PATH
141+
export ORACLE_SID=+ASM
142+
EOF
143+
cat >> /home/oracle/.bash_profile << EOF
144+
export ORACLE_HOME=${DB_HOME}
145+
export PATH=\$ORACLE_HOME/bin:$PATH
146+
export ORACLE_SID=${DB_NAME}
147+
EOF
148+
fi
127149
fi
128150

129-
echo "-----------------------------------------------------------------"
130-
echo -e "${INFO}`date +%F' '%T`: Set user PasswordAuthentication and make sshkey"
131-
echo "-----------------------------------------------------------------"
132-
cat << EOL > /etc/ssh/sshd_config.d/90-vagrant.conf
133-
PasswordAuthentication yes
134-
UseDNS no
135-
EOL
136-
systemctl restart sshd
137-
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<<y >/dev/null 2>&1
138151

139152
#----------------------------------------------------------
140153
# EndOfFile

0 commit comments

Comments
 (0)