Oracle 10g Installation on Oracle Enterprise Linux - 4

Oracle 10g on Oracle Enterprise Linux 4 This document prepared just for informative and learning purposes for beginners. This is based on a server installation with a minimum of 2G swap. #

root and $  oracle_user ;

SELINUX = disabled i.e secure Linux disabled. Oracle 10g Installation minimum Requirements Following Package and Groups should be Installed  X Window System  GNOME Desktop Environment  Editors  Graphical Internet  Text-based Internet  Server Configuration Tools  Development Tools  Administration Tools  System Tools  (sysstat) Should add the package 'sysstat' by clicking on the Details link and selecting "sysstat”. When installing linux all above package must be installed.

Alternative installations may require more packages to be loaded. Before installing just check what is in this file So before installing oracle , just check following command. # vi /etc/redhat-release or # cat /etc/issue Oracle Enterprise Linux is a distribution based on Redhat Enterprise Linux. Successful People in life seem to like LINUX
Page 1 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Check kernel version by running the command: # uname -r 2.6.9-42.0.0.0.1.ELsmp This kernel works fine with Oracle Database 10g Release 2 Commands to find ( Memory , Swap, temp)  To determine RAM size # grep MemTotal /proc/meminfo  To determine the size of the swap space, # grep SwapTotal /proc/meminfo  To determine the available RAM and swap space, # free  To determine the space available in the /tmp dir, # df -h /tmp , # df /tmp At least Minimum Hardware Requirements  Minimum 1 GB RAM (RECOMENDED).  Minimum 1.5 GB of Swap space.  Minimum 500 MB to 1000 MB disk space in the /tmp directory.  Minimum 2 - 4 GB disk space for the Oracle software Oracle Requirement for Swap space
RAM SIZE SWAP SPACE REQUIRED

Between 1 GB and 2 GB Between 2 GB and 8 GB More than 8 GB

Double size of the RAM Equal to the size of the RAM .75 times the size of the ram

Configuring the Linux Kernel Parameters To see all kernel parameters # sysctl -a , # sysctl -p Successful People in life seem to like LINUX

Page 2 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Oracle 10g Required Kernel Parameter Settings In this location "/etc/sysctl.conf" file kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.rmem_max=262144 net.core.wmem_default=262144 net.core.wmem_max=262144 Run the following command ; to set the current kernel parameters. /sbin/sysctl -p Increase the shell limits /etc/security/limits.conf * * * * soft nproc 2047 hard nproc 16384 soft nofile 1024 hard nofile 65536

Add the line below in “/etc/pam.d/login “ file: session required pam_limits.so Successful People in life seem to like LINUX

