How to install Oracle database on Linux using response file

  sonic0002        2017-06-03 04:15:49       7,616        0    

There are two ways to install Oracle database on Linux :1). Using GUI; 2). Using response file. In this post, the method for using response file will be introduced.

To install Oracle, please first get the Oracle database installation file ready. It can be downloaded from Oracle OTN. You need to have an Oracle account before you can download them.

And there are three major components of the Oracle database installation : 1). The installation itself; 2). The network configuration; 3). Database creation. Each of the component can be completed with a response file. There are sample response files in the Oracle installation directory. Usually at database/response folder. They can be edited before starting to install.

Below are the detailed steps for installing Oracle database.

1. OS configuration

  1. Login as root

  2. Add groups

    groupadd oinstall
    groupadd dba
    groupadd oper

  3. Add users
    useradd -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -m oracle

  4. Change user oracle password
    passwd oracle

  5. Update system config file  /etc/sysctl.conf

    kernel.shmmni = 4096
    kernel.shmmax = 4398046511104
    kernel.shmall = 1073741824
    kernel.sem = 250 32000 100 128

    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048586

  6. Apply the changes
    /sbin/sysctl -p

  7. Update shell limits in  /etc/security/limits.conf
    oracle   soft   nproc    131072
    oracle   hard   nproc    131072
    oracle   soft   nofile   131072
    oracle   hard   nofile   131072
    oracle   soft   core     unlimited
    oracle   hard   core     unlimited
    oracle   soft   memlock  50000000
    oracle   hard   memlock  50000000

  8. Add the host IP in the /etc/hosts

  9. Update /home/oracle/.bash_profile file, add below lines(CHANGE SOME VALUES ACCORDING TO YOUR NEED)

    export TMP=/tmp

    export ORACLE_HOSTNAME=some.host.com
    export ORACLE_UNQNAME=ORA
    export ORACLE_BASE=/ora/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
    export ORACLE_SID=ORA

    PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
    export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

    umask 022

  10. Check whether below packages are installed, if not, install missing ones. (Run below command to check, install missing ones as many as you can and then proceed)
    rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' \
    binutils \
    glibc \
    ksh \
    libaio \
    libstdc++33 \
    libstdc++43 \
    libstdc++-devel \
    make \
    libaio-devel \
    sysstat \
    glibc-devel \
    gcc \
    gcc-c++   

  11. Create database directory
     mkdir -p /ora/app/oracle/product/11.2.0/db_1
     chown oracle:oinstall -R /ora

2. Installing and configuring Oracle DB

      NOTE : ALL COMMANDS BELOW ARE RAN IN ORACLE ACCOUNT UNLESS EXPLICITLY MENTIONED

     1. Installing DB

  1. Change directory to the runInstaller locates and executes below command(Specify response file path correctly and update the response file accordingly)
    ./runInstaller -silent -ignorePrereq -responseFile /tmp/linux.x64_11gR2_database/database/response/enterprise-install.rsp
  2. The command will run at background and wait for a few minutes and it will print out the result on the shell
  3. If the command executes successfully, it would ask you to switch to root account and run two shell scripts. Complete that and the DB is installed

ENTRIES TO BE EDITED FOR THE RESPONSE FILE(PLEASE CHANGE THE VALUES ACCORDINGLY)
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=some.host.com
UNIX_GROUP_NAME=oinstall                                                                                                     l
INVENTORY_LOCATION=/ora/app/oracle/oraInventory                 
ORACLE_HOME=/ora/app/oracle/product/11.2.0/db_1                                                                 
ORACLE_BASE=/ora/app/oracle                                                                                                 
oracle.install.db.InstallEdition=EE
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=ORA.some.host.com
oracle.install.db.config.starterdb.SID=ORA                                                                                 
oracle.install.db.config.starterdb.password.ALL=passw0rd
oracle.install.db.config.starterdb.password.SYS=passw0rd
oracle.install.db.config.starterdb.password.SYSTEM=passw0rd
oracle.install.db.config.starterdb.password.SYSMAN=passw0rd
oracle.install.db.config.starterdb.password.DBSNMP=passw0rd
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

     2. Configure network listener for the DB

  1. Run below command on the shell console
    netca /silent /responsefile /tmp/linux.x64_11gR2_database/database/response/enterprise-netca.rsp

     3. Create database

  1. Run below command on the shell console
    dbca -silent -responseFile /tmp/linux.x64_11gR2_database/database/response/enterprise-dbca.rsp

ENTRIES TO BE EDITED FOR THE RESPONSE FILE(PLEASE CHANGE THE VALUES ACCORDINGLY)

In [CREATEDATABASE] section

GDBNAME = "ORA.some.host.com"                
SID = "ORA"
SYSPASSWORD = "passw0rd"            -- PASSWORD SPECIFIED WHEN INSTALLING ORACLE DB IN STEP #2
SYSTEMPASSWORD = "passw0rd"      -- PASSWORD SPECIFIED WHEN INSTALLING ORACLE DB IN STEP #2

Next you can login as oracle account and start to manage the Oracle database.

References

LINUX  HOW TO  ORACLE DATABASE 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

Best prefix for global variables