From 97db762800c63ae452d08a157fa809c1d5fbfd2c Mon Sep 17 00:00:00 2001 From: Victor Corte Date: Thu, 14 May 2020 15:39:40 -0300 Subject: [PATCH 1/3] setting db_create_file parameter --- startup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/startup.sh b/startup.sh index 4a77bfd..64ed38f 100755 --- a/startup.sh +++ b/startup.sh @@ -55,6 +55,7 @@ service oracle-xe start export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_SID=XE +export ORACLE_DATA=/u01/app/oracle/oradata/$ORACLE_SID if [ ! -e "/u01/app/oracle/initialized.id" ] ; then @@ -79,6 +80,12 @@ if [ ! -e "/u01/app/oracle/initialized.id" ] ; then fi + echo "Setting db_create_file_dest param..." + if ! echo "ALTER SYSTEM SET db_create_file_dest = '$ORACLE_DATA';" | sqlplus - s SYSTEM/oracle; then + echo "error setting db_create_file_dest param" + exit 1 + fi + if [ -z "$ORACLE_PASSWORD" ] ; then echo "Warning: using default password!!. Set ORACLE_PASSWORD environment variable to change it" export ORACLE_PASSWORD="oracle"; From dc549add2f76cc8c362907a0350b41890098995c Mon Sep 17 00:00:00 2001 From: Victor Corte Date: Thu, 14 May 2020 15:58:55 -0300 Subject: [PATCH 2/3] fix sqlplus command --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 64ed38f..7f180b5 100755 --- a/startup.sh +++ b/startup.sh @@ -81,7 +81,7 @@ if [ ! -e "/u01/app/oracle/initialized.id" ] ; then fi echo "Setting db_create_file_dest param..." - if ! echo "ALTER SYSTEM SET db_create_file_dest = '$ORACLE_DATA';" | sqlplus - s SYSTEM/oracle; then + if ! echo "ALTER SYSTEM SET db_create_file_dest = '$ORACLE_DATA';" | sqlplus -s SYSTEM/oracle; then echo "error setting db_create_file_dest param" exit 1 fi From de1279cafd51a8554a25759ac8b22ccccdd9a332 Mon Sep 17 00:00:00 2001 From: Victor Corte Date: Thu, 14 May 2020 15:59:09 -0300 Subject: [PATCH 3/3] mkdir if not exists --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index ea3eb11..86a2d76 100755 --- a/setup.sh +++ b/setup.sh @@ -10,7 +10,7 @@ apt-get update # Prepare to install Oracle apt-get install -y libaio1 net-tools bc && ln -s /usr/bin/awk /bin/awk && -mkdir /var/lock/subsys && +mkdir -p /var/lock/subsys && mv /assets/chkconfig /sbin/chkconfig && chmod 755 /sbin/chkconfig &&