Sie sind auf Seite 1von 3

11/8/2017 Document 1493121.

What Are Root.sh And OrainstRoot.sh Scripts In A Standalone RDBMS Installation? (Doc ID
1493121.1)

In this Document

Purpose
Details
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 9.2.0.1 and later


Generic UNIX

PURPOSE

Explain Post Installation steps executed by the scripts orainstRoot.sh and root.sh after installation of Oracle Standalone
RDBMS home

DETAILS

The orainstRoot.sh and root.sh scripts are created in the last phase of installation and stored in the locations /<path to
oraInventory>/orainstRoot.sh and $ORACLE_HOME/root.sh.
After the installation is complete a prompt is diplayed to run these scripts as the root user. For example (the paths
displayed are just an example):

The following configuration scripts need to be executed as the "root" user

Scripts to be executed
1 /u01/app/oraInventory/orainstRoot.sh
2 /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

To execute the configuration scripts:


1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and click "OK" to continue

The following steps are performed by the orainstRoot.sh script:

The prompt to run this script will only appear if there is no inventory pointer file, oraInst.loc, found at one of the locations
noted below.

1) Changes permissions of inventory directory denoted by inventory_loc in the inventory location pointer file:

For Solaris, HP, LINUX Itanium: /var/opt/oracle/oraInst.loc


For LINUX and IBM AIX : /etc/oraInst.loc

Adds read,write permissions for group.

Removes read,write,execute permissions for world to the inventory directory.

Changes the permission of oraInventory to 770.

2) Change group of oraInventory directory to group desiginated during the installation, for example, oinstall.

3) If the inventory pointer file oraInst.loc does not exist. It creates oraInst.loc in the location notes in #1 above.

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=9ygjk35hj_165&id=1493121.1 1/3
11/8/2017 Document 1493121.1

The following steps are performed by the root.sh script:

1) Create the log file to store the output of the script root.sh . The format of log file created by root.sh is
${ORACLE_HOME}/install/root_`$UNAME -n`_`$DATE +%F_%H-%M-%S`.log . With the permission of 600 ownership
of oracle user and oinstall group

2) Check for the default directory /usr/local/bin. If it does not exist it will create it with permissions of 755.
If the directory /usr/local/bin exists checks if the directory is writable and if not writable then throws an error:

"Continue without copy (y/n) or retry (r)?" (the default is "y", continue without copying)

If n is used then root.sh script exits with message:

"Warning: Script terminated by user."

The default directory /usr/local/bin can be changed to any other directory localtion.

3) Check for the existence of these three files:

$ORACLE_HOME/bin/dbhome
$ORACLE_HOME/bin/oraenv
$ORACLE_HOME/bin/coraenv

Copies the above three files to /usr/local/bin or any other local binary location specified in step 2 and changes the
permissions of the files to 755.

The script 'dbhome' is called to determine the ORACLE_HOME for that SID and set ORACLE_HOME to the corresponding
value.
dbhome will also add "$ORACLE_HOME/bin" to the PATH environment variable setting.
When switching between databases, users can run the oraenv or coraenv script to set these environment variables.

For more information on dbhome,oraenv, and coraenv refer to the following:

Note 75003.1 What Are ORAENV and CORAENV?


Note 444830.1 How to set a common operating system environment by using oraenv or coraenv scripts?

4) Creates the oratab file. The ownership of the file would be oracle owner and os_dba group.
When creating subsequent databases via DBCA the entries of SID and ORACLE_HOME will be appended to oratab.
The location of the oratab is:

For Solaris, HP, TRU64, LINUX Itanium platforms: /var/opt/oracle

For Linux and IBM AIX platforms: /etc

5) For standalone database installations, changes the ownership to root and permission mentioned specifically for the
following files:

$ORACLE_HOME/bin/oradism,extjob,jssu permission changed 4750


$ORACLE_HOME/bin/externaljob.ora permission changed to 640
$ORACLE_HOME/scheduler/wallet permission changed to 700

/var/tmp/.oracle ownership root an permission 1777 (/var/tmp/.oracle are necessary for the listener and lsnrctl utility to
function properly.)

This is explained in:

Note 461144.1 Why are files under $ORACLE_HOME owned by root user?

6) Change the permissions to the folllowing so they are accessible by users from groups other than the user group.

$CHMOD 755 $ORACLE_HOME/bin


$CHMODR a+rX $ORACLE_HOME/lib
$CHMODR a+rX $ORACLE_HOME/perl
$CHMODR a+rX $ORACLE_HOME/jdk
$CHMOD 755 $ORACLE_HOME/bin/nmocat

7) Oracle will install the utilities fmputl and fmputlhp into $ORACLE_HOME/bin and root.sh will then copy fmputl and
fmputlhp from $ORACLE_HOME/bin to /opt/ORCLfmap/bin.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=9ygjk35hj_165&id=1493121.1 2/3
11/8/2017 Document 1493121.1

There is no environment variable to indicate the location of file mapping utility (fmputl and fmputlhp) and config file
(filemap) and therefore root.sh searches /opt by default for those utilities

$ORACLE_HOME/rdbms/filemap ----> /opt/ORCLfmap/prot1_32

or prot1_64 on some platform

This is explained in:

Note 394855.1 Why are executables fmputl and fmputlhp owned by root user?

8) For LINUX -Add a large number to file-max kernel param in /etc/sysctl.conf for memory_target on Linux.Change value
from 6.4M to 6815744 (due to validated configs)

REFERENCES

NOTE:461144.1 - Why are files under $ORACLE_HOME owned by root user?


NOTE:760256.1 - Lsnrctl Status Results in a TNS-12541 and "No Such File or Directory" Error
NOTE:75003.1 - WHAT ARE ORAENV AND CORAENV?
NOTE:444830.1 - How to set a common operating system environment by using oraenv or coraenv scripts ?
NOTE:1351051.1 - Information Center: Install and Configure Database Server/Client Installations
Didn't find what you are looking for?

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=9ygjk35hj_165&id=1493121.1 3/3

Das könnte Ihnen auch gefallen