Sunday, February 3, 2013

0 Silent Install Oracle 11gR2

This article describe how to silent install the Oracle 11gR2.

  • Install  Oracle Linux on Virtual Box
  • Install Oracle preinstall package
  • Create software installation folder
  • Configure User environment
  • Create oraInst.loc file
  • Prepare the response file for install Oracle software only 
  • Create the Listener
  • Create database using DBCA
  • Configure Oracle database auto start after host reboot

Software

  • Oracle Linux 6.3
  • Virtual Box4.2.6
  • oracle-rdbms-server-11gR2-preinstall
  • Oracle 11gR2( 11.2.0.3)

Install Oracle Linux on Virtual Box

Refer here.

Install Oracle preinstall package

The oracle preinstall package used to be call ‘”Oracle Validate” in 10g. This package would also update the kernel parameter as Oracle suggest. Before it modify the parameter, it would backup the old one to the /etc/sysctl.conf.orabackup. For kernel parameter, you can refer here.

 yum install oracle-rdbms-server-11gR2-preinstall

Refer here for the Oracle Requirement and here for how to fix kernel parameters. oracle-rdbms-server-11gR2-preinstall would take care of the changes, just double check and adjust it if necessary.

image

Create Required Group and User

The oracle-rdbms-server-11gR2-preinstall would create oracle user, add oinstall and dba group. Also make the oracle user as part of member of the group.

image

We also need to reset the oracle user password.

passwd oracle

 

Create Software installation folders

  • /u01/app/oracle –> for $ORACLE_BASE for Oracle Database instance
  • /u01/app/oracle/product/11.2.0 –> for $ORACLE_HOME
mkdir -p /u01/app/oracle/product/11.2.0
chown -R oracle:oinstall /u01/app
chown –R /u01/app/oracle
chmod 775 /u01/app

image

Configure User environment

Update ~oracle/,bash_profile

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
 
ORACLE_HOSTNAME=panda1.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/11.2.0 export ORACLE_HOME

ORACLE_SID=oracledb1; export ORACLE_SID

ORACLE_UNQNAME=oracledb1; export ORACLE_UNQNAME

PATH=$ORACLE_HOME/bin:$PATH; export PATH

Creating the oraInst.loc File

Create the /etc/oraInst.loc as below and chage the permission  and ownership.

inventory_loc=/u01/app/oraInventory
inst_group=oinstall

image

chown oracle:oinstall oraInst.loc
chmod 664 oraInst.loc

 

Prepare the responds file: Oracle Software Only

The sample response file can be found under Oracle installation media “database/response ”

image

  • dbca.rsp : Silent install for the Oracle database ( for DBCA)
  • db_install.rsp: silent install for the Oracle Software.
  • netca.rsp: Silent install for Oracle Net Configuration Assistant

Here is the example of db_install.rsp.

Even many of the parameters are empty, but if we don’t include in the rsp file, we would get the error like:

image

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=panda2.localdomain
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0,oracle.oraolap:11.2.0.3.0,oracle.rdbms.dm:11.2.0.3.0,oracle.rdbms.dv:11.2.0.3.0,oracle.rdbms.lbac:11.2.0.3.0,oracle.rdbms.rat:11.2.0.3.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=WE8MSWIN1252
oracle.install.db.config.starterdb.memoryOption=
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=

 

 

 

./runInstaller -silent -responseFile /home/oracle/db_install.rsp 

image

 

image

image

Create the Listener

Create the $ORACLE_HOME/network/admin/listener.ora with below information

LISTENER_oracledb1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = panda1.localdomain)(PORT = 7001))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC7001))
    )
  )
 
ADR_BASE_LISTENER_oracledb1 = /u01/app/oracle
 

Then start the listener via

lsnrctl start LISTENER_ORACLEDB1

 

Alternatively, we can use netca to create the listener. Please refer here for more detail.

Create database with DBCA using responds file

Since I am using the named listener with non default port, I have to create the $ORACLE_HOME/network/admin/tnsname.ora

LISTENER_ORACLEDB1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = panda1.localdomain)(PORT = 7001))

 

Please refer here for how to use DBCA to create the Database.

Configure auto start Oracle after host reboot

Please refer here for more detail.

 

 

Reference

http://docs.oracle.com/cd/E11882_01/install.112/e16763/app_nonint.htm

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates