From 2d7d5ffaea1910fbff4b00f72ecf824bbc77ca0f Mon Sep 17 00:00:00 2001 From: Jeremy Baumont Date: Mon, 16 Nov 2009 10:19:16 +0100 Subject: [PATCH] fix X display requirement for X connection The silent installer won't work without able to set up an X connection to a X server in order to load java classes used in the graphic GUI. Even if we won't use this GUI and do the silent installation from the command line. So DISPLAY environment variable is added with a working X server machine. Also a puppet file resource corresponding to the oracle installation location file oraInst.loc describing the oracle inventory directory is added. --- modules/oracle/manifests/database_server.pp | 15 +++++++++++++-- .../oracle/templates/bash_profile.oracle-template.erb | 4 +++- modules/oracle/templates/oraInst-template.erb | 3 +++ .../templates/wruninstaller_9.2.0.8-template.erb | 18 ++++++------------ 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 modules/oracle/templates/oraInst-template.erb rewrite modules/oracle/templates/wruninstaller_9.2.0.8-template.erb (95%) diff --git a/modules/oracle/manifests/database_server.pp b/modules/oracle/manifests/database_server.pp index 809955d..51e3597 100644 --- a/modules/oracle/manifests/database_server.pp +++ b/modules/oracle/manifests/database_server.pp @@ -54,11 +54,22 @@ class oracle::database_server::software { $disk3_9201_path = "${oracle_base_software}/${architecture}/9.2.0.1/disk3" $current_oracle_home = $oracle::database_server::directories::oracle_home_path $responsefile_path = "${disk1_9201_path}/response/enterprise.rsp" + $current_oracle_base = $oracle::database_server::directories::oracle_base_path + $orainventory_path = "$current_oracle_base/oraInventory" + + file { + "oraInst.loc": + name => "/var/opt/oracle/oraInst.loc", + content => template("oracle/oraInst-template.erb"), + mode => 0644, + owner => "oracle", + group => "oinstall", + } file{ "wruninstaller_${oracle_version}.sh": name => "${disk1_9201_path}/wruninstaller_${oracle_version}.sh", - content => template("wruninstaller_${oracle_version}-template.erb"), + content => template("oracle/wruninstaller_${oracle_version}-template.erb"), mode => 755, owner => "oracle", group => "oinstall", @@ -72,7 +83,7 @@ class oracle::database_server::software { creates => "/var/opt/oracle/${oracle_version}_installed", group => "oinstall", user => "oracle", - environment => ["DISPLAY=:0.0", "MAILTO=DL-ito.bs.dba@is.online.nl"], + environment => ["DISPLAY=p-reduck.euronet.nl:0.0", "MAILTO=DL-ito.bs.dba@is.online.nl"], logoutput => true, returns => [0,1], require => File ["wruninstaller_${oracle_version}.sh"], diff --git a/modules/oracle/templates/bash_profile.oracle-template.erb b/modules/oracle/templates/bash_profile.oracle-template.erb index 17050fa..a24996d 100644 --- a/modules/oracle/templates/bash_profile.oracle-template.erb +++ b/modules/oracle/templates/bash_profile.oracle-template.erb @@ -78,7 +78,9 @@ alias i='inforacle' inforacle # set up X display and term for screen -DISPLAY=:0.0 +# kind of magic here but the silent installer need +# to make an x connection in order to load oui java classes +DISPLAY=p-reduck.euronet.nl:0.0 TERM=vt220 export DISPLAY TERM diff --git a/modules/oracle/templates/oraInst-template.erb b/modules/oracle/templates/oraInst-template.erb new file mode 100644 index 0000000..1ac120f --- /dev/null +++ b/modules/oracle/templates/oraInst-template.erb @@ -0,0 +1,3 @@ +inventory_loc=<%= orainventory_path %> +inst_group=oinstall + diff --git a/modules/oracle/templates/wruninstaller_9.2.0.8-template.erb b/modules/oracle/templates/wruninstaller_9.2.0.8-template.erb dissimilarity index 95% index d596064..35a9bbd 100644 --- a/modules/oracle/templates/wruninstaller_9.2.0.8-template.erb +++ b/modules/oracle/templates/wruninstaller_9.2.0.8-template.erb @@ -1,12 +1,6 @@ -#!/usr/bin/bash - -EXPORT DISPLAY=:0.0 - -runInstaller -silent \ - -responseFile <%= responsefile_path %> \ - ORACLE_HOME="<%= current_oracle_home %>" \ - ORACLE_HOME_NAME="<%= oracle_patch_version %>" \ - UNIX_GROUP_NAME="oinstall" \ - LOCATION_FOR_DISK2="<%= disk2_9201_path %>" \ - LOCATION_FOR_DISK3="<%= disk3_9201_path %>" \ - s_cfgtyperet="Software Only" +#!/usr/bin/bash + + +echo " Running the oracle silent install ./runInstaller -silent -responseFile <%= responsefile_path %> ORACLE_HOME=\"<%= current_oracle_home %>\" ORACLE_HOME_NAME=\"<%= oracle_patch_version %>\" UNIX_GROUP_NAME=\"oinstall\" LOCATION_FOR_DISK2=\"<%= disk2_9201_path %>\" LOCATION_FOR_DISK3=\"<%= disk3_9201_path %>\" s_cfgtyperet=\"Software Only\" " + +./runInstaller -silent -responseFile <%= responsefile_path %> ORACLE_HOME="<%= current_oracle_home %>" ORACLE_HOME_NAME="<%= oracle_patch_version %>" UNIX_GROUP_NAME="oinstall" LOCATION_FOR_DISK2="<%= disk2_9201_path %>" LOCATION_FOR_DISK3="<%= disk3_9201_path %>" s_cfgtyperet="Software Only" -- 2.11.4.GIT