Page 3 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Installing Required Packages The Oracle Universal Installer (OUI) performs checks our machine during installation to verify that it meets the appropriate OS package requirements. We have to verify and install all packages (RPMs) required by Oracle Database 10g. An easier method is to run the # rpm -Uvh <PackageName >. If packages that already exist and are up to date, If package already installed , we will get warning message like “ package is already installed.” Required Packages for Oracle 10g R2 on the x86 (32-bit). Login as “root” user and execute package installation command on terminal. Check appropriate disc (more than one disc) to set required packages. # cd /media/cdrom/Enterprise/RPMS # rpm -Uvh setarch-1* # rpm -Uvh compat-libstdc++-33-3* # rpm -Uvh make-3* # rpm -Uvh glibc-2* # rpm -Uvh openmotif-2* # rpm -Uvh compat-db-4* # rpm -Uvh gcc-3* # rpm -Uvh libaio-0* # rpm -Uvh compat-gcc-32-3* # rpm -Uvh compat-gcc-32-c++3* It is possible to query each individual package to determine which ones are missing and need to be installed , Check the following command. Successful People in life seem to like LINUX
Page 4 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Checking whether all RPM's are installed or not rpm -qa | grep setarch-1* rpm -qa | grep compat-libstdc++-33-3* rpm -qa | grep make-3* rpm -qa | grep glibc-2* rpm -qa | grep openmotif-2* rpm -qa | grep compat-db-4* rpm -qa | grep gcc-3* rpm -qa | grep libaio-0* rpm -qa | grep compat-gcc-32-3* rpm -qa | grep compat-gcc-32-c++-3* Create the new groups for oracle user # groupadd oinstall # groupadd dba # groupadd oper  (optional) # useradd -g oinstall -G dba oracle # passwd oracle Create the directories , Oracle software will be installed. # mkdir -p /u01/app/oracle/product/10.2.0/db_1 # chown -R oracle.oinstall /u01 # chmod -R 775 /u01/app/oracle/ # xhost +  xhost is server access control program for X.  xhost + means is Access is granted to everyone. Successful People in life seem to like LINUX
Page 5 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
To set the environment variables for oracle user $ su - oracle $ vi .bash_profile # Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME ORACLE_SID=TSH1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbm s/jlib; export CLASSPATH #LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi Successful People in life seem to like LINUX
Page 6 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Run bash_profile as Oracle user $ . . bash_profile After saving .bash_profile file check it $ su - oracle $ echo $TMP $ echo $TMPDIR $ echo $ORACLE_HOSTNAME $ echo $ORACLE_BASE $ echo $ORACLE_HOME $ echo $ORACLE_SID $ echo $PATH Installing Oracle Database 10g on Linux Extract the 10201_database_linux32.zip. Unzip the zip file somewhere else where oracle user can access and begin installation as follows. # unzip 10201_database_linux32.zip -d /u01 $ su - oracle $ cd /u01/database Starting RunInstaller , Start the Oracle Universal Installer (OUI) by Issuing the following command in the database directory $ ./runInstaller Proceed with user friendly installation from rapiz wizard. Good Lock … We are not creating a ( database using Oracle installer), install software only. Successful People in life seem to like LINUX
Page 7 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Kernel Parameters for Oracle 10g ( Short Explanation) Setting File handles The setting for file handles denotes , the maximum number of open files on a Linux system. Oracle recommends that the file handles for the entire system is set to at least 65536 for x86 (32 bit platform). To determine the maximum no of file handles for the entire system , execute; $ cat /proc/sys/fs/file-max. To determine the current usage of file handles, run; $ cat /proc/sys/fs/file-nr. The file -nr displays three parameters: Total allocated file handles Currently used file handles Maximum file handles that can be allocated IP Local Port Range Oracle recommends to set the local port range ip_local_port_range for outgoing messages to "1024 65000" which is needed for high-usage systems. To verify, # cat /proc/sys/net/ipv4/ip_local_port_range Shell Limits for oracle user To improve the performance of the software on Linux systems, Oracle recommends to increase the following shell limits for the oracle user: nofile = 65536 To verify, execute: ulimit -n nproc = 16384 To verify, execute: ulimit -u nofile denotes the maximum number of open file descriptors, and nproc denotes the maximum number of processes available to a single user. Successful People in life seem to like LINUX
Page 8 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
For (larger) production databases, should increase the shell limits to the Recommended by Oracle. To see all shell limits execute , ulimit -a Network Kernel settings Oracle uses UDP as the default protocol on Linux for inter-process communication ((IPC) - such as cache fusion buffer transfers between the instances - within RAC cluster). The receive buffers are used by TCP and UDP to hold received data until it is read by the application. The receive buffer cannot overflow because the peer is not allowed to send data beyond the buffer size. To determine the current buffer size (in bytes) of each of the IPC networking parameters. net.core.rmem_default=262144 Default setting in bytes of the socket receive buffer net.core.wmem_default=262144 Default setting in bytes of the socket send buffer net.core.rmem_max=262144 Maximum socket receive buffer size which may be set by using the SO_RCVBUF socket option net.core.wmem_max=262144 Maximum socket send buffer size which may be set by using the SO_SNDBUF socket option Changing these settings may be highly dependent on your system, network, and other applications. See Metalink Note:249213.1 and Note:265194.1 Successful People in life seem to like LINUX

