OraOpenSource / OXAR

Oracle XE & APEX build script along with images for popular cloud platforms
http://www.oraopensource.com/oxar/
MIT License
108 stars 42 forks source link

Only expand swapspace if necessary #1

Open martindsouza opened 9 years ago

martindsouza commented 9 years ago

May provide some ideas on how: http://stackoverflow.com/questions/22407678/check-if-swap-space-exist-in-bash May also need to look at entire free memory issue.

GasparYYC commented 8 years ago

My opinion is that if the system has swap in place then skip the swap setup completely. Ideally this is optional and user defined location and size but probably too complicated for the value. My vote is to disable if the system has swap already since its not mandatory for xe.

martindsouza commented 8 years ago

@GasparYYC I agree with you but we're looking for the right command to detect both that saw is enabled and that it meets the minimum requirement. If not XE will fail to install.

GasparYYC commented 8 years ago

@martindsouza My mistake, I did not find SWAP as a requirement for xe but I looked at the Windows document and not the Linux. I agree, some logic needs to be in place for that work properly. As per installation guide: https://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#XEINL103

2.1.2 Swap Space Requirements Minimum swap space required for Oracle Database XE is 2 GB or twice the size of RAM, whichever is lesser.

zhudock commented 7 years ago

Interesting workaround for the swap issue in this Oracle XE dockerfile setup

https://github.com/pmdevel/oracle-xe/blob/master/Dockerfile#L13

  1. create backup of free command
  2. replace with script that always echos 2048
  3. execute the Oracle XE install
  4. restore the original free