2. oracle database preinstallat,on requirements · recall that this file is about oracle homes of...

15
2. Oracle Database Preinstallat,on Requirements While installing database followed below document: Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux E24321-03 September 2011 Verifying UDP and TCP Kernel Parameters [oracle@laguna2 ~]$ cat /proc/sys/net/ipv4/ip_local_port_range 9000 65500 [oracle@laguna1 ~]$ cat /proc/sys/net/ipv4/ip_local_port_range 9000 65500 To determine if the oraInst.loc file exists, enter the following command: [oracle@laguna1 ~]$ more /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall [oracle@laguna2 ~]$ more /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall Check oinstall is primary group of oracle user: [oracle@laguna2 ~]$ id oracle uid=1101(oracle) gid=1000(oinstall) primary groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper) [oracle@laguna2 ~]$ exit [oracle@laguna1 ~]$ id oracle uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper) [oracle@laguna1 ~]$ --If not like above, specify the primary group using the -g option and any required secondary group using the -G option: /usr/sbin/usermod -g oinstall -G dba,asmdba[,oper] oracle Checking Resource Limits for the Oracle Software Installation Users -- Open file descriptors [oracle@laguna1 ~]$ ulimit -Sn 131072 above 1024 [oracle@laguna1 ~]$ ulimit -Hn 131072 above 65536

Upload: others

Post on 13-Mar-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

2. Oracle Database Preinstallat,on Requirements

While installing database followed below document:

Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux E24321-03 September 2011

Verifying UDP and TCP Kernel Parameters

[oracle@laguna2 ~]$ cat /proc/sys/net/ipv4/ip_local_port_range

9000 65500

[oracle@laguna1 ~]$ cat /proc/sys/net/ipv4/ip_local_port_range

9000 65500

To determine if the oraInst.loc file exists, enter the following command:

[oracle@laguna1 ~]$ more /etc/oraInst.loc

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

[oracle@laguna2 ~]$ more /etc/oraInst.loc

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

Check oinstall is primary group of oracle user:

[oracle@laguna2 ~]$ id oracle

uid=1101(oracle) gid=1000(oinstall) primary

groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper)

[oracle@laguna2 ~]$ exit

[oracle@laguna1 ~]$ id oracle

uid=1101(oracle) gid=1000(oinstall)

groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper)

[oracle@laguna1 ~]$

--If not like above, specify the primary group using the -g option and any required

secondary group using the -G option: /usr/sbin/usermod -g oinstall -G

dba,asmdba[,oper] oracle

Checking Resource Limits for the Oracle Software Installation Users

-- Open file descriptors

[oracle@laguna1 ~]$ ulimit -Sn

131072 above 1024

[oracle@laguna1 ~]$ ulimit -Hn

131072 above 65536

Page 2: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

[oracle@laguna2 ~]$ ulimit -Sn

131072

[oracle@laguna2 ~]$ ulimit -Hn

131072

-- Number of processes available

[oracle@laguna1 ~]$ ulimit -Su

16384 above 2047

[oracle@laguna1 ~]$ ulimit -Hu

32768 above 16384

[oracle@laguna1 ~]$

[oracle@laguna2 ~]$ ulimit -Su

16384

[oracle@laguna2 ~]$ ulimit -Hu

32768

[oracle@laguna2 ~]$

--Check other parameters according to installation document.

Identifying an Existing Oracle Base Directory

[oracle@laguna1 ~]$ cat /etc/oratab

#Backup file is /u01/app/11.2.0/grid/srvm/admin/oratab.bak.laguna1 line added by

Agent

#

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by either Database Configuration Assistant while creating

# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

# $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

+ASM1:/u01/app/11.2.0/grid:N # line added by Agent

[oracle@laguna1 ~]$

Recall that this file is about Oracle Homes of oracle instances used by oracle

utilities, on the other hand, oracle inventory file contains XML version of oracle

product home information used by OUI.

[oracle@laguna1 ~]$ cat /u01/app/oraInventory/oraInst.loc

inventory_loc=/u01/app/oraInventory

Page 3: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

inst_group=oinstall

-- check that oracle home exists and ownership is not oracle:oinstall

[root@laguna1:/u01/app/oracle/product/11.2.0/dbhome_1]# ls -ld

/u01/app/oracle/product/11.2.0/dbhome_1

drwxrwxr-x 2 oracle oinstall 4096 May 8 13:42

/u01/app/oracle/product/11.2.0/dbhome_1

[root@laguna2:/u01/app/oracle/product/11.2.0/dbhome_1]# ls -ld