Page 9 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Required Kernel Parameter Settings Determination of linux kernel parameters for oracle installation is not simply based on a formula, but set based on usage prediction, still oracle not published openly general formula. Lets us see how kernel parameters are affect our application. Kernel parameter value calculation may vary , so I am providing some information’s here , what I learnt how Kernel Parameters values calculated in 10g* Who wants to update Linux kernel parameters , must have (root #) authority. Shared Memory and Semaphores Shared memory and semaphores are two important resources for an Oracle instance on UNIX/LINUX.
SHARED MEMORY  shmall, shmmax, shmmni SEMAPHORES  semmsl, semmns, semopm, semmni

Parameters for Shared Memory  SHMALL : Controls maximum no of shared memory segments ,in pages.

 SHMMAX : Controls the maximum shared segment size , in bytes.  SHMMNI : Maximum number of shared memory segments, system wide. To verify Shared Memory Kernel Parameters  SHMALL To verify , execute : # cat /proc/sys/kernel/shmall

 SHMMAX To verify , execute : # cat /proc/sys/kernel/shmmax  SHMMNI To verify , execute : # cat /proc/sys/kernel/shmmni  SHMMIN To verify , execute : # ipcs -lm |grep "min seg size" To determine all Shared Memory limits, Run : $ ipcs -lm or $ ipcs -m -l Successful People in life seem to like LINUX

Page 10 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
$ ipcs -lm ------ Shared Memory Limits -------max number of segments = 4096 max seg size (kbytes) = 2097152 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1 Parameters for Semaphores  SEMMSL : Maximum number of semaphores per id  SEMMNS : Maximum number of semaphores, system wide.  SEMOPM : Maximum number of operations in one semop call.  SEMMNI : Number of semaphore identifiers (or arrays), system wide. Semaphore Parameters To verify, execute : # cat /proc/sys/kernel/sem 250 32000 32 128

These values represent SEMMSL, SEMMNS, SEMOPM, and SEMMNI. To determine all Shared Memory limits, Run : $ ipcs -ls or $ ipcs -s -l $ ipcs -ls ------ Semaphore Limits -------max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 100 semaphore max value = 32767

Successful People in life seem to like LINUX

Page 11 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
IPCS - Inter- Process Communication IPCS prints information about the active INTER-PROCESS COMMUNICATION. To determine all shared memory limits , execute # ipcs -lm. To determine all semaphore memory limits , execute # ipcs -ls.
IPCS is a UNIX/LINUX command specially for Linux System Administration.

Ex: Message queue, Semaphore arrays and Shared memory segments .  ipcs -s Shows only semaphores.  ipcs -m Shows only shared memory.  ipcs -q Shows only message queues. By default, three types of objects are shown. (without options ipcs) prints short format for message queues, shared memory, and semaphores). $ ipcs ------ Shared Memory Segments -------shmid owner perms bytes nattch status

------ Semaphore Arrays -------semid owner perms nsems status

------ Message Queues -------msqid owner perms used-bytes messages

SHARED MEMORY and SEMAPHORES Shared memory and semaphores are two important resources for an Oracle instance on Unix/Linux systems.
SHARED MEMORY  shmall, shmmax, shmmni SEMAPHORES  semmsl, semmns, semopm, semmni

Successful People in life seem to like LINUX

Page 12 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Oracle requires one semaphore for each process of each database on a system. When an Oracle process accesses the SGA (in shared memory) it will check for a semaphore for that portion of memory.

SHARED MEMORY :Oracle uses shared memory in UNIX/LINUX to hold (SGA). Shared memory is exactly that - a memory region that can shared between different processes. Oracle uses shared memory for implementing the SGA, which needs to be visible to all database sessions. Oracle uses shared memory segments for the SHARED GLOBAL AREA (SGA) which is an area of memory that is shared by Oracle processes. $ ipcs –lm shows all shared memory settings. Processes can exchange values in the shared memory. One process will create a portion of memory which other process can access. SHARED MEMORY required by the Oracle Instance : When Instance startup , that the instance does ,  Read the "init<SID>.ora"  Start the background processes  Allocate the shared memory and semphores required SGA is broken into following Sections Fixed Portion , which is constant in size, Variable Portion, which varies in size depending on "init.ora" parameters, Redo block buffer, which has its size controlled by log_buffers, DB block buffer, which has its size controlled by db_block_buffers. Successful People in life seem to like LINUX
Page 13 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
SGA size is the sum of the sizes of the above mentioned portions. SGA size is calculated from various "init.ora" parameters. SEMAPHORE Each Oracle process has its own semaphore. For example, DBWR (Database Writer process) needs to flush the database buffer cache to write to the data files on disk. When it is time for DBWR to perform this task, DBWR semaphore signals to DBWR to flush the data from the buffer out to disk. Semaphores are serialization devices that helps only one person at a time will get a semaphore. i.e. we use semaphore to protect some shared data structure (a table ) updated by more then one process at a time. Semaphores are commonly used in DBMS to prevent two processes from attempting to update a table simultaneously. Semaphores to prevent two or more processes from updating a record simultaneously, generally the first process there has control and the second process has to wait until the first process completes. The no of semaphores for an Oracle database is normally equal to the value of the processes initialization parameter. If processes=200, 200 UNIX semaphores allocated for Oracle database. # semaphores: semmsl, semmns, semopm, semmni The total number of semaphores is determined by summing the NSEMS column in the ipcs display. Successful People in life seem to like LINUX
Page 14 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4 Shared Memory Kernel Parameters
The size of the SGA should fit within one shared memory segment. SHMMAX should be slightly larger than the SGA size. Ex : SHMMAX = 2147483648 and SGA SIZE= 285212672 bytes If SHMMAX is too small, we can get error message similar to following error. ORA-27123: unable to attach to shared memory segment. For 64-bit Servers : Oracle Global Customer Support officially recommends a "maximum" for SHMMAX of " 1/2 of physical RAM " for 64-bit Servers. Half the RAM – " 1/2 of physical RAM " on the server. Server has 128
GIGABYTES of

