diff --git a/README.md b/README.md index e03190e..1309fce 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Oracle Developer Day VM Builder =============================== Welcome to the packer build for the Oracle Developer Day vm. -This will build a Oracle Linux server and install a 12.2 Oracle database on the machine. Follow the download instructions to download the software to install and follow the build instructions to build the machine. You will need around 30gb of space free to store the downloads and run the build. +This will build a Oracle Linux server and install a 18.3 Oracle database on the machine. Follow the download instructions to download the software to install and follow the build instructions to build the machine. You will need around 30gb of space free to store the downloads and run the build. There are several directories which are used in the build @@ -15,9 +15,7 @@ Mandatory Downloads **These two downloads are mandatory**. If they are not here, the build will not start. * OracleLinux-R7-U3-Server-x86_64-dvd.iso (needs to be this exactly md5 checked) -* see : http://edelivery.oracle.com/linux (I cannot give more direct link - as (free) login required + need to be over 18) -* linux\*122*_database.zip (12201 has been verified - silent install may be incompatible with later versions) -* see : http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html# - (free) login required to accept license +* LINUX.X64_180000_db_home.zip (183 has been verified - silent install may be incompatible with later versions) Optional Downloads -------------- @@ -26,8 +24,8 @@ If these files are available in the **put_files_here** directory, the build will * jdk-8u\*-linux-x64.tar.gz - **Oracle JDK** * sqldeveloper-\*-no-jre.zip - **Oracle SQL Developer** * datamodeler-\*-no-jre.zip **Oracle SQLDeveloper Data Modeler** -* sqlcl-\*-no-jre.zip - **Oracle SQLcl** -* apex_5\*.zip - **Oracle Application Express** +* sqlcl-\*.zip - **Oracle SQLcl** +* apex\_\*.zip - **Oracle Application Express** * ords\*.zip - **Oracle REST Data Services** Oracle Internal Files @@ -51,12 +49,6 @@ update servers. optional export to export the ova. ![packer build](images/packerbuild.png) -Output Directory ----------------- - -After building you can find the built OVA in the output directory. -If you want the Oracle prebuilt OVA you can find it on Oracle Technology Network (OTN) [here](http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html) - Build Structure -------------------- @@ -77,3 +69,29 @@ Timings: Minimum (Oracle Linux + Oracle Database) Total time 60 mins (accounted for time + 7 mins rounding error / ignore <2 minute). + +boot,8 +yum update,14 +reboot ,3 +run database software install (not database build),3 +dbca (database build),7 +password and 32kvarchar2,6 +shrink (fill disk with 0 for easy compression),3 +1 x 3 minute reboot + shutdown + minor <1 minute stuff,10 + +Maximum (Including all optional extras APEX/ORDS/((internal) demos) +Total time 113.5 mins (Accounted for time + 10.5 mins rounding error / ignore <2 minute). +boot,9 +yum update,14 +reboot,3 +run database software install (not database build),4 +dbca (database build),8 +password and 32kvarchar ,18 +apex install ,16 +ords install ,4 +set up demos and run demo reset,18 +shrink (fill disk with 0 for easy compression),2 +1 x 3 minute reboot + shutdown + minor <1 minute stuff - this is too long,9 + +Removing the shrink.sh if not exporting - fills disk with 0 for easy compression. +Run shrink.sh over ssh if subsequently exporting to ova (brings ova file down 60% in size to under 8Gb) diff --git a/packerConfig.json b/packerConfig.json index cbf2ac3..bf63bfc 100755 --- a/packerConfig.json +++ b/packerConfig.json @@ -56,8 +56,8 @@ "vboxmanage": [ [ "modifyvm", "{{.Name}}", "--memory", "4096" ], [ "modifyvm", "{{.Name}}", "--cpus", "2" ], - [ "createhd", "--filename", "Oracle DB Developer VMo_2.vdi", "--size", "30000"], - [ "storageattach", "{{.Name}}", "--storagectl", "SATA Controller", "--port", "1", "--device", "0" ,"--type", "hdd", "--medium", "Oracle DB Developer VMo_2.vdi"], + [ "createhd", "--filename", "Oracle DB Developer VM__2.vdi", "--size", "30000"], + [ "storageattach", "{{.Name}}", "--storagectl", "SATA Controller", "--port", "1", "--device", "0" ,"--type", "hdd", "--medium", "Oracle DB Developer VM__2.vdi"], [ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional"], [ "modifyvm", "{{.Name}}", "--draganddrop", "bidirectional"], [ "modifyvm", "{{.Name}}", "--paravirtprovider", "kvm"], @@ -65,6 +65,7 @@ [ "modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,,22"], [ "modifyvm", "{{.Name}}", "--natpf1", "apex8080,tcp,,8080,,8080"], [ "modifyvm", "{{.Name}}", "--natpf1", "apex8081,tcp,,8081,,8081"], + [ "modifyvm", "{{.Name}}", "--natpf1", "ords9090,tcp,,9090,,9090"], [ "modifyvm", "{{.Name}}", "--audio", "none"], [ "modifyvm", "{{.Name}}", "--vram", "128"] ], @@ -90,7 +91,7 @@ "shutdown_timeout": "10m", "vm_name": "Oracle DB Developer VM", "http_directory":"upload", - "export_opts": ["--vsys", "0","--eulafile","license.txt", "--product", "Oracle RDBMS 12.2, Application Express 5.1,REST Data Services 3.0,SQL Developer 4.2", "--producturl", "http://otn.oracle.com", "--vendor", "Oracle", "--vendorurl", "http://www.oracle.com", "--version", "May_2017"] +"export_opts": ["--vsys", "0","--eulafile","license.txt", "--product", "Oracle RDBMS 18.3, Application Express 18.1,REST Data Services 18.2,SQL Developer 18.2", "--producturl", "http://otn.oracle.com", "--vendor", "Oracle", "--vendorurl", "http://www.oracle.com", "--version", "July_2017"] } ] } diff --git a/start.sh b/start.sh index fb15978..39dad1a 100644 --- a/start.sh +++ b/start.sh @@ -45,13 +45,19 @@ function cleanup { # are present otherwise, there is no point in continuing # function check_required_files { - export varsaccepted= - if test -f put_files_here/OracleLinux-R7-U3-Server-x86_64-dvd.iso - then + export varsaccepted= + if test -f OracleLinux-R7-U3-Server-x86_64-dvd.iso + then export varsaccepted=" -var iso_downloaded=y " - cp -n put_files_here/OracleLinux-R7-U3-Server-x86_64-dvd.iso . - fi - if test -f put_files_here/linuxx64*122*database.zip + else + if test -f put_files_here/OracleLinux-R7-U3-Server-x86_64-dvd.iso + then + export varsaccepted=" -var iso_downloaded=y " + mv put_files_here/OracleLinux-R7-U3-Server-x86_64-dvd.iso . + touch put_files_here/OracleLinux-R7-U3-Server-x86_64-dvd.iso + fi + fi + if test -f put_files_here/LINUX.X64_*_db_home.zip then export varsaccepted=" $varsaccepted -var oracle_database_downloaded=y " fi diff --git a/upload/1updateLinux_inner.sh b/upload/1updateLinux_inner.sh index 7477efb..585e9ce 100755 --- a/upload/1updateLinux_inner.sh +++ b/upload/1updateLinux_inner.sh @@ -38,7 +38,10 @@ then fi } function yum_update { - +#turn off packagekit - sometimes conflicts with yum - not available yet but mask seems to work +/bin/systemctl stop packagekit.service +/bin/systemctl disable packagekit.service +/bin/systemctl mask packagekit.service yum -y update yum -y grouplist yum -y groups list @@ -47,7 +50,7 @@ yum -y install expect yum -y install gcc yum -y install kernel-uek-devel yum -y install kernel-headers -yum -y install oracle-database-server-12cR2-preinstall +yum -y install oracle-database-preinstall-18c #oracle-rdbms-server-12cR2-preinstall usermod -a -g oinstall -G dba,wheel oracle #need to remove the yum proxy @@ -86,6 +89,18 @@ systemctl set-default graphical.target } function setup_desktop { +cd /tmp +#need to move oracle user before gnome gets started +chmod 755 /home/oracle +#move symbolic link from under me - work or fail fast +mkdir /u01/userhome +chmod 755 /u01/userhome +cp -Rp /home/* /u01/userhome +chmod 755 /u01/userhome/* +#sometimes fails (10% of builds) if process running +ps -ef | grep oracle +rm -rf /home +ln -s /u01/userhome /home #need a reboot (or finish) after extras install. check by lsmod | grep vbox su - oracle -c "bash -c 'mkdir ~/.config'" su - oracle -c "bash -c 'mkdir ~/Desktop; echo images>>~/Desktop/.hidden; echo style.css>>~/Desktop/.hidden'" @@ -101,7 +116,7 @@ Name[en_US]=Click here to Start Labs Exec=/usr/bin/firefox /home/oracle/Desktop/ODDHandsOnLabs.html \n Name=Start Here Icon=/home/oracle/runTimeClickHere.png -' > ~oracle/Desktop/'Click here to Start.desktop'" +' > /home/oracle/Desktop/'Click here to Start.desktop'" else su - oracle -c "echo '[Desktop Entry] Version=1.0 @@ -112,9 +127,9 @@ Name[en_US]=Click here to Start Browser Exec=/usr/bin/firefox \n Name=Start Here Icon=/home/oracle/runTimeClickHere.png -' > ~oracle/Desktop/'Click here to Start.desktop'" +' > /home/oracle/Desktop/'Click here to Start.desktop'" fi -su - oracle -c "chmod 755 ~oracle/Desktop/'Click here to Start.desktop'" +su - oracle -c "chmod 755 ~/Desktop/'Click here to Start.desktop'" su - oracle -c "cp /tmp/1/runTimeClickHere.png ~oracle" } function setup_resolution { diff --git a/upload/2afterFirstReboot_inner.sh b/upload/2afterFirstReboot_inner.sh index 53d8105..3595430 100755 --- a/upload/2afterFirstReboot_inner.sh +++ b/upload/2afterFirstReboot_inner.sh @@ -44,9 +44,9 @@ if test "m$BUILD_WEB_PROXY" != "m" then printf "2d\nw\nq"|ed /etc/yum.conf fi -#fix for intermittant java/sqldeveloper cursor copy issue -cat /etc/default/grub| sed 's/^\(GRUB_CMDLINE_LINUX="[^"]*\)/\1 nomodeset/g' > /tmp/xx -cp /tmp/xx /etc/default/grub -grub2-mkconfig -o /boot/grub2/grub.cfg +#fix for intermittant java/sqldeveloper cursor copy issue supposedly fixed in latest (openjdk?) java152 +#cat /etc/default/grub| sed 's/^\(GRUB_CMDLINE_LINUX="[^"]*\)/\1 nomodeset/g' > /tmp/xx +#cp /tmp/xx /etc/default/grub +#grub2-mkconfig -o /boot/grub2/grub.cfg . ~oracle/buildTimeEnd.sh exit 0 diff --git a/upload/3_1installDbtoolClientTools_inner.sh b/upload/3_1installDbtoolClientTools_inner.sh index aad45a7..af103ba 100755 --- a/upload/3_1installDbtoolClientTools_inner.sh +++ b/upload/3_1installDbtoolClientTools_inner.sh @@ -26,6 +26,7 @@ . ~oracle/runTimeStartScript.sh +dbus-launch gsettings set org.gnome.nautilus.icon-view default-zoom-level small mkdir -p /home/oracle/java mkdir -p /home/oracle/Desktop/images if test -f /tmp/1/jdk8x64.tar.gz @@ -126,7 +127,7 @@ fi #actually made further up this script if test /tmp/1/sqldev.zip then -cp /tmp/1/"SQL Developer.desktop" /home/oracle/Desktop +cp /tmp/1/"SQL Developer.desktop" /home/oracle/Desktop/ fi #cp /tmp/1/readme.txt /home/oracle/Desktop #probably want to skip next 5 commands in testing - and have them prebuilt into the base. what if they ask for a reboot? - force a reboot at end? @@ -154,7 +155,7 @@ Exec=/home/oracle/bin/datamodeler Terminal=false Type=Application X-Desktop-File-Install-Version=0.21 -Categories=X-Red-Hat-Extra;Application;Development;" > /home/oracle/Desktop/Oracle-datamodeler.desktop +" > /home/oracle/Desktop/Oracle-datamodeler.desktop chmod 755 /home/oracle/Desktop/Oracle-datamodeler.desktop echo '#!/bin/bash #should do image or desktop @@ -173,16 +174,16 @@ echo '#!/bin/bash #LD_LIBRARY_PATH #normal .bashrc does not set LD_LIBRARY_PATH even the first time export ORACLE_BASE=/u01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/12.2/db_1 +export ORACLE_HOME=$ORACLE_BASE/product/version/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib if test "m$DBENV" = "m" then export TMP=/tmp export TMPDIR=$TMP -export ORACLE_UNQNAME=orcl12c +export ORACLE_UNQNAME=orclcdb export ORACLE_BASE=/u01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/12.2/db_1 -export ORACLE_SID=orcl12c +export ORACLE_HOME=$ORACLE_BASE/product/version/db_1 +export ORACLE_SID=orclcdb export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib @@ -200,12 +201,24 @@ export TMZ="GMT" export JAVA_HOME=`ls -d /home/oracle/java/jdk* 2>/dev/null` if test "m$JAVA_HOME" = "m" then -export JAVA_HOME=/u01/app/oracle/product/12.2/db_1/jdk +export JAVA_HOME=/u01/app/oracle/product/version/db_1/jdk fi export PATH=$JAVA_HOME/bin:/home/oracle/bin:/home/oracle/sqlcl/bin:/home/oracle/sqldeveloper:/home/oracle/datamodeler:$PATH:/home/oracle/sqlcl/bin:/home/oracle/sqldeveloper:/home/oracle/bin export JAVAENV=true fi'>>/home/oracle/.bashrc - +ed -s /home/oracle/Desktop/'Click here to Start.desktop' <<< $',s/Click here to Start/Click here to Start Labs/g\nw' +echo ' +bash /tmp/1/buildTimeSetupRestClient.sh +export LD_LIBRARY_PATH= +cd ~/Desktop +echo only rest client worked do this again at the end icon size seems almost similar whether trusted or not +dbus-launch gio set "Rest Client.desktop" "metadata::trusted" yes +dbus-launch gio set "SQL Developer.desktop" "metadata::trusted" yes +dbus-launch gio set "Oracle-datamodeler.desktop" "metadata::trusted" yes +dbus-launch gio set "Click here to Start.desktop" "metadata::trusted" yes +dbus-launch gio set "sql.desktop" "metadata::trusted" yes +' > /tmp/icons.sh +bash /tmp/icons.sh cp /tmp/1/runTimeSQLDeveloperIcon.png /home/oracle/Desktop/images cp /tmp/1/runTimeSQLDeveloperIcon.png /home/oracle/Desktop/images cp /tmp/1/runTimeLabStylesheet.css /home/oracle/Desktop/style.css diff --git a/upload/3_2installDatabase_inner.sh b/upload/3_2installDatabase_inner.sh index 4e3ee85..a081f66 100755 --- a/upload/3_2installDatabase_inner.sh +++ b/upload/3_2installDatabase_inner.sh @@ -26,13 +26,12 @@ . ~oracle/runTimeStartScript.sh -mkdir /u01/stagevb -mv /tmp/1/linuxx64_122_database.zip /u01/stagevb -cd /u01/stagevb -unzip linuxx64_122_database.zip +mkdir -p /u01/app/oracle/product/version/db_1 +mv /tmp/1/LINUX.X64_180000_db_home.zip /u01/app/oracle/product/version/db_1 +cd /u01/app/oracle/product/version/db_1 +unzip LINUX.X64_180000_db_home.zip +rm LINUX.X64_180000_db_home.zip echo assumption this results in a directory database -rm linuxx64_122_database.zip -cd /u01/stagevb/database ./runInstaller -silent -ignorePrereq -waitForCompletion -responseFile /tmp/1/buildTimeSoftwareInstall.rsp @@ -46,10 +45,10 @@ if test "m$DBENV" = "m" -a "m$GNOME_CHECK" = "m0" then export TMP=/tmp export TMPDIR=$TMP -export ORACLE_UNQNAME=orcl12c +export ORACLE_UNQNAME=orclcdb export ORACLE_BASE=/u01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/12.2/db_1 -export ORACLE_SID=orcl12c +export ORACLE_HOME=$ORACLE_BASE/product/version/db_1 +export ORACLE_SID=orclcdb #LD_LIBRARY_PATH export PATH=/home/oracle/bin:/home/oracle/LDLIB:$ORACLE_HOME/bin:/usr/sbin:$PATH #during install set LD_LIBRARY_PATH otherwise rely on LDLIB wrappers and ~/bin/sql sqlplus and modeller diff --git a/upload/3_6apexInstall_inner.sh b/upload/3_6apexInstall_inner.sh index f779941..8c95179 100755 --- a/upload/3_6apexInstall_inner.sh +++ b/upload/3_6apexInstall_inner.sh @@ -27,6 +27,12 @@ . ~oracle/runTimeStartScript.sh +if test -f /tmp/1/cwallet.sso +then + mkdir /home/oracle/wallet + cp /tmp/1/cwallet.sso /home/oracle/wallet + chmod -R 755 /home/oracle/wallet +fi cd $ORACLE_HOME/apex echo apex not preinstalled anymore ls -l apxremov_con.sql @@ -78,16 +84,24 @@ EXEC DBMS_UTILITY.compile_schema(schema => 'FLOWS_FILES'); EXEC DBMS_UTILITY.compile_schema(schema => 'APEX_050100'); EXEC DBMS_UTILITY.compile_schema(schema => 'APEX_PUBLIC_USER'); EXEC DBMS_UTILITY.compile_schema(schema => 'FLOWS_FILES'); - +column totupapex new_val totupapex +--APEX_180100 check +select username totupapex from all_users where username like 'APEX_0%' or username like 'APEX_1%' or username like 'APEX_2%' order by totupapex asc; +clear column +EXEC DBMS_UTILITY.compile_schema(schema => '&totupapex'); +EXEC DBMS_UTILITY.compile_schema(schema => 'APEX_PUBLIC_USER'); +EXEC DBMS_UTILITY.compile_schema(schema => 'FLOWS_FILES'); --anonymous needs to be unlocked should be unlocked at pdb level might error?? SELECT username, account_status FROM dba_users; alter user anonymous identified by oracle; alter user anonymous account unlock; ALTER USER APEX_050000 identified by oracle; ALTER USER APEX_050100 identified by oracle; +ALTER USER &totupapex identified by oracle; ALTER USER APEX_PUBLIC_USER identified by oracle; ALTER USER FLOWS_FILES identified by oracle; ALTER USER APEX_050000 ACCOUNT UNLOCK; ALTER USER APEX_050100 ACCOUNT UNLOCK; +ALTER USER &totupapex ACCOUNT UNLOCK; ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER FLOWS_FILES ACCOUNT UNLOCK; "|$SQL_OR_SQLPLUS sys/oracle@localhost:1521/orcl as sysdba @@ -191,6 +205,56 @@ end; / commit; " | sqlplus sys/oracle@localhost:1521/orcl as sysdba +echo "whenever sqlerror exit 1 +column totupapex new_val totupapex +--APEX_180100 check +select username totupapex from all_users where username like 'APEX_0%' or username like 'APEX_1%' or username like 'APEX_2%' order by totupapex asc; +clear column +alter session set current_schema = &totupapex; + +PROMPT <<--------------- Setting Instance Settings --------------->> +begin + wwv_flow_security.g_security_group_id := 10; + wwv_flow_security.g_user := 'ADMIN'; + wwv_flow.g_import_in_progress := true; + + for c1 in (select user_id + from wwv_flow_fnd_user + where security_group_id = wwv_flow_security.g_security_group_id + and user_name = wwv_flow_security.g_user + ) loop + APEX_UTIL.edit_user + ( p_user_id => c1.user_id + , p_user_name => wwv_flow_security.g_user + , p_web_password => 'oracle' + , p_new_password => 'oracle' + ,p_change_password_on_first_use => 'N', + p_first_password_use_occurred => 'Y' ); + end loop; + wwv_flow.g_import_in_progress := false; + APEX_INSTANCE_ADMIN.SET_PARAMETER('PASSWORD_HISTORY_DAYS',0); + APEX_INSTANCE_ADMIN.SET_PARAMETER('STRONG_SITE_ADMIN_PASSWORD','N'); + APEX_INSTANCE_ADMIN.SET_PARAMETER('ACCOUNT_LIFETIME_DAYS',36500); + +end; +/ +commit; +" | sqlplus sys/oracle@localhost:1521/orcl as sysdba +echo " +column totupapex new_val totupapex +--APEX_180100 check +select username totupapex from all_users where username like 'APEX_0%' or username like 'APEX_1%' or username like 'APEX_2%' order by totupapex asc; +clear column +BEGIN + DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE( + host => '*', + ace => xs"'$'"ace_type(privilege_list => xs"'$'"name_list('connect'), + principal_name => '&totupapex', + principal_type => xs_acl.ptype_db)); +END; +/ +commit; +"| sqlplus sys/oracle@localhost:1521/orcl as sysdba else ~oracle/buildTimeReportSkippingFile.sh apex.zip diff --git a/upload/3_7ORDSInstall_inner.sh b/upload/3_7ORDSInstall_inner.sh index 3f07bc5..901fdd5 100755 --- a/upload/3_7ORDSInstall_inner.sh +++ b/upload/3_7ORDSInstall_inner.sh @@ -26,9 +26,15 @@ . ~oracle/runTimeStartScript.sh +if test -f /tmp/1/oracle.dbtools.jdbcrest.jar +then +cp /tmp/1/oracle.dbtools.jdbcrest.jar ~/sqlcl/lib +chmod 644 ~/sqlcl/lib/oracle.dbtools.jdbcrest.jar +chown oracle ~/sqlcl/lib/oracle.dbtools.jdbcrest.jar +fi if test -f /tmp/1/ords.zip then - if test -f /home/oracle/sqldeveloper/ords + if test -d /home/oracle/sqldeveloper/ords then if test -f /tmp/1/apex.zip then @@ -81,8 +87,7 @@ then set timeout 600 spawn java -jar /home/oracle/ords/ords.war install --parameterFile /home/oracle/ords/ords_params_vmconfig.properties simple - expect -regexp "Enter the username with SYSDBA privileges to verify the installation .SYS.." { send "sys\r" } - expect -regexp "Enter the database password for sys." {send "oracle\r"} + expect -regexp "Enter the database password for SYS AS SYSDBA." {send "oracle\r"} expect -regexp "Confirm password." {send "oracle\r"} expect -regexp " if using HTTPS .1.." {send "1\r"} expect -regexp "something the WiLl Never Happen" {send "jingle bella\r"} @@ -94,8 +99,34 @@ then echo tags to search stdout 1690 160 cat /tmp/zzz echo /home/oracle/bin/ords.sh stop - /home/oracle/bin/ords.sh stop + mv /home/oracle/ords/vmconfig/ords/defaults.xml /home/oracle/ords/vmconfig/ords/defaults.xml.SAV + cat /home/oracle/ords/vmconfig/ords/defaults.xml.SAV|sed 'sZ1521Z1521\ntrue\nfalseZg'>/home/oracle/ords/vmconfig/ords/defaults.xml + chmod 755 /home/oracle/ords/vmconfig/ords/defaults.xml + /home/oracle/bin/ords.sh stop rm ~/bin/x.sh /tmp/zzz + cp /tmp/1/runtime9090ORDS.properties ~oracle + cp /tmp/1/uninstall9090ORDS.properties ~oracle + if test -f /tmp/1/demos.zip + then + cp /tmp/1/9090init /tmp/1/9090start /tmp/1/9090stop ~/bin + chmod 755 ~/bin/9090init ~/bin/9090start ~/bin/9090stop + fi + /home/oracle/bin/ords.sh start + cd ~/ords + + echo '#!/usr/bin/expect +exp_internal 1 +set timeout 1200 +spawn $JAVA_HOME/bin/java -jar ords.war user HRREST "SQL Developer" +expect -regexp "Enter a password for user HRREST." { send "oracle\r" } +expect -regexp "Confirm password for user HRREST." {send "oracle\r"} +expect -regexp "Something that will never happen to force keep searching until process end" {send "neverhappen\r"} +interact'| sed 'sZ$JAVA_HOMEZ'"$JAVA_HOME"'Zg' > ~/bin/xp.sh +chmod 755 ~/bin/xp.sh +~/bin/xp.sh +rm ~/bin/xp.sh +cd - + /home/oracle/bin/ords.sh stop else ~oracle/buildTimeReportSkippingFile.sh ords.zip fi diff --git a/upload/3_8setupDemos_inner.sh b/upload/3_8setupDemos_inner.sh index fa5e67a..4af0286 100755 --- a/upload/3_8setupDemos_inner.sh +++ b/upload/3_8setupDemos_inner.sh @@ -170,7 +170,7 @@ for f in rest_sqldev reset_xmldb reset_soup reset_apex reset_json reset_rest res do if test -f "$f" then - sed -i '1sZ^Zexport LD_LIBRARY_PATH=/u01/app/oracle/product/12.2/db_1/lib\ + sed -i '1sZ^Zexport LD_LIBRARY_PATH=/u01/app/oracle/product/version/db_1/lib\ Zg' $f printf "\necho 'alter user hr identified by oracle account unlock;'|sqlplus system/oracle@localhost:1521/orcl\necho 'create or replace trigger EMPLOYEES_EMPLOYEE_ID_TRG before insert on employees @@ -191,7 +191,6 @@ done # for f in reset_sqldev reset_soup reset_apex; do bash -x ./$f >$f.debuglog 2>&1 ; done #fi -ed -s ~/Desktop/'Click here to Start.desktop' <<< $',s/Click here to Start/Click here to Start Labs/g\nw' echo MARK_END 1690 end use git then reset all demos _including apex_. else ~oracle/buildTimeReportSkippingFile.sh "demos.zip - internal test run," diff --git a/upload/3topLevel_inner.sh b/upload/3topLevel_inner.sh index 53e2e2e..5ef057c 100755 --- a/upload/3topLevel_inner.sh +++ b/upload/3topLevel_inner.sh @@ -27,19 +27,19 @@ . ~oracle/runTimeStartScript.sh #set -x -echo 'changes after this one will be for 12.2' +echo 'changes after this one will be for version' printf '1,$ s/#Storage=auto/Storage=volatile/g\n.\nw\nq'| ed /etc/systemd/journald.conf -chmod 755 /home/oracle -#move symbolic link from under me - work or fail fast - -mkdir /u01/userhome -chmod 755 /u01/userhome - -cp -Rp /home/* /u01/userhome -chmod 755 /u01/userhome/* -rm -rf /home - -ln -s /u01/userhome /home +#moved from here to 1 updateLinux_inner - as all sorts of gnome processes get in the way when making the move +#chmod 755 /home/oracle +##move symbolic link from under me - work or fail fast +#mkdir /u01/userhome +#chmod 755 /u01/userhome +#cp -Rp /home/* /u01/userhome +#chmod 755 /u01/userhome/* +##sometimes fails (10% of builds) if process running +#ps -ef | grep oracle +#rm -rf /home +#ln -s /u01/userhome /home #just moved stuff around make sure we are in a real directory cd /tmp @@ -80,9 +80,10 @@ bash -x /tmp/1/buildTimeRootU01Chown.sh #install hr minimum scripts - in demos.zip but need to be gauranteed to be there su oracle -c 'mkdir ~/ReBuildScriptSQLDev_HR && cp /tmp/1/hr_* ~/ReBuildScriptSQLDev_HR' su oracle -c '/bin/bash -lc /tmp/1/3_2installDatabase.sh' -bash /u01/installervb/orainstRoot.sh -bash /u01/app/oracle/product/12.2/db_1/root.sh -cat /u01/app/oracle/product/12.2/db_1/install/root_vbgeneric_*.log +#bash /u01/installervb/orainstRoot.sh +bash /u01/app/oraInventory/orainstRoot.sh +bash /u01/app/oracle/product/version/db_1/root.sh +#cat /u01/app/oracle/product/12.2/db_1/install/root_vbgeneric_*.log su oracle -c '/bin/bash -lc /tmp/1/buildTimeCallDBCA.sh' cp /tmp/1/runTimeOracleOnReboot.sh /etc/init.d/oracle chmod 755 /etc/init.d/oracle @@ -103,7 +104,7 @@ su oracle -c '/bin/bash -lc /tmp/1/3_3passwordDoNotExpire.sh' su oracle -c '/bin/bash -lc /tmp/1/3_5unzipLabDemos.sh' su oracle -c '/bin/bash -lxc /tmp/1/3_6apexInstall.sh' su oracle -c '/bin/bash -lxc /tmp/1/3_7ORDSInstall.sh' - su oracle -c '/bin/bash -lxc /tmp/1/buildTimeSetupRestClient.sh' + #do this in database client set up 3_1installDbtoolClientTools_inner.sh su oracle -c '/bin/bash -lxc /tmp/1/buildTimeSetupRestClient.sh' /etc/init.d/oracle stop su - oracle -c 'cp /tmp/1/nuketimestamps ~oracle/bin/nuketimestamps' @@ -201,6 +202,14 @@ echo 'firefox & sleep 10 kill -15 %1 exit' | bash & +export LD_LIBRARY_PATH= +#cd ~/DESKTOP +#dbus-launch gio set "Rest Client.desktop" "metadata::trusted" yes +#dbus-launch gio set "SQL Developer.desktop" "metadata::trusted" yes +#dbus-launch gio set "Oracle-datamodeler.desktop" "metadata::trusted" yes +#dbus-launch gio set "Click here to Start.desktop" "metadata::trusted" yes +#dbus-launch gio set "sql.desktop" "metadata::trusted" yes +#this stopped working copying it to on gnome login dbus-launch gsettings set org.gnome.desktop.session idle-delay 0 dbus-launch gsettings set org.gnome.desktop.screensaver lock-enabled false dbus-launch gsettings set org.gnome.desktop.background picture-uri '' @@ -210,7 +219,7 @@ chmod 755 /tmp/asoracle su - oracle -c '/bin/bash -xc /tmp/asoracle' rm /tmp/asoracle -export ORACLE_HOME=/u01/app/oracle/product/12.2/db_1 +export ORACLE_HOME=/u01/app/oracle/product/version/db_1 #force firefox initial state for jsonview. hacky. echo "bash /tmp/1/buildTimeCheckVersion.sh before_remove " > /tmp/asoracle @@ -228,7 +237,7 @@ then fi #assumption we are always going to install a 'new' sqldeveloper so remoive as shipped one -rm -rf $ORACLE_HOME/sodapatch $ORACLE_HOME/sqldeveloper $ORACLE_HOME/apexpatch $ORACLE_HOME/assistants /u01/app/OraInventory /u01/app/oracle/product/12.2/db_1/p6880880_121010_Linux-x86-64.zip /u01/stagevb +rm -rf $ORACLE_HOME/sodapatch $ORACLE_HOME/sqldeveloper $ORACLE_HOME/apexpatch $ORACLE_HOME/assistants /u01/app/OraInventory /u01/app/oracle/product/version/db_1/p6880880_121010_Linux-x86-64.zip /u01/stagevb echo "bash /tmp/1/buildTimeCheckVersion.sh after_remove " > /tmp/asoracle @@ -312,7 +321,14 @@ rm -rf $ORACLE_HOME/javavm/jdk/jdk7 rm -rf ~oracle/apex/builder rm -rf $ORACLE_HOME/.patch_storage rm -rf $ORACLE_HOME/oc4j -rm -rf $ORACLE_HOME/bin/sql +if test -f /home/oracle/sqlcl/bin/sql +then + rm -rf $ORACLE_HOME/bin/sql +fi +if test -f /home/oracle/sqldeveloper/sqldeveloper.sh +then + rm -rf $ORACLE_HOME/bin/sqldeveloper.sh +fi rm -rf ~oracle/VBoxGuestAdditions.iso rm ~oracle/*.debuglog ~oracle/reset_xmldbjson.log rpm -e gnome-user-docs gnome-getting-started-docs @@ -320,10 +336,12 @@ rpm -e gnome-user-docs gnome-getting-started-docs yum -y clean all du -sh /var/tmp/yum-oracle-kPjjzB rm -rf /var/tmp/yum-oracle-kPjjzB - +rm /var/spool/abrt/*/coredump #bye bye maintainability... -du -sh /u01/app/oracle/product/12.2/db_1/inventory -rm -rf /u01/app/oracle/product/12.2/db_1/inventory/* +du -sh /u01/app/oracle/product/version/db_1/inventory +rm -rf /u01/app/oracle/product/version/db_1/inventory/* +#remove extra 900 meg non essential directories and zips - note static library files not removed for now. +rm -rf $ORACLE_HOME/suptools/* $ORACLE_HOME/OPatch/* 20M $ORACLE_HOME/lib/ra_windows64.zip $ORACLE_HOME/lib/ra_solaris_x64.zip $ORACLE_HOME/lib/ra_aix_ppc64.zip $ORACLE_HOME/lib/ra_zlinux64.zip $ORACLE_HOME/lib/ra_solaris_sparc64.zip $ORACLE_HOME/lib/ra_hpux_ia64.zip $ORACLE_HOME/md/property_graph/pgx/server/pgx-webapp-2.5.1-wls.war $ORACLE_HOME/md/property_graph/pgx/server/pgx-webapp-2.5.1.war if test "m$BUILD_WEB_PROXY" != "m" then printf "2d\nw\nq"|ed /etc/yum.conf @@ -365,7 +383,42 @@ cd /home/oracle #export DISPLAY=$OLDDISPLAY #/usr/bin/vncserver -kill :70 #rm -rf ~/.vnc - +echo ' +echo do this a second time the first time did not take maybe images etc not in place restclient was OK. +export LD_LIBRARY_PATH= +cd ~/Desktop +echo default zoom level seemed also to be reset around here +dbus-launch gsettings set org.gnome.nautilus.icon-view default-zoom-level small +dbus-launch gio set "Rest Client.desktop" "metadata::trusted" yes +dbus-launch gio set "SQL Developer.desktop" "metadata::trusted" yes +dbus-launch gio set "Oracle-datamodeler.desktop" "metadata::trusted" yes +dbus-launch gio set "Click here to Start.desktop" "metadata::trusted" yes +dbus-launch gio set "sql.desktop" "metadata::trusted" yes +' > /tmp/icons.sh +su - oracle -c '/bin/bash /tmp/icons.sh' +echo "#!/bin/bash +#horrible place to put it 3rd try at setting metadata trusted now on every gnome login +cd ~/Desktop +export LD_LIBRARY_PATH= +gio set 'Rest Client.desktop' 'metadata::trusted' yes +gio set 'SQL Developer.desktop' 'metadata::trusted' yes +gio set 'Oracle-datamodeler.desktop' 'metadata::trusted' yes +gio set 'Click here to Start.desktop' 'metadata::trusted' yes +gio set 'sql.desktop' 'metadata::trusted' yes +gsettings set org.gnome.desktop.session idle-delay 0 +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.background picture-uri '' +gsettings set org.gnome.desktop.background primary-color '#000000' +cd - +#have to put in applications directly or screen wonkey mv ~/Desktop/*.desktop ~/.local/share/applications/ +. /home/oracle/runTimeEnforceMinScreenSize.sh +if test -f /home/oracle/runTimeEnforceMinScreenSize.sh.alt +then +mv /home/oracle/runTimeEnforceMinScreenSize.sh.alt /home/oracle/runTimeEnforceMinScreenSize.sh +chmod 755 /home/oracle/runTimeEnforceMinScreenSize.sh +fi">/home/oracle/setsizewrap.sh +chmod 755 /home/oracle/setsizewrap.sh +chown oracle /home/oracle/setsizewrap.sh echo '#!/bin/bash mkdir -p ~/.config/autostart echo "[Desktop Entry] @@ -377,15 +430,8 @@ Terminal=false Type=Application X-GNOME-Autostart-enabled=true"> ~/.config/autostart/800x600.desktop chmod 755 ~/.config/autostart/800x600.desktop -echo "#!/bin/bash -. /home/oracle/runTimeEnforceMinScreenSize.sh -if test -f /home/oracle/runTimeEnforceMinScreenSize.sh.alt -then -mv /home/oracle/runTimeEnforceMinScreenSize.sh.alt /home/oracle/runTimeEnforceMinScreenSize.sh -chmod 755 /home/oracle/runTimeEnforceMinScreenSize.sh -fi">/home/oracle/setsizewrap.sh -chmod 755 /home/oracle/setsizewrap.sh cd ~/Desktop +cp readme.txt readmeCopy.txt history -c history -w '> /tmp/asoracle diff --git a/upload/9090start b/upload/9090start index 00471a0..0639c0d 100755 --- a/upload/9090start +++ b/upload/9090start @@ -1,2 +1,20 @@ #!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +################################################################################# + sh /home/oracle/Desktop/Database_Track/ORDS/reset_ords.sh start diff --git a/upload/9090stop b/upload/9090stop index ed67a35..4bf54e0 100755 --- a/upload/9090stop +++ b/upload/9090stop @@ -1,2 +1,19 @@ #!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +################################################################################# sh /home/oracle/Desktop/Database_Track/ORDS/reset_ords.sh stop diff --git a/upload/buildTime32kVarchar2.sh b/upload/buildTime32kVarchar2.sh index 286c903..0aca8db 100755 --- a/upload/buildTime32kVarchar2.sh +++ b/upload/buildTime32kVarchar2.sh @@ -50,7 +50,7 @@ set timeout 1200 spawn $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS -d $ORACLE_HOME/rdbms/admin -l "/home/oracle/utl32k_cdb_pdbs_output" -b utl32k_cdb_pdbs_output utl32k.sql expect -regexp "Enter Password.." { send "oracle\r" } expect -regexp "something the WiLl Never Happen" {send "jingle bella\r"} -interact'| sed 'sZ$ORACLE_HOMEZ'"/u01/app/oracle/product/12.2/db_1"'Zg' > ~/bin/xp.sh +interact'| sed 'sZ$ORACLE_HOMEZ'"/u01/app/oracle/product/version/db_1"'Zg' > ~/bin/xp.sh chmod 755 ~/bin/xp.sh ~/bin/xp.sh @@ -76,7 +76,7 @@ set timeout 2000 spawn $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS -d $ORACLE_HOME/rdbms/admin -l "/home/oracle/utlrp_cdb_pdbs_output" -b utlrp_cdb_pdbs_output utlrp.sql expect -regexp "Enter Password.." { send "oracle\r" } expect -regexp "something the WiLl Never Happen" {send "jingle bella\r"} -interact' | sed 'sZ$ORACLE_HOMEZ'"/u01/app/oracle/product/12.2/db_1"'Zg' > ~/bin/xp.sh +interact' | sed 'sZ$ORACLE_HOMEZ'"/u01/app/oracle/product/version/db_1"'Zg' > ~/bin/xp.sh chmod 755 ~/bin/xp.sh ~/bin/xp.sh diff --git a/upload/buildTimeCallDBCA.sh b/upload/buildTimeCallDBCA.sh index 6679747..e20e745 100755 --- a/upload/buildTimeCallDBCA.sh +++ b/upload/buildTimeCallDBCA.sh @@ -28,16 +28,22 @@ #cd /u01 #rm -rf /u01/stagevb #bash -lc 'netca -silent -responseFile /tmp/1/netca.rsp' -export ORACLE_HOME=/u01/app/oracle/product/12.2/db_1 +export ORACLE_HOME=/u01/app/oracle/product/version/db_1 +bash -lc 'dbca -silent -createDatabase -responseFile /tmp/1/buildTimeDBCA.rsp; if test "m$?" != "m0" +then +echo error on dbca +tail -100 /u01/app/oracle/cfgtoollogs/dbca/orclcdb/orclcdb.log +fi' +bash -lc 'lsnrctl stop' #nice to have set up hostname and default database ala XE mkdir -p $ORACLE_HOME/network/admin echo 'NAME.DIRECTORY_PATH= {TNSNAMES, EZCONNECT, HOSTNAME}'> $ORACLE_HOME/network/admin/sqlnet.ora echo 'SID_LIST_LISTENER = (SID_LIST = (SID_DESC = - (GLOBAL_DBNAME = orcl12c) - (SID_NAME = orcl12c) - (ORACLE_HOME = /u01/app/oracle/product/12.2/db_1) + (GLOBAL_DBNAME = orclcdb) + (SID_NAME = orclcdb) + (ORACLE_HOME = /u01/app/oracle/product/version/db_1) ) ) @@ -50,12 +56,12 @@ LISTENER = ) #HOSTNAME by pluggable not working rstriction or configuration error. -DEFAULT_SERVICE_LISTENER = (orcl12c) +DEFAULT_SERVICE_LISTENER = (orclcdb) '> $ORACLE_HOME/network/admin/listener.ora -echo 'ORCL12C=localhost:1521/orcl12c'>> /u01/app/oracle/product/12.2/db_1/network/admin/tnsnames.ora +echo 'ORCLCDB=localhost:1521/orclcdb'>> /u01/app/oracle/product/version/db_1/network/admin/tnsnames.ora echo 'ORCL= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) @@ -63,11 +69,10 @@ echo 'ORCL= (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) - )'>> /u01/app/oracle/product/12.2/db_1/network/admin/tnsnames.ora + )'>> /u01/app/oracle/product/version/db_1/network/admin/tnsnames.ora + bash -lc 'lsnrctl start' -bash -lc 'dbca -silent -createDatabase -responseFile /tmp/1/buildTimeDBCA.rsp; if test "m$?" != "m0" -then -echo error on dbca -tail -100 /u01/app/oracle/cfgtoollogs/dbca/orcl12c/orcl12c.log -fi' +echo 'export TWO_TASK=;echo alter system register ";" |sqlplus sys/oracle as sysdba' > /tmp/12 +chmod 755 /tmp/12 +bash -lc '/tmp/12' diff --git a/upload/buildTimeCompressHelper.sh b/upload/buildTimeCompressHelper.sh index b4af690..2e34123 100755 --- a/upload/buildTimeCompressHelper.sh +++ b/upload/buildTimeCompressHelper.sh @@ -102,7 +102,7 @@ EOF export TWO_TASK= sqlplus -s / as sysdba < specified in GDBNAME # Mandatory : No #----------------------------------------------------------------------------- -sid=orcl12c +sid=orclcdb #----------------------------------------------------------------------------- # Name : databaseConfigType @@ -79,7 +80,7 @@ databaseConfigType=SI # Name : RACOneNodeServiceName # Datatype : String # Description : Service is required by application to connect to RAC One -# Node Database +# Node Database # Valid values : Service Name # Default value : None # Mandatory : No [required in case DATABASECONFTYPE is set to RACONENODE ] @@ -90,7 +91,7 @@ RACOneNodeServiceName= # Name : policyManaged # Datatype : Boolean # Description : Set to true if Database is policy managed and -# set to false if Database is admin managed +# set to false if Database is admin managed # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No @@ -102,9 +103,9 @@ policyManaged=false # Name : createServerPool # Datatype : Boolean # Description : Set to true if new server pool need to be created for database -# if this option is specified then the newly created database -# will use this newly created serverpool. -# Multiple serverpoolname can not be specified for database +# if this option is specified then the newly created database +# will use this newly created serverpool. +# Multiple serverpoolname can not be specified for database # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No @@ -115,9 +116,9 @@ createServerPool=false # Name : serverPoolName # Datatype : String # Description : Only one serverpool name need to be specified -# if Create Server Pool option is specified. -# Comma-separated list of Serverpool names if db need to use -# multiple Server pool +# if Create Server Pool option is specified. +# Comma-separated list of Serverpool names if db need to use +# multiple Server pool # Valid values : ServerPool name # Default value : None @@ -140,10 +141,10 @@ cardinality= # Name : force # Datatype : Boolean # Description : Set to true if new server pool need to be created by force -# if this option is specified then the newly created serverpool -# will be assigned server even if no free servers are available. -# This may affect already running database. -# This flag can be specified for Admin managed as well as policy managed db. +# if this option is specified then the newly created serverpool +# will be assigned server even if no free servers are available. +# This may affect already running database. +# This flag can be specified for Admin managed as well as policy managed db. # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No @@ -154,9 +155,9 @@ force=false # Name : pqPoolName # Datatype : String # Description : Only one serverpool name needs to be specified -# if create server pool option is specified. -# Comma-separated list of serverpool names if use -# server pool. This is required to +# if create server pool option is specified. +# Comma-separated list of serverpool names if use +# server pool. This is required to # create Parallel Query (PQ) database. Applicable to Big Cluster # Valid values : Parallel Query (PQ) pool name # Default value : None @@ -244,7 +245,7 @@ nodelist= # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- -templateName=/u01/app/oracle/product/12.2/db_1/assistants/dbca/templates/General_Purpose.dbc +templateName=/u01/app/oracle/product/version/db_1/assistants/dbca/templates/General_Purpose.dbc #----------------------------------------------------------------------------- # Name : sysPassword @@ -264,7 +265,7 @@ sysPassword=oracle # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- -systemPassword=oracle +systemPassword=oracle #----------------------------------------------------------------------------- # Name : serviceUserPassword @@ -305,7 +306,7 @@ emExpressPort=5500 # Default value : FALSE # Mandatory : No #----------------------------------------------------------------------------- -runCVUChecks=false +runCVUChecks=FALSE #----------------------------------------------------------------------------- # Name : dbsnmpPassword @@ -524,7 +525,7 @@ dirServiceUserName= # Name : dirServicePassword # Datatype : String # Description : The password of the directory service user. -# You can also specify the password at the command prompt instead of here. +# You can also specify the password at the command prompt instead of here. # Mandatory : YES, if the value of registerWithDirService is TRUE #----------------------------------------------------------------------------- dirServicePassword= @@ -533,7 +534,7 @@ dirServicePassword= # Name : walletPassword # Datatype : String # Description : The password for wallet to created or modified. -# You can also specify the password at the command prompt instead of here. +# You can also specify the password at the command prompt instead of here. # Mandatory : YES, if the value of registerWithDirService is TRUE #----------------------------------------------------------------------------- walletPassword= @@ -542,8 +543,8 @@ walletPassword= # Name : listeners # Datatype : String # Description : Specifies list of listeners to register the database with. -# By default the database is configured for all the listeners specified in the -# $ORACLE_HOME/network/admin/listener.ora +# By default the database is configured for all the listeners specified in the +# $ORACLE_HOME/network/admin/listener.ora # Valid values : The list should be comma separated like "listener1,listener2". # Mandatory : NO #----------------------------------------------------------------------------- @@ -554,7 +555,7 @@ listeners= # Datatype : String # Description : Location of the file containing variable value pair # Valid values : A valid file-system file. The variable value pair format in this file -# is =. Each pair should be in a new line. +# is =. Each pair should be in a new line. # Default value : None # Mandatory : NO #----------------------------------------------------------------------------- @@ -567,7 +568,7 @@ variablesFile= # Default value : None # Mandatory : NO #----------------------------------------------------------------------------- -variables=DB_UNIQUE_NAME=orcl12c,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=orcl12c,ORACLE_HOME=/u01/app/oracle/product/12.2/db_1,SID=orcl12c +variables=ORACLE_BASE_HOME=/u01/app/oracle/product/version/db_1,DB_UNIQUE_NAME=orclcdb,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=orclcdb,ORACLE_HOME=/u01/app/oracle/product/version/db_1,SID=orclcdb #----------------------------------------------------------------------------- # Name : initParams @@ -576,7 +577,7 @@ variables=DB_UNIQUE_NAME=orcl12c,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=o # Default value : None # Mandatory : NO #----------------------------------------------------------------------------- -initParams=undo_tablespace=UNDOTBS1,processes=300,db_recovery_file_dest_size=5GB,nls_language=AMERICAN,pga_aggregate_target=200MB,sga_target=800MB,dispatchers=(PROTOCOL=TCP) (SERVICE=orcl12cXDB),db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME},db_block_size=8192BYTES,diagnostic_dest={ORACLE_BASE},audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,nls_territory=AMERICA,compatible=12.2.0,control_files=("{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl", "{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl"),db_name=orcl12c,audit_trail=db,remote_login_passwordfile=EXCLUSIVE,open_cursors=300 +initParams=undo_tablespace=UNDOTBS1,sga_target=800MB,db_block_size=8192BYTES,nls_language=AMERICAN,dispatchers=(PROTOCOL=TCP) (SERVICE=orclcdbXDB),diagnostic_dest={ORACLE_BASE},control_files=("{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl", "{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl"),remote_login_passwordfile=EXCLUSIVE,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=300,pga_aggregate_target=200MB,nls_territory=AMERICA,local_listener=LISTENER_ORCLCDB,db_recovery_file_dest_size=12918MB,open_cursors=300,compatible=18.0.0,db_name=orclcdb,db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME},audit_trail=db #----------------------------------------------------------------------------- # Name : sampleSchema diff --git a/upload/buildTimeFatReleaseCOPYFORFAT.sh b/upload/buildTimeFatReleaseCOPYFORFAT.sh index e2c4f3c..a2a1fa1 100644 --- a/upload/buildTimeFatReleaseCOPYFORFAT.sh +++ b/upload/buildTimeFatReleaseCOPYFORFAT.sh @@ -1,4 +1,22 @@ #!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +################################################################################# + . /home/oracle/.bashrc newpdbords 9090init diff --git a/upload/buildTimeMoveUserFilesInTmp.sh b/upload/buildTimeMoveUserFilesInTmp.sh index f015244..4166e24 100755 --- a/upload/buildTimeMoveUserFilesInTmp.sh +++ b/upload/buildTimeMoveUserFilesInTmp.sh @@ -30,12 +30,12 @@ export BUILD_HAVEPATCH=TRUE" > /tmp/1/BUILD_CONFIG.sh export USHOME=/tmp/put_files_here export BUILDHOME=$USHOME export EURHOME=$USHOME -export DATABASE1URL=$USHOME/linux*122*_database.zip +export DATABASE1URL=$USHOME/LINUX.X64_*_db_home.zip export DEMOSURL=$BUILDHOME/demos.zip export JAVAURL=$EURHOME/jdk-8u*-linux-x64.tar.gz export SQLDEVURL=$BUILDHOME/sqldeveloper-*-no-jre.zip -export SQLCLURL=$EURHOME/sqlcl-*-no-jre.zip -export APEXURL=$EURHOME/apex_5*.zip +export SQLCLURL=$EURHOME/sqlcl*.zip +export APEXURL=$EURHOME/apex_*.zip export ORDSURL=$EURHOME/ords*.zip export MODELLER=$EURHOME/datamodeler-*-no-jre.zip export MOZILLABLOB=$EURHOME/mozillablob.zip @@ -43,12 +43,14 @@ export RESTCLIENTUI=$EURHOME/restclient*.jar export STORM=$USHOME/storm.zip export RESETXMLDBJSON=$USHOME/reset_xmldbjson export SAMPLESCHEMAS=$USHOME/master.zip +export JDBCREST=$USHOME/oracle.dbtools.jdbcrest*.jar +export WALLET=$USHOME/cwallet.sso function download() { #echo OUTPUT $2 SOURCE $1 mv $1 "$2" if test "m$?" != "m0" then - if test "m$1" = "mlinux*122*_database.zip" + if test "m$1" = "mLINUX.X64_*_db_home.zip" then echo PROGRESS: XXXXXXXXXXXXXX mv for essential "$2" failed XXXXXXXXXXXX else @@ -58,8 +60,8 @@ function download() { fi } export -f download - -printf "$DATABASE1URL\n/tmp/1/linuxx64_122_database.zip\n$JAVAURL\n/tmp/1/jdk8x64.tar.gz\n$SQLDEVURL\n/tmp/1/sqldev.zip\n$SQLCLURL\n/tmp/1/sqlcl.zip\n$APEXURL\n/tmp/1/apex.zip\n$ORDSURL\n/tmp/1/ords.zip\n$DEMOSURL\n/tmp/1/demos.zip\n$MOZILLABLOB\n/tmp/1/mozillablob.zip\n$MODELLER\n/tmp/1/modeler.zip\n$RESTCLIENTUI\n/tmp/1/restclient.jar\n$STORM\n/tmp/1/storm.zip\n$RESETXMLDBJSON\n/tmp/1/reset_xmldbjson\n$SAMPLESCHEMAS\n/tmp/1/master.zip" | xargs -n2 -P3 bash -c 'download "$0" "$1"' +#linuxx64_122_database.zip +printf "$DATABASE1URL\n/tmp/1/LINUX.X64_180000_db_home.zip\n$JAVAURL\n/tmp/1/jdk8x64.tar.gz\n$SQLDEVURL\n/tmp/1/sqldev.zip\n$SQLCLURL\n/tmp/1/sqlcl.zip\n$APEXURL\n/tmp/1/apex.zip\n$ORDSURL\n/tmp/1/ords.zip\n$DEMOSURL\n/tmp/1/demos.zip\n$MOZILLABLOB\n/tmp/1/mozillablob.zip\n$MODELLER\n/tmp/1/modeler.zip\n$RESTCLIENTUI\n/tmp/1/restclient.jar\n$STORM\n/tmp/1/storm.zip\n$RESETXMLDBJSON\n/tmp/1/reset_xmldbjson\n$SAMPLESCHEMAS\n/tmp/1/master.zip\n$WALLET\n/tmp/1/cwallet.sso" | xargs -n2 -P3 bash -c 'download "$0" "$1"' if test "m$?" != "m0" then echo PROGRESS: XXXXXXXXXXXXXX parallel mv failed XXXXXXXXXXXXXX diff --git a/upload/buildTimeResizeIcon.sh b/upload/buildTimeResizeIcon.sh index ea8659b..6e73db7 100755 --- a/upload/buildTimeResizeIcon.sh +++ b/upload/buildTimeResizeIcon.sh @@ -58,6 +58,7 @@ doseveral() { fi done } +#echo 'echo iconsizesetup skupped as no longer on desktop>> ~oracle/setsize.log 2>&1' > ~/repeat.setsize echo '(gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::icon-scale "5.58333333333"&&gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "20,222" )>> ~oracle/setsize.log 2>&1' > ~/repeat.setsize #echo '(echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-scale "5.58333333333"&&gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::icon-scale "5.58333333333"&&echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "20,222" )>> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 @@ -69,6 +70,7 @@ export result=`echo "$result" | grep -e " connected [^(]" | sed -e "sX\([A-Z0-9a echo GREPRESULT="$result" >> ~oracle/setsize.log echo 'xrandr --output '"$result"' --mode 800x600 >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 +#echo 'echo size set skipped not on desktop >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize echo '(gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::icon-scale "5.58333333333"&&gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "20,222" )>> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 diff --git a/upload/buildTimeSetupRestClient.sh b/upload/buildTimeSetupRestClient.sh index 35f6d67..d6f85f4 100755 --- a/upload/buildTimeSetupRestClient.sh +++ b/upload/buildTimeSetupRestClient.sh @@ -43,6 +43,9 @@ Terminal=false Icon[en_US]=gnome-panel-launcher Name[en_US]=Rest Client Exec=/home/oracle/bin/buildTimeSetupRestClient.sh -Name=Rest Client'> ~/Desktop/'Rest Client.desktop' -chmod 755 ~/Desktop/'Rest Client.desktop' +Name=Rest Client'> /home/oracle/Desktop/'Rest Client.desktop' +chmod 755 /home/oracle/Desktop/'Rest Client.desktop' +export LD_LIBRARY_PATH= +cd ~/Desktop +dbus-launch gio set "Rest Client.desktop" "metadata::trusted" yes fi diff --git a/upload/buildTimeSoftwareInstall.rsp b/upload/buildTimeSoftwareInstall.rsp index 7773e12..a708878 100755 --- a/upload/buildTimeSoftwareInstall.rsp +++ b/upload/buildTimeSoftwareInstall.rsp @@ -22,9 +22,8 @@ # ################################################################################# - #################################################################### -## Copyright(c) Oracle Corporation 1998,2017. All rights reserved.## +## Copyright(c) Oracle Corporation 1998,2018. All rights reserved.## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## @@ -43,32 +42,27 @@ #------------------------------------------------------------------------------- # Do not change the following system generated value. #------------------------------------------------------------------------------- -oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0 +oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v18.0.0 #------------------------------------------------------------------------------- # Specify the installation option. # It can be one of the following: # - INSTALL_DB_SWONLY # - INSTALL_DB_AND_CONFIG -# - UPGRADE_DB #------------------------------------------------------------------------------- oracle.install.option=INSTALL_DB_SWONLY #------------------------------------------------------------------------------- # Specify the Unix group to be set for the inventory directory. #------------------------------------------------------------------------------- -UNIX_GROUP_NAME=dba +UNIX_GROUP_NAME=oinstall #------------------------------------------------------------------------------- # Specify the location which holds the inventory files. # This is an optional parameter if installing on # Windows based Operating System. #------------------------------------------------------------------------------- -INVENTORY_LOCATION=/u01/installervb -#------------------------------------------------------------------------------- -# Specify the complete path of the Oracle Home. -#------------------------------------------------------------------------------- -ORACLE_HOME=/u01/app/oracle/product/12.2/db_1 +INVENTORY_LOCATION=/u01/app/oraInventory #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Base. @@ -137,59 +131,16 @@ oracle.install.db.OSRACDBA_GROUP=dba # Grid Options # # # ############################################################################### -#------------------------------------------------------------------------------ -# Specify the type of Real Application Cluster Database -# -# - ADMIN_MANAGED: Admin-Managed -# - POLICY_MANAGED: Policy-Managed -# -# If left unspecified, default will be ADMIN_MANAGED -#------------------------------------------------------------------------------ -oracle.install.db.rac.configurationType= #------------------------------------------------------------------------------ -# Value is required only if RAC database type is ADMIN_MANAGED +# Value is required only if the specified install option is INSTALL_DB_SWONLY # # Specify the cluster node names selected during the installation. -# Leaving it blank will result in install on local server only (Single Instance) # # Example : oracle.install.db.CLUSTER_NODES=node1,node2 #------------------------------------------------------------------------------ oracle.install.db.CLUSTER_NODES= -#------------------------------------------------------------------------------ -# This variable is used to enable or disable RAC One Node install. -# -# - true : Value of RAC One Node service name is used. -# - false : Value of RAC One Node service name is not used. -# -# If left blank, it will be assumed to be false. -#------------------------------------------------------------------------------ -oracle.install.db.isRACOneInstall=false - -#------------------------------------------------------------------------------ -# Value is required only if oracle.install.db.isRACOneInstall is true. -# -# Specify the name for RAC One Node Service -#------------------------------------------------------------------------------ -oracle.install.db.racOneServiceName= - -#------------------------------------------------------------------------------ -# Value is required only if RAC database type is POLICY_MANAGED -# -# Specify a name for the new Server pool that will be configured -# Example : oracle.install.db.rac.serverpoolName=pool1 -#------------------------------------------------------------------------------ -oracle.install.db.rac.serverpoolName= - -#------------------------------------------------------------------------------ -# Value is required only if RAC database type is POLICY_MANAGED -# -# Specify a number as cardinality for the new Server pool that will be configured -# Example : oracle.install.db.rac.serverpoolCardinality=2 -#------------------------------------------------------------------------------ -oracle.install.db.rac.serverpoolCardinality=0 - ############################################################################### # # # Database Configuration Options # @@ -268,13 +219,13 @@ oracle.install.db.config.starterdb.installExampleSchemas=false ############################################################################### # # -# Passwords can be supplied for the following four schemas in the # -# starter database: # +# Passwords can be supplied for the following four schemas in the # +# starter database: # # SYS # # SYSTEM # # DBSNMP (used by Enterprise Manager) # # # -# Same password can be used for all accounts (not recommended) # +# Same password can be used for all accounts (not recommended) # # or different passwords for each account can be provided (recommended) # # # ############################################################################### @@ -340,8 +291,8 @@ oracle.install.db.config.starterdb.emAdminPassword= ############################################################################### # # -# SPECIFY RECOVERY OPTIONS # -# ------------------------------------ # +# SPECIFY RECOVERY OPTIONS # +# ------------------------------------ # # Recovery options for the database can be mentioned using the entries below # # # ############################################################################### @@ -388,75 +339,3 @@ oracle.install.db.config.asm.diskGroup= # Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE #------------------------------------------------------------------------------- oracle.install.db.config.asm.ASMSNMPPassword= - -#------------------------------------------------------------------------------ -# Specify the My Oracle Support Account Username. -# -# Example : MYORACLESUPPORT_USERNAME=abc@oracle.com -#------------------------------------------------------------------------------ -MYORACLESUPPORT_USERNAME= - -#------------------------------------------------------------------------------ -# Specify the My Oracle Support Account Username password. -# -# Example : MYORACLESUPPORT_PASSWORD=password -#------------------------------------------------------------------------------ -MYORACLESUPPORT_PASSWORD= - -#------------------------------------------------------------------------------ -# Specify whether to enable the user to set the password for -# My Oracle Support credentials. The value can be either true or false. -# If left blank it will be assumed to be false. -# -# Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true -#------------------------------------------------------------------------------ -SECURITY_UPDATES_VIA_MYORACLESUPPORT=false - -#------------------------------------------------------------------------------ -# Specify whether user doesn't want to configure Security Updates. -# The value for this variable should be true if you don't want to configure -# Security Updates, false otherwise. -# -# The value can be either true or false. If left blank it will be assumed -# to be true. -# -# Example : DECLINE_SECURITY_UPDATES=false -#------------------------------------------------------------------------------ -DECLINE_SECURITY_UPDATES=true - -#------------------------------------------------------------------------------ -# Specify the Proxy server name. Length should be greater than zero. -# -# Example : PROXY_HOST=proxy.domain.com -#------------------------------------------------------------------------------ -PROXY_HOST= - -#------------------------------------------------------------------------------ -# Specify the proxy port number. Should be Numeric and at least 2 chars. -# -# Example : PROXY_PORT=25 -#------------------------------------------------------------------------------ -PROXY_PORT= - -#------------------------------------------------------------------------------ -# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD -# blank if your proxy server requires no authentication. -# -# Example : PROXY_USER=username -#------------------------------------------------------------------------------ -PROXY_USER= - -#------------------------------------------------------------------------------ -# Specify the proxy password. Leave PROXY_USER and PROXY_PWD -# blank if your proxy server requires no authentication. -# -# Example : PROXY_PWD=password -#------------------------------------------------------------------------------ -PROXY_PWD= - -#------------------------------------------------------------------------------ -# Specify the Oracle Support Hub URL. -# -# Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/ -#------------------------------------------------------------------------------ -COLLECTOR_SUPPORTHUB_URL= diff --git a/upload/createnewpdb b/upload/createnewpdb index b08a073..b0b22e7 100755 --- a/upload/createnewpdb +++ b/upload/createnewpdb @@ -27,7 +27,7 @@ #set -x # VM SPECIFIC/ testing only/ not for production use -export BASESEED=/u01/app/oracle/oradata/orcl12c +export BASESEED=/u01/app/oracle/oradata/ORCLCDB export DEFAULTNEWPDBNAME=ORDS export CONNECT=/ export TNSNAMESFILE=$ORACLE_HOME/network/admin/tnsnames.ora diff --git a/upload/createnewpdbminhr b/upload/createnewpdbminhr index a4f3123..4d015cf 100755 --- a/upload/createnewpdbminhr +++ b/upload/createnewpdbminhr @@ -28,7 +28,7 @@ #set -x # VM SPECIFIC/ testing only/ not for production use -export BASESEED=/u01/app/oracle/oradata/orcl12c +export BASESEED=/u01/app/oracle/oradata/ORCLCDB export DEFAULTNEWPDBNAME=ORDS export CONNECT=/ export TNSNAMESFILE=$ORACLE_HOME/network/admin/tnsnames.ora diff --git a/upload/custom_postSetupDemos.sh b/upload/custom_postSetupDemos.sh index ff70f8a..90a214c 100644 --- a/upload/custom_postSetupDemos.sh +++ b/upload/custom_postSetupDemos.sh @@ -1,2 +1,27 @@ #!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +################################################################################# + +if test -f /tmp/1/loadCoffeeShopApplication.sh +then su oracle -c "bash -x /tmp/1/loadCoffeeShopApplication.sh" +fi +if test -f /tmp/1/buildTimeFatRelease.sh +then +su - oracle -c "bash -x /tmp/1/buildTimeFatRelease.sh" +fi diff --git a/upload/loadCoffeeShopApplication.sh b/upload/loadCoffeeShopApplication.sh index 5e3581c..9eefdaa 100644 --- a/upload/loadCoffeeShopApplication.sh +++ b/upload/loadCoffeeShopApplication.sh @@ -1,4 +1,22 @@ #!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +################################################################################# + echo 'export PATH=/home/oracle/Desktop/Database_Track/coffeeshop:$PATH'>> /home/oracle/.bashrc . /home/oracle/.bashrc . /tmp/1/BUILD_CONFIG.sh @@ -6,24 +24,55 @@ export http_proxy=$BUILD_WEB_PROXY export https_proxy=$BUILD_WEB_PROXY if test -f /tmp/1/coffeeshopApp.zip then - mv /tmp/1/coffeeshopApp.zip /home/oracle -#Put unzip at the top - wait at end of newpdbords will wait for both import and unzip - mv /home/oracle/bin/newpdbords /home/oracle/bin/newpdbords.x -#put on top - unzip - (echo '#!/bin/bash -if test -d /home/oracle/Desktop/Database_Track/coffeeshop + echo "mkdir -p /u01/userhome/oracle/sqldeveloper/ords/ords_config/ords/standalone/doc_root +if ! test -L /u01/userhome/oracle/sqldeveloper/ords/ords_config/ords/standalone/doc_root/coffeeshop-map then -echo coffeeshopApp already unzipped -else + ln -s /home/oracle/Desktop/Database_Track/coffeeshop/coffeeshop-target-web /u01/userhome/oracle/sqldeveloper/ords/ords_config/ords/standalone/doc_root/coffeeshop-map +fi +if ! test -L /u01/userhome/oracle/sqldeveloper/ords/ords_config/ords/standalone/doc_root/coffeeshop-start +then + ln -s /home/oracle/Desktop/Database_Track/coffeeshop/coffeeshop-start-web /u01/userhome/oracle/sqldeveloper/ords/ords_config/ords/standalone/doc_root/coffeeshop-start +fi +mkdir -p /u01/userhome/oracle/sqldeveloper/ords/hol-config/ords/standalone/doc_root +if ! test -L /u01/userhome/oracle/sqldeveloper/ords/hol-config/ords/standalone/doc_root/coffeeshop-map +then + ln -s /home/oracle/Desktop/Database_Track/coffeeshop/coffeeshop-target-web /u01/userhome/oracle/sqldeveloper/ords/hol-config/ords/standalone/doc_root/coffeeshop-map +fi +if ! test -L /u01/userhome/oracle/sqldeveloper/ords/hol-config/ords/standalone/doc_root/coffeeshop-start +then + ln -s /home/oracle/Desktop/Database_Track/coffeeshop/coffeeshop-start-web /u01/userhome/oracle/sqldeveloper/ords/hol-config/ords/standalone/doc_root/coffeeshop-start +fi +" > /home/oracle/bin/coffeeshop_install +echo '#!/bin/bash +rm -rf /home/oracle/Desktop/Database_Track/coffeeshop (mkdir /home/oracle/Desktop/Database_Track/coffeeshop -mv ~/coffeeshopApp.zip /home/oracle/Desktop/Database_Track/coffeeshop +cp ~/coffeeshopApp.zip /home/oracle/Desktop/Database_Track/coffeeshop cd /home/oracle/Desktop/Database_Track/coffeeshop echo unzipping coffeeshopApp unzip coffeeshopApp.zip > coffeeshopApp.zip.log$$ 2>&1 +rm coffeeshopApp.zip mv Workshop_Source_Only/* Workshop_Source_Only/.DS_Store . -chmod 755 install.sh) & -echo if unzip successful /home/oracle/Desktop/Database_Track/coffeeshop/coffeeshopApp.zip can be removed -fi' ; cat /home/oracle/bin/newpdbords.x) > /home/oracle/bin/newpdbords +chmod 755 install.sh +#have a way to do install later $1 = nothing - do install.sh noinstall = dont run install.sh +if test "m$1" = m +then +#drop existing user if it exists +echo "--do not want any coffeeshop user sessions +alter pluggable database ords close immediate; +alter pluggable database ords open; +drop user COFFEESHOP cascade; +exit"|sqlplus SYS/oracle@ORDS as sysdba > ./dropusersqlplusout$$ 2>&1 +#bring it back to initial ie _schema loaded if coffeeshop zip in buid state +./install.sh > install.sh$$ 2>&1 +fi) +' > /home/oracle/bin/coffeeshop_uninstall_install + mv /tmp/1/coffeeshopApp.zip /home/oracle +#Put unzip at the top - wait at end of newpdbords will wait for both import and unzip + mv /home/oracle/bin/newpdbords /home/oracle/bin/newpdbords.x +#put on top - unzip + (echo '#!/bin/bash +(bash /home/oracle/bin/coffeeshop_uninstall_install noinstall 2>&1) & +' ; cat /home/oracle/bin/newpdbords.x) > /home/oracle/bin/newpdbords rm /home/oracle/bin/newpdbords.x #put on bottom wait for unzip echo 'wait diff --git a/upload/runTimeEnforceMinScreenSize.sh b/upload/runTimeEnforceMinScreenSize.sh index 674097e..a98dca8 100755 --- a/upload/runTimeEnforceMinScreenSize.sh +++ b/upload/runTimeEnforceMinScreenSize.sh @@ -58,7 +58,8 @@ doseveral() { fi done } -echo 'echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "469,10" >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize +echo 'echo skipped >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize +#echo 'echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "469,10" >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 echo xrandr > ~/repeat.setsize doseveral x 500 7 @@ -67,7 +68,8 @@ export result=`echo "$result" | grep -e " connected [^(]" | sed -e "sX\([A-Z0-9a echo GREPRESULT="$result" >> ~oracle/setsize.log echo 'xrandr --output '"$result"' --mode 800x600 >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 -echo 'echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "469,10" >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize +echo 'echo skipped >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize +#echo 'echo gvfs-set-attribute ~/Desktop/"Click here to Start.desktop" metadata::nautilus-icon-position "469,10" >> ~oracle/setsize.log 2>&1' > ~/repeat.setsize doseveral x 50 7 if test -f ~/runTimeEnforceMinScreenSize.sh.redoicon @@ -84,8 +86,15 @@ echo '#!/bin/bash if test -f ~/Desktop/readme.txt then cat ~/Desktop/readme.txt +if test -f ~/ords/ords.war +then +if test -f ~/sqlcl/lib/jdbcrest.jar +then +echo 'try JDBC REST driver: sql HRREST/oracle@http://localhost:8080/ords/hrrest/' +fi +fi else - echo No default readme.txt - minium install is Oracle linux 7.3 and Oracle Database 12.2 + echo No default readme.txt - minium install is Oracle linux 7.3 and Oracle Database 18.3 fi cd ~ diff --git a/upload/runTimeOracleOnReboot.sh b/upload/runTimeOracleOnReboot.sh index 23e346b..64b6c99 100755 --- a/upload/runTimeOracleOnReboot.sh +++ b/upload/runTimeOracleOnReboot.sh @@ -30,12 +30,12 @@ # export ORACLE_BASE=/u01/app/oracle -export ORACLE_HOME=$ORACLE_BASE/product/12.2/db_1 +export ORACLE_HOME=$ORACLE_BASE/product/version/db_1 export ORACLE_HOME_LISTENER=$ORACLE_HOME export LD_LIBRARY_PATH=$ORACLE_HOME/lib #export JAVA_HOME=$ORACLE_HOME/jdk export PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin -export ORACLE_SID=orcl12c +export ORACLE_SID=orclcdb #export ORACLE_TRACE=Y export PATH=$JAVA_HOME/bin:$ORACLE_HOME/bin:$PATH @@ -58,27 +58,34 @@ case "$1" in if test -f /home/oracle/bin/ords.sh then su oracle -c "/home/oracle/bin/ords.sh start /home/oracle/ords/ords.war" + nohup su - oracle -c "/home/oracle/bin/9090start >> /tmp/9090startlog 2>&1" & fi ;; stop) - su oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" - su oracle -c "$ORACLE_HOME/bin/lsnrctl stop" if test -f /home/oracle/bin/ords.sh then su oracle -c "/home/oracle/bin/ords.sh stop /home/oracle/ords/ords.war" + nohup su - oracle -c "/home/oracle/bin/9090stop >> /tmp/9090stoplog 2>&1" & fi + su oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" + su oracle -c "$ORACLE_HOME/bin/lsnrctl stop" ;; restart|reload) + if test -f /home/oracle/bin/ords.sh + then + su oracle -c "/home/oracle/bin/ords.sh stop /home/oracle/ords/ords.war" + nohup su - oracle -c "/home/oracle/bin/9090stop >> /tmp/9090stoplog 2>&1" & + fi su oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" su oracle -c "$ORACLE_HOME/bin/lsnrctl stop" - su oracle -c "/home/oracle/bin/ords.sh stop /home/oracle/ords/ords.war" - su oracle -c "$ORACLE_HOME/bin/lsnrctl start" + su oracle -c "$ORACLE_HOME/bin/lsnrctl start" su oracle -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" su oracle -c "echo alter pluggable database all open';'|$ORACLE_HOME/bin/sqlplus / as sysdba" if test -f /home/oracle/bin/ords.sh then su oracle -c "/home/oracle/bin/ords.sh start /home/oracle/ords/ords.war" - fi + nohup su - oracle -c "/home/oracle/bin/9090start >> /tmp/9090startlog 2>&1" & + fi ;; status) $ORACLE_HOME/bin/lsnrctl status diff --git a/upload/runTimeParametersForORDS.properties b/upload/runTimeParametersForORDS.properties index a138471..23d60a7 100755 --- a/upload/runTimeParametersForORDS.properties +++ b/upload/runTimeParametersForORDS.properties @@ -32,7 +32,7 @@ schema.tablespace.default=SYSAUX schema.tablespace.temp=TEMP standalone.http.port=8080 standalone.mode=true -standalone.static.images=/home/oracle/apex/images +standalone.static.images=/u01/userhome/oracle/apex/images user.apex.listener.password=oracle user.apex.restpublic.password=oracle user.public.password=oracle diff --git a/upload/uploaddemos b/upload/uploaddemos index c8faa36..dbd2184 100755 --- a/upload/uploaddemos +++ b/upload/uploaddemos @@ -28,7 +28,7 @@ #set -x # VM SPECIFIC/ testing only/ not for production use export TWO_TASK= -export BASESEED=/u01/app/oracle/oradata/orcl12c +export BASESEED=/u01/app/oracle/oradata/ORCLCDB export DEFAULTNEWPDBNAME=ORCL export CONNECT=/ export TNSNAMESFILE=$ORACLE_HOME/network/admin/tnsnames.ora