{"id":151,"date":"2016-09-20T02:43:08","date_gmt":"2016-09-20T02:43:08","guid":{"rendered":"https:\/\/www.spotonoracle.com\/?p=151"},"modified":"2016-09-20T12:43:03","modified_gmt":"2016-09-20T12:43:03","slug":"sh-silent-installation","status":"publish","type":"post","link":"https:\/\/www.spotonoracle.com\/?p=151","title":{"rendered":"Sh! &#8211; silent installation"},"content":{"rendered":"<p>It&#8217;s been years since I last used a GUI to install Oracle software or create a database with DBCA. Sometimes it is baffling to see Word documents with dozens of screenshots showing how to setup Oracle at customer sites. In my opinion, showing the silent mode call (of OUI, DBCA, etc.) in the documentation is all you need. One single page, that&#8217;s it. OK, if you want to split hairs, the DBCA .dbt file is multiple pages in the appendix :-).<br \/>\nKnowing all this silent mode stuff will really make your life easier when it comes to automation. Think of Chef, Puppet, Ansible and what not. Even dockerized Oracle is now all the rage.<\/p>\n<p>In this post we start with the Oracle software installation.<\/p>\n<p>First we specify some environment variables to tell what and where to extract the Oracle software zips:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nexport ORA_SW_TMP=\/tmp\/oraswtmp                                # that is where the Oracle zip files will be extracted to\r\nexport ORA_ZIP_1=\/tmp\/p21419221_121020_Linux-x86-64_1of10.zip  # zip one of the Oracle database software\r\nexport ORA_ZIP_2=\/tmp\/p21419221_121020_Linux-x86-64_2of10.zip  # zip two of the Oracle database software\r\n<\/pre>\n<p>Then we specify some well known Oracle environment variables:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nexport ORACLE_HOSTNAME=$(hostname)\r\nexport ORACLE_BASE=\/u01\/app\/oracle\r\nexport ORACLE_HOME=${ORACLE_BASE}\/product\/ora12102\r\nexport INVENTORY_LOCATION=\/u01\/app\/oraInventory\r\n<\/pre>\n<p>Extracting the Oracle zips:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nmkdir ${ORA_SW_TMP}\r\nunzip ${ORA_ZIP_1} -d ${ORA_SW_TMP}\r\nunzip ${ORA_ZIP_2} -d ${ORA_SW_TMP}\r\n<\/pre>\n<p>Run the installer in silent mode:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\n${ORA_SW_TMP}\/database\/runInstaller -silent -waitforcompletion \\\r\n  oracle.install.option=INSTALL_DB_SWONLY \\\r\n  ORACLE_HOSTNAME=&quot;${ORACLE_HOSTNAME}&quot; \\\r\n  UNIX_GROUP_NAME=oinstall \\\r\n  INVENTORY_LOCATION=&quot;${INVENTORY_LOCATION}&quot; \\\r\n  SELECTED_LANGUAGES=en \\\r\n  ORACLE_HOME=&quot;${ORACLE_HOME}&quot; \\\r\n  ORACLE_BASE=&quot;${ORACLE_BASE}&quot; \\\r\n  oracle.install.db.InstallEdition=EE \\\r\n  oracle.install.db.DBA_GROUP=dba \\\r\n  oracle.install.db.OPER_GROUP=oper \\\r\n  oracle.install.db.BACKUPDBA_GROUP=backupdba \\\r\n  oracle.install.db.DGDBA_GROUP=dgdba \\\r\n  oracle.install.db.KMDBA_GROUP=kmdba \\\r\n  DECLINE_SECURITY_UPDATES=true\r\n<\/pre>\n<p>Run the Oracle root scripts:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nsudo ${INVENTORY_LOCATION}\/orainstRoot.sh\r\nsudo ${ORACLE_HOME}\/root.sh\r\n<\/pre>\n<p>Go grab a coffe.<br \/>\nThen, put that in a shell script and you&#8217;re all set.<\/p>\n<p>P.s. this also works on Windows, just with slighlty different parameters.<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nset ORACLE_HOSTNAME=%HOSTNAME%\r\nset ORACLE_BASE=D:\\app\\oracle\r\nset ORACLE_HOME=%ORACLE_BASE%\\product\\ora12102\r\nset INVENTORY_LOCATION=C:\\app\\oraInventory\r\nset ORA_HOME_USER=spotonoracle\\OracleSA$    # use Group Managed Service Account otherwise you also have to provide a password\r\n\r\n.\\setup.exe -silent -waitforcompletion ^\r\n  oracle.install.option=INSTALL_DB_SWONLY ^\r\n  ORACLE_HOSTNAME=&quot;%ORACLE_HOSTNAME%&quot; ^\r\n  INVENTORY_LOCATION=&quot;%INVENTORY_LOCATION%&quot; ^\r\n  SELECTED_LANGUAGES=en ^\r\n  ORACLE_HOME=&quot;%ORACLE_HOME%&quot; ^\r\n  ORACLE_BASE=&quot;%ORACLE_BASE%&quot; ^\r\n  oracle.install.db.InstallEdition=EE ^\r\n  oracle.install.IsBuiltInAccount=false ^\r\n  oracle.install.OracleHomeUserName=&quot;%ORA_HOME_USER%&quot; ^\r\n  DECLINE_SECURITY_UPDATES=true\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been years since I last used a GUI to install Oracle software or create a database with DBCA. Sometimes it is baffling to see Word documents with dozens of screenshots showing how to setup Oracle at customer sites. In my opinion, showing the silent mode call (of OUI, DBCA, etc.) in the documentation is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,14],"tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category-general","category-silent"],"_links":{"self":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=151"}],"version-history":[{"count":2,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}