RAM  can set SHMMAX to 64

GIGABYTES.

Shmmax : This parameter is used to define the max size for a shared memory

segment it's enough for largest SGA size. Max size (in bytes) for a shared memory segment. Linux process can allocate in its virtual address space. Shmall : This parameter controls the total amount of shared memory (in pages) that can be used system wide. SHMALL should always be at least ceil(shmmax/PAGE_SIZE). The default PAGE_SIZE is on Linux system is 4096. Memory available on the system is bytes (shmall*PAGE_SIZE) 2097152*4096 which is 8 GB. To determine value of page_size is : $ getconf PAGE_SIZE. Shmmni : This parameter is used to set the maximum number of shared memory segments system wide. Oracle recommends SHMMNI to be 4096. The
default value is 4096 This value is sufficient doesn’t need to be changed.

Successful People in life seem to like LINUX

Page 15 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4

Shmmin : This parameter controls the minimum size (in bytes) for a shared memory segment. The default value for shmmin is 1. To determine the value of shmmin : execute , # ipcs -lm | grep "min seg size"

Semaphore Kernel Parameters
In oracle, ora.init parameter processes is very large, the semaphore settings need to be adjusted accordingly. Kernel parameters (semmsl, semmns, semopm, semmni) that can be used to change the semaphore configuration. Semmsl: This parameter defines the maximum no of semaphores that can be in one (per) semaphore set. It should be same size as maximum number of Oracle processes. (Processes parameter in the init.ora file) The PROCESSES parameter can be found in <initsid.ora> file, Location :
ORACLE_HOME/dbs directory.

Oracle recommends SEMMSL to be at least 250 for 10g R1/R2 database. If SEMMSL is not equal to PROCESSES, the total # of semaphores required (sum of PROCESSES) doesn’t exceed the maximum (SEMMSL*SEMMNI : SEMMNS). For ex: If SEMMSL=25 and SEMMNI=10, total # of semaphores required (sum of PROCESSES)must not exceed 250 (10 semaphore sets * 25 semaphores/set). Semmni : This parameter defines the maximum number of semaphore sets for the entire Linux system. Oracle recommends SEMMNI to be at least 128 for 9i R2 and 10g R1/R2 databases on X86 platforms. Semmns : This parameter defines the total no of semaphores (not semaphore
sets ) for the entire Linux system.

Successful People in life seem to like LINUX

Page 16 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Oracle recommends SEMMNS to be at least 32000 for 10g R1/R2 databases. Setting SEMMNS to 32000 ensures that , (semaphores can be be used)
SEMMNS= SEMMSL * SEMMNI (250*128=32000) .

The maximum no of semaphores that can be allocated on a Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI). It's recommended to set to at least 32000 for 9i and 10g databases.
Semopm : This kernel parameter is used to control the number of semaphore

operations that can be performed per semop system call. Oracle recommends to set SEMOPM to a minimum value of 100 for 10g R1/R2 databases. The SEMOP system call (function) provides the ability to do operations for multiple semaphores with one semop system call. To see current kernel settings. # /sbin/sysctl -a | grep file-max # /sbin/sysctl -a | grep ip_local_port_range # /sbin/sysctl -a | grep rmem_default # /sbin/sysctl -a | grep shm : for shmall, shmmax, shmmni # /sbin/sysctl -a | grep sem : for semmsl, semmns, semopm, semmni Why "oracle" user and Directories Creating the UNIX groups (oinstall, dba, and oper) and user (oracle) that will be used to install the Oracle Database 10g software.  The oinstall group (the Oracle Inventory group).  The dba group (the OSDBA group).  The oper group (the OSOPER group). Successful People in life seem to like LINUX

