Silent Oracle 11g R2 install using only the command line

January 9, 2011  |  dba, linux

Tonight I’ll explain how easy is to install Oracle Software using command line with no need to get a VNC session or a GNOME/KDE environment.

Most of people use the OUI (Oracle Universal Installer) graphic interface to install oracle database software, but sometimes we need a small footprint server installation without installing all the garbage that usually everyone install to run a simple Oracle database.

If you have installed a slimmed down OS installation(or Centos or RHEL) either by only choosing the base components or by using a VM template (OVM or EC2), you can install Oracle software in 3 simple steps.

1. Add Oracle public yum repository.

[root@localhost ~]$ cd /etc/yum.repos.d
[root@localhost ~]$ wget http://public-yum.oracle.com/public-yum-el5.repo

# edit the file public-yum-el5.repo and enable both the [el5_u5_base] and the [ol5_u5_base] repositories in the yum configuration file by changing enable=0 to enable=1 in those sections

2. Install Oracle validated packages

[root@localhost ~]$ yum install oracle-validated

3. Download and Install Oracle software on command line

[root@localhost ~]$ su - oracle
[oracle@localhost ~]$ cd /software/11gr2/database
[oracle@localhost database]$ ./runInstaller -silent -force \
FROM_LOCATION=/software/11gr2/database/stage/products.xml \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/home/oracle/oraInventory \
ORACLE_HOME=/u01/app/oracle/product/11.2/db_1 \
ORACLE_HOME_NAME="OraDb11g_Home1" \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=SE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
DECLINE_SECURITY_UPDATES=true
[oracle@localhost database]$ exit
# As a root user, execute the following script(s):
[root@localhost ~]$ /home/oracle/oraInventory/orainstRoot.sh
[root@localhost ~]$ /u01/app/oracle/product/11.2/db_1/root.sh

So, go take a coffee now, and in 15 minutes or so, you get the message “Successfully Setup Software” and now you have clean ready Oracle Home installed. Remember, this is only the Oracle Software and not an Oracle Database. Later you can install an Oracle Database using DBCA or manually 🙂

Happy new year to all of you…


9 Comments


  1. Very Nice! I was thinking about doing a post but haven’t got around to it.

  2. Thank you for this.

    Just wanted to point out that the oracle-validated package will not create /etc/oraInst.loc, which at least in my case was required to make the installer work.

  3. after i run command: yum install oracle-validated
    it is success full

    but i didn’t see /software/11gr2/database on my machine

    sorry my english not good!

  4. Thank you, it really helped, just one thing that is not mentioned is, we need to create a rsp file from the template..

  5. i ran above all steps and getting below error. please help me to fix this.

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-01-24_10-55-42AM. Please wait …bash-3.00$ [WARNING] [INS-32008] Oracle base location is in the Home directory.
    CAUSE: The specified Oracle base was in the Home directory.
    ACTION: Provide an Oracle base location outside the Home directory.
    [FATAL] [INS-32035] Unable to create a new central inventory at the specified location.
    CAUSE: The central inventory location provided is not empty.
    ACTION: Please provide another location for the inventory, or clean up the current location.
    A log of this session is currently saved as: /tmp/OraInstall2012-01-24_10-55-42AM/installActions2012-01-24_10-55-42AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.

    • You have to manually create the /etc/oraInst.loc
      with this content
      inventory_loc=/home/oracle/oraInventory

      chown -R oracle:oinstall oraInst.loc
      chmod 777 /etc/oraInst.loc

  6. Pankaj Gupta

    Hi Daniel,

    Nice post….

    I am also getting same error

    Checking Temp space: must be greater than 120 MB. Actual 137213 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 8189 MB Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-05-04_12-51-53PM. Please wait …-bash-3.2$ [FATAL] [INS-32035] Unable to create a new central inventory at the specified location.
    CAUSE: The central inventory location provided is not empty.
    ACTION: Please provide another location for the inventory, or clean up the current location.
    A log of this session is currently saved as: /tmp/OraInstall2012-05-04_12-51-53PM/installActions2012-05-04_12-51-53PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.

    Also i tried yours suggestions, but still not working for me can you please help me ….

    -bash-3.2$ ls -ltr /etc/oraInst.loc
    -rwxrwxrwx 1 oracle oinstall 59 May 4 12:46 /etc/oraInst.loc
    -bash-3.2$ cat /etc/oraInst.loc
    nventory_loc=/home/oracle/oraInventory
    inst_group=oinstall

    Thanks
    Pankaj Gupta

    • I had the same issue with CentOS 6.4. I get around the issue by have /etc/oraInst.loc pointing to a different location then the “INVENTORY_LOCATION” parameter in the installation command.

Leave a Reply