Tuesday, 24 September 2013

Install Oracle 11gr3 silent on linux


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.

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

or
 Make manual changes to /etc/sysctl.conf
 

Refer <http://docs.oracle.com/cd/E11882_01/install.112/e22489/manpreins.htm#BABCHAED>for the Oracle Requirement and fix kernel parameters. oracle-rdbms-server-11gR2-preinstallwould take care of the changes, just double check and adjust it if necessary.

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.

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -c "Oracle Software Owner" -g oinstall -G dba -d /home/oracle oracle
 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 oracle:oinstall /u01/app/oracle
chmod 775 /u01/app



Configure User environment

As oracle user:

Update ~oracle/.bash_profile

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=HOST01.shilpa.com; 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
As root user:
Create the /etc/oraInst.loc as below and change the permission and ownership
inventory_loc=/u01/app/oraInventory
inst_group=oinstall


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


Prepare the response file: Oracle Software Only
The sample response file can be found under Oracle installation media“database/response ”

  • 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:


oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=HOST01.shilpa.com
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=falseoracle.install.db.config.starterdb.enableSecuritySettings=trueoracle.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=falseoracle.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=falseDECLINE_SECURITY_UPDATES=truePROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=


Run the Installer in Silent mode: Oracle Software Only

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

or

./runInstaller -silent -ignoreSysPrereqs -ignorePrereq -noconfig -force -responseFile /home/oracle/db_install.rsp -debug

Common Problems:

1> Xlib: No Protocol

[root@HOST01 logs]# echo $DISPLAY
:0.0
[root@HOST01 logs]# xauth list $DISPLAY
HOST01.shilpa.com/unix:0  MIT-MAGIC-COOKIE-1  13bce55c5549e0dfc6844a24b8ef546e
[oracle@HOST01 ~]$ xauth add HOST01.shilpa.com:0 . 13bce55c5549e0dfc6844a24b8ef546e
xauth:  creating new authority file /home/oracle/.Xauthority

~~~~~~~~~
[oracle@HOST01 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain HOST01.shilpa.com
::1             localhost6.localdomain6 localhost6
192.168.72.1 HOST01.shilpa.com

~~~~~~~~~
export DISPLAY=192.168.72.1:0.0

2> Exception in thread "main" java.lang.NoClassDefFoundError

--> Check if java is installed (if not installed: yum install *java* and yum install *jdk* and yum install *jar*)
--> Test for the env:

i)   which java
ii)  java -version
iii) JAVA_HOME =
  SET your JAVA_HOME to the location of your installed java and
iv)  export PATH=$JAVA_HOME/bin:$PATH
v) unset DISPLAY


3> If installation fails at email entry, please check the following two parameters in the response file as below:

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true



As a root user, execute root.sh

If faced the below error:

$ sqlplus / as sysdba
$ sqlplus: error while loading shared libraries: $ORACLE_HOME/lib/libnnz11.so: cannot restore segment prot after reloc: Permission denied


Its due to the SELINUX settings, which should have been initially disabled; But, never mind it can be fixed with the following command:

Commands, as root:
======================
getenforce (returns "Enforcing")
setenforce 0
getenforce (returns "Permissive")


 Further, check logging into sql prompt by the following command:
sqlplus / as sysdba

  Create the Listener
Create the $ORACLE_HOME/network/admin/listener.ora with below information:
LISTENER_oracledb1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = HOST01.shilpa.com)(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.



 

No comments:

Post a Comment