Page 17 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
ORACLE_BASE
ORACLE_BASE defined at install time. ORACLE_BASE is root directory for oracle i.e. Top level directory. ORACLE_BASE directory is higher level directory, than ORACLE_HOME

because ORACLE_HOME defined under ORACLE_BASE directory.
ORACLE_BASE ORACLE_BASE

dir can contain many ORACLE_HOME directories i.e. can have multiple Oracle versions with different

ORACLE_HOME. ORACLE_BASE path will be /u01/app/oracle. ORACLE_HOME
ORACLE_HOME defined at install time it is where the software is installed. ORACLE_HOME is an environment variable which is used to set and define

the path of Oracle Home (server) Directory.
ORACLE_HOME contains the sub directories , binaries, executables, scripts,

programs , network files , etc. for the oracle database.
ORACLE_HOME directory can be used by any user who wants to use the

particular database in the system.
ORACLE_HOME located beneath ORACLE_BASE i.e ORACLE_HOME comes

under ORACLE_BASE.
ORACLE_HOME Path will be /u01/app/oracle/product/10.2.0/db_1

$ cd $ORACLE_HOME  bin  rdbms  sqlplus , etc .. If install ORACLE , bin , sqlplus , network/admin/ etc .. and all comes under
ORACLE_HOME directory.

Successful People in life seem to like LINUX

Page 18 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Points to Remember : Defining ORACLE_BASE , ORACLE_HOME in bash_profile

$ ORACLE_BASE=/u01/oracle/app $ export ORACLE_BASE $ ORACLE_HOME=$ORACLE_BASE/product/10.2.0 $ export ORACLE_HOME ORACLE_BASE and ORACLE_HOME are directory locations defined by the Oracle Flexible Architecture (OFA). $ echo $ORACLE_BASE displays ORACLE_BASE path. $ echo $ORACLE_HOME displays ORACLE_HOME path. bash_profile and it‟s purpose “ bash_profile is a environment file ” and it exists for every user. For oracle user : we can find /home/oracle path , should issue $ ls -la The file .bash_profile is a hidden file that resides in $HOME directory. “.bash_profile main purpose to set oracle env variables permanently ” once we run [. .bash_profile] all environment variables are set. Next time whenever we login , we can connect with sqlplus tool directly. Purpose of root.sh and rootInst.sh As part of oracle installation steps , we have to execute two scripts. After we have successfully installed oracle , OUI prompts to run “orainstRoot.sh” and “root.sh”. user root # should execute both scripts. Check following screen shot. Oracle suggests to backup the root.sh scripts end of oracle installation. Successful People in life seem to like LINUX
Page 19 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4