/u01/app/oracle/product/11.2.0/dbhome_1

drwxrwxr-x 2 oracle oinstall 4096 May 8 13:49

/u01/app/oracle/product/11.2.0/dbhome_1

--If not exists issue following: mkdir –p /u01/app/oracle/product/11.2.0/dbhome_1

chown oracle:oinstall /u01/app/oracle –R

Configuring the oracle User’s Environment

--Run the following command on the remote system to check if the SHELL and the

DISPLAY environment variables are set correctly:

[oracle@laguna1 app]$ echo $SHELL

/bin/bash

[oracle@laguna1 app]$ echo $DISPLAY

10.200.20.147:0.0

-- Set ORACLE_BASE, ORACLE_SID, unset ORACLE_HOME and TNS_ADMIN:

[oracle@laguna1 app]$ ORACLE_BASE=/u01/app/oracle

[oracle@laguna1 app]$ ORACLE_SID=ANAHTAR

[oracle@laguna1 app]$ export ORACLE_BASE ORACLE_SID

[oracle@laguna1 app]$ unset ORACLE_HOME

[oracle@laguna1 app]$ unset TNS_ADMIN

[oracle@laguna1 app]$

Excerpt from installation guide:

If you plan to use Oracle Restart or Oracle

Automatic Storage Management (Oracle ASM), then you must install Oracle Grid

Infrastructure before you install and create the database.

Oracle Grid Infrastructure for

a standalone server is the software that includes Oracle Restart and Oracle ASM.

Oracle Restart improves the availability of your Oracle database by providing the

following:

When there is a hardware or a software failure, Oracle Restart automatically starts

all Oracle components, including the Oracle database instance, Oracle Net

Listener, database services, and Oracle ASM.

Oracle Restart starts components in the proper order when the database host is

restarted.

Oracle Restart runs periodic checks to monitor the status of Oracle components. If

a check operation fails for a component, then the component is shut down and

Page 4: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

restarted.

Oracle Restart is used in single-instance (nonclustered)

environments only.

Page 5: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 6: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 7: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 8: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 9: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 10: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 11: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 12: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file
Page 13: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

[oracle@laguna1 .ssh]$ tail -f /u01/app/oraInventory/logs/installActions2013-05-23_06-56-

15PM.log

INFO: Saving Cluster Inventory

INFO: InstallProgressMonitor: Starting phase 512

INFO: Saving Cluster Inventory

INFO: Saving Cluster Inventory

sNativeVolName:/u01/app/oraInventory/

m_asNodeArray:laguna1,laguna2

m_sLocalNode:laguna1

INFO: Running command '/tmp/OraInstall2013-05-23_06-56-

15PM/oui/bin/platform/linux64/runInstaller -jreLoc /tmp/OraInstall2013-05-23_06-56-

15PM/jdk/jre -paramFile /tmp/OraInstall2013-05-23_06-56-15PM/oui/clusterparam.ini -silent -

ignoreSysPrereqs -attachHome -noClusterEnabled

ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 ORACLE_HOME_NAME=OraDb11g_home1

CLUSTER_NODES=laguna1,laguna2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=laguna2 -

remoteInvocation -invokingNodeName laguna1 -logFilePath "/u01/app/oraInventory/logs" -

timestamp 2013-05-23_06-56-15PM' on the nodes 'laguna2'.

INFO: Invoking OUI on cluster nodes laguna2

INFO: /tmp/OraInstall2013-05-23_06-56-15PM/oui/bin/platform/linux64/runInstaller -jreLoc

/tmp/OraInstall2013-05-23_06-56-15PM/jdk/jre -paramFile /tmp/OraInstall2013-05-23_06-56-

15PM/oui/clusterparam.ini -silent -ignoreSysPrereqs -attachHome -noClusterEnabled

ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 ORACLE_HOME_NAME=OraDb11g_home1

CLUSTER_NODES=laguna1,laguna2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=laguna2 -

remoteInvocation -invokingNodeName laguna1 -logFilePath "/u01/app/oraInventory/logs" -

timestamp 2013-05-23_06-56-15PM

Page 14: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

[root@laguna1:~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@laguna1:~]#

[root@laguna2:~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

Page 15: 2. Oracle Database Preinstallat,on Requirements · Recall that this file is about Oracle Homes of oracle instances used by oracle utilities, on the other hand, oracle inventory file

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@laguna2:~]#

5. Oracle Database Postinstallation Tasks

[root@laguna2:~]# cp /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

/u01/orainst/root.sh-backup_DB_inst

[root@laguna1:~]# cp /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

/u01/orainst/root.sh-backup_DB_inst