Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I installed the Oracle 11g2 'standard' edition using the following zip-files:

linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip

I used the installation guide by Oracle which I found quite tedious, e.g. you need to install/configure an X-Server because the default installer is a GUI which you have to 'babysit' for some time.

Is there a way to automate a default Oracle installation?

I mean something like a script where I can specify: tell me what yum/apt-packages are missing, here are my oracle-zip-install-files, install it under $MY_BASEDIR and for everything else use some sane defaults!

And no GUI.

I know that there is an express-edition which comes as an rpm - this looks convenient on the first glance, but it seems to exclude some stuff the 'standard' edition includes, e.g. Pro*C.

share|improve this question
1  
Did you search for "oracle silent install", that's what this type of thing is usually called. –  Mat May 23 '13 at 16:39

3 Answers 3

up vote 9 down vote accepted

Two solutions:

Install oracle manually the first time. Then zip all ORACLE_HOME and for future installation simply do:

  1. Unzip oracle_home into the new home
  2. Run $ORACLE_HOME/bin/relink all
  3. Run ./runInstaller -silent -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Oracle_Home_Name>"

Other solution (not my preferred but probably the preferred for mass deployment) is to create a response file. The sample is available in the installation dir: <11g Disk>/database/response/enterprise.rsp . Copy this file, edit it and replace default values with your ones (mainly the path, install type, etc). Then run:

./runInstaller -silent -responseFile myresponsefile.rsp

You can also install the DB manually the first time and record the response file witht he command:

./runInstaller -record -destinationFile myresponsefile.rsp

The first one is my preferred because you can easily install and patch the database with the last PSU available, then you have a consolidated installation can be moved around. Of course all systems must be already prepared with needed packages.

share|improve this answer
    
How to change the SID for the future installation for the 1st method. –  Debajyoti Das Jul 24 '13 at 7:19
1  
SID is a property of the database/instance and is separate from installation of the software. –  Colin 't Hart May 24 at 12:29

I faced this task as I had to provide some kind of simple “single click offline setup” for customers, intended to install Oracle11R2 DB on their (probably not connected to internet) Linux stations. The details of this "how to" is published at my blog http://www.oraclecommunity.net/profiles/blogs/how-to-make-automated-oracle-11gr2-installer-for-linux-centos-and If you have something to add or question, please comment

share|improve this answer
    
Hi eisen, thanks for posting this link, the blog post looks useful indeed. Please consider editing your answer here with a brief (maybe 4-5 bullet points) summary of the post? I think that'd really help... –  Jack Douglas May 24 at 20:29

I try to present here the brief summary of my previous answer, referenced to blog link http://www.oraclecommunity.net/profiles/blogs/how-to-make-automated-oracle-11gr2-installer-for-linux-centos-and as you advised.

Everyone, who tried to install Oracle DB on Linux – knows how many boring steps need to pass through. As result of my job I got a directory “orainst” with all need resources (files, scripts and directory with optionally needed RPMs) inside. All you need is to save it on DVD (or ISO) and use it on your target station. Just enter into “orainst” and run “./setup.sh”

The our goal – to build installation package, included all needed files and directories which need to successful Oracle setup in Linux station, disconnected from internet. First of all, we already have a great helper for our job. As Oracle installation process became more and more complex Oracle decided to lunch Oracle Preinstall RPM, with name of intended- to-install product contained into RPM’s name. In our case - oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm

The step-by-step instruction in blog describes in details how to prepare (optionally) the local yum repository for offline installation and how to fix Oracle Preinstall RPM if you don't want to deal with "kernel-uek", which is of course the Oracle Unbreakable Enterprise Kernel (also, optionally).

few words about installation script – “setup.sh”. It performs the following actions:

  1. Checks if hostname exists into /etc/hosts and exits with error message if not. I noticed, that installation fails un case of hostname is not presented into /etc/hosts file. May be, there is some other solution? I would like to get any other opinions

  2. Configure yum local repository , which contained all needed packages to be installed by oracle-rdbms-server-11gR2-preinstall rpm as part of preinstallation tasks. It also will clean this configuration after preinstall ended. If you intend to use regular yum configuration (say web repository) and not need this local repository, you can remove all yum-related statements from script.

  3. Run oracle-rdbms-server-11gR2-preinstall rpm, which do all difficult staff – configure OS kernel, install patches and packages and creates oracle user and group.
  4. Run Oracle installer. Oracle installer uses response file db-MYDB.rsp, which contained db installation parameters (in example supposed that SID chosen as “MYDB”).
  5. Run postinstall scripts as root user.
  6. Update /etc/oratab file and create “oracle” service for automated startup on boot (and with start/stop/monitor commands)

If someone tried to repeat my experience I would happy to get your comments.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.