In General, root.sh and orainstRoot.sh scripts create the additional directories and sets appropriate ownership and permissions on files for root user. Importance of running „orainstRoot.sh‟ The script 'orainstRoot.sh' which is located in $ORACLE_BASE/oraInventory. The script should be run as (root #) user. orainstRoot.sh needs to be run to change the Permissions and groupname to 770 and to oinstall. # /u01/app/oracle/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oracle/oraInventory to 770. Changing groupname of /u01/app/oracle/oraInventory to oinstall. The execution of the script is complete

Successful People in life seem to like LINUX

Page 20 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
POINTS TO REMEMBER

It creates the inventory pointer file (/etc/oraInst.loc),This file shows the inventory location and group. It changes groupname of the “ oraInventory directory to oinstall group ”. Importance of running „root.sh‟ The script 'root.sh' which is located in $ORACLE_HOME path. We can find the file here (/u01/app/oracle/product/10.2.0/db_1). root.sh script does , root.sh also creates /etc/oratab file. ( linux , aix ). i.e. root.sh, which is a shell script, creates an ORATAB file. It correctly sets oracle base and home environments. To copy few files into /usr/local/bin. They are dbhome, oraenv, coraenv etc ..

root.sh script needs to run the first time , when any oracle product is installed on the server. root.sh does privileged operations required to run Oracle. The script should be run as (root #) user. When installing Oracle, some actions, which need to be performed as (root #), are recorded in a shell script called root.sh. This script is written in the orainst directory. we should run root.sh towards end of installation.
POINTS TO NOTE :

root.sh primarily it adjusts ownership and permissions. root.sh will do different things with different products and product versions. If there are special processes that need to be initiated. If there are new files (/usr/local/bin/oraenv) in root-only accessible parent dirs. Successful People in life seem to like LINUX
Page 21 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
If there are new directories (/var, /opt, especially for temp and logs) in root only accessible parent directory; If there are any permissions or ownerships to be changed, these are done by root.sh not all OS allow regular userids to chmod or chown ;
Simply In general , the script contains

all the product installation actions that require root privileges.

When executing root.sh script ; # /u01/app/oracle/product/10.2.0/db_1/root.sh

Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... 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.sh script. Now product-specific root actions will be performed. Successful People in life seem to like LINUX
Page 22 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
POINTS TO REMEMBER :

Oracle recommends

to backup

the root.sh script

after complete an

installation. If we install other products in the same Oracle home directory, then Oracle Universal Installer updates the contents of the existing root.sh script during the installation. Basically Oracle Installer updates root.sh file whenever it does an installation or patch so advisable to take a backup of the existing root.sh. Oraenv/Coraenv (Utilities) Both are utility to change ORACLE_HOME. Oraenv and Coraenv are UNIX/LINUX command line utilities.  Coraenv utility is appropriate for the UNIX C Shell.  Oraenv using a Bourne ,Korn or Bash shells.  Both utilities do the same thing in the different UNIX shells.  Both utilities are shell scripts and created during oracle installation. Main purpose is to set the required environment variables (ORACLE_SID,
ORACLE_HOME and PATH) to allow a user to connect to the DB instance. i.e.

(($ORACLE_HOME/bin) directory in the PATH environment variable setting). When switching between databases, users can run the oraenv or coraenv script to set these environment variables. If these environment variables are not set, commands such as “ SQL*PLUS, IMP, EXP, or any other utility will not work (or not be found)”. Oraenv command will prompt for the SID of the database that we wish .. Syntax is : {period} {space} oraenv. $ . oraenv Successful People in life seem to like LINUX

Page 23 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Oratab oratab is OS level file and created by root.sh also used by oracle utilities. oratab file is updated by the
DATABASE CONFIGURATION ASSISTANT (DBCA)

when creating a database. It is mainly used to list the databases and software versions installed on a server. If we create a database manually , we have to put the entry in ORATAB file. If we create database using DBCA , then automatically that database entry will be updated in ORATAB file. $ vi etc/oratab Entries are of the form:
$ORACLE_SID:$ORACLE_HOME:<N|Y>: orcldb:/u01/app/oracle/product/10.2.0/db_1:N testdb:/u01/app/oracle/product/10.2.0/db_1:Y

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

The first and second fields are the system identifier and $orcle_home directory of the database respectively. “:” used as the field terminator. The first field is (database_sid) the system identifier (SID) of an Oracle instance. The second field is the oracle_home directory associated with this instance. The 3rd field Y|N flags indicate if the instance should automatically start at boot time (Y=YES , N=NO). We can check oratab file here , $ vi /etc/oratab or $ cat /etc/oratab Oracle’s “dbstart” and “dbshut” scripts use this file to figure out “which instances are to be startup or shutdown“ (using the third field, Y or N). Successful People in life seem to like LINUX
Page 24 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Y - indicates that has automatic startup and shutdown option. N - indicates that don't have automatic startup and shutdown option. When starting up server, it will read oratab file to confirm what are the databases need to be automatically started.Same as when shutting down your server, before shutdown it will read oratab to confirm what the databases need to be shutdown properly.
NOTE : To configure , automatic startup and shutdown options , need to

perform some other tasks also. The “oraenv” utility uses ORATAB to set the correct environment variables. OUI OUI stands for Oracle Universal Installer. Run the OUI as the oracle user; $ ./runInstaller.
ORACLE UNIVERSAL INSTALLER

by running the runInstaller. OUI needs

some files in the directory where the runInstaller (UNIX/LINUX) is running. OUI creates the oraInventory dir the first time it is run on a computer.

The oraInventory directory keeps an inventory of products that Oracle Universal Installer installs on the system. OUI is a Java-based graphical user interface application that enables to install Oracle software components. OUI is the installer used for installing Enterprise Manager Grid Control (Grid Control). OUI automatically checks prerequisite (prior to oracle installation) to verify that the system meets operational requirement. They are following below ; Successful People in life seem to like LINUX
Page 25 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Physical memory , Kernel version , TEMP and SWAP space ,Operating System Version , Operating System Packages , Disc space for Oracle home installation, Kernel version , DISPLAY Colors , etc .. OUI automatically installs the Oracle-supplied version of the Java Runtime Environment (JRE). This version is required to run Oracle Universal Installer and several Oracle assistants. OUI also includes some features to perform; Set environment variables and configuration during installation. Detect configuration settings and deinstall oracle Products. What is Orainventory  The Oracle Inventory directory that is called (oraInventory).  It is a very important part of the Oracle Universal Installer.  This is where OUI keeps all information oraInventory is repository (directory) which store/records oracle software products and their oracle_homes location on a machine. There are basically two kind of Inventory  GLOBAL INVENTORY (also called as Central Inventory) and  LOCAL INVENTORY also called as Oracle Home Inventory. Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms and reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc.

Successful People in life seem to like LINUX

Page 26 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
The Global Inventory records the physical location of Oracle products installed on the machine, such as ORACLE_HOMES (RDBMS and IAS) or JRE. It does not have any information about the detail of patches applied to each ORACLE_HOMEs . The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, Who wants to see list of oracle products on machine check for file inventory.xml file under /ContentsXML dir in /oraInventory. There is one Local Inventory per ORACLE_HOME. It is located inside at $ORACLE_HOME/inventory . and contains the detail of the patch level for that ORACLE_HOME. The Local Inventory gets updated whenever a patch is applied to the ORACLE_HOME, using OUI. Directory
ORACLE_BASE

Path /u01/app/oracle $ORACLE_BASE/oraInventory $ORACLE_BASE/product/(10.2/11.1)11.2.0/dbhome_1

Oracle Inventory :
ORACLE_HOME

According to this oraInventory comes under the $ORACLE_ BASE directory. The first time installing Oracle software on a system, Oracle Universal Installer prompts to specify the path to orainventory directory. Oracle recommends to choose oracle_base/oraInventory then OUI creates the directory and sets the correct owner, group, and permissions for it. NOTE : Do not delete this directory unless we have completely removed all Oracle software from the system. Successful People in life seem to like LINUX
Page 27 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
What is “oraInst.loc” file When install Oracle software on the system for the first time, Oracle Universal Installer (OUI) creates the oraInst.loc file. This file contains;  The name of the Oracle Inventory group (typically, oinstall),  The path of the Oracle Inventory directory. $ cat /etc/oraInst.loc inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall oraInst.loc contain path information to the Oracle central (also called global) Inventory directory and group of the software owner which can be oinstall as created on the system. Checking Status of oraInst.loc and Orainventory # stat oraInventory/ File: `oraInventory/' Size: 4096 Blocks: 8 IO Block: 4096 directory Links: 7

Device: 805h/2053d

Inode: 1439025

Access: (0770/drwxrwx---) Uid: ( 502/ oracle) Gid: ( 502/oinstall) # stat oraInst.loc File: `oraInst.loc' Size: 63 Blocks: 8 IO Block: 4096 regular file Links: 1

Device: 805h/2053d

Inode: 1439027

Access: (0770/-rwxrwx---) Uid: ( 502/ oracle) Gid: ( 502/oinstall)

Successful People in life seem to like LINUX

Page 28 of 29

Oracle 10g Installation on Oracle Enterprise Linux - 4
Manually Uninstall oracle in Linux Sometimes we have to uninstall the oracle software, so it essential to know , how to uninstall oracle binaries and software. If we make any mistakes they can be quite destructive so be careful. * Uninstall all Oracle components using the Oracle Universal Installer (OUI). [oracle@testserver database] $ ./runInstaller and select installed product and remove all the installed products. # Delete the files and directories below the $ORACLE_HOME : # cd $ORACLE_HOME # rm –rf * # cd $ORACLE_BASE # rm -rf * # delete the /etc/oratab file.
POINTS TO NOTE :

During installation , OUI uses a temporary directory for swap space. OUI uses the "oraInst.loc" file to find the location of the oraInventory dir. As part of installation, we need to specify a dir for installer files (orainventory). During the installation of Oracle software, the scripts oraenv/coraenv are installed in <ORACLE_HOME>/bin and are copied to the local bin directory /usr/local/bin by root.sh. dbhome utility can be used to verify the

$ORACLE_HOME for the given $ORACLE_SID.

Successful People in life seem to like LINUX

Page 29 of 29

Sign up to vote on this title
UsefulNot useful