Skip Headers
Oracle® Database Installation Guide
11g Release 2 (11.2) for Linux

Part Number E10840-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

2 Oracle Database Preinstallation Requirements

This chapter describes the tasks that you must complete before you start Oracle Universal Installer. It includes information about the following tasks:

Note:

See Also:

2.1 Logging In to the System as root

Before you install the Oracle software, you must complete several tasks as the root user. To log in as the root user, complete one of the following procedures:

Note:

Unless you intend to complete a silent-mode installation, you must install the software from an X Window System workstation, an X terminal, or a PC or other system with X server software installed.

For more information about silent-mode installations, refer to Appendix A.

2.2 Checking the Hardware Requirements

The system must meet the following minimum hardware requirements:

2.2.1 Memory Requirements

The following are the memory requirements for installing Oracle Database 11g Release 2:

  • At least 1 GB of RAM

    To determine the RAM size, enter the following command:

    # grep MemTotal /proc/meminfo
    

    If the size of the RAM is less than the required size, then you must install more memory before continuing.

  • The following table describes the relationship between installed RAM and the configured swap space requirement:

    Note:

    On Linux, the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. If you enable HugePages, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space.
    RAM Swap Space
    Between 1 GB and 2 GB 1.5 times the size of RAM
    Between 2 GB and 16 GB Equal to the size of RAM
    More than 16 GB 16 GB

    To determine the size of the configured swap space, enter the following command:

    # grep SwapTotal /proc/meminfo
    

    If necessary, refer to the operating system documentation for information about how to configure additional swap space.

To determine the available RAM and swap space, enter the following command:

# free

Note:

Oracle recommends that you take multiple values for the available RAM and swap space before finalizing a value. This is because the available RAM and swap space keep changing depending on the user interactions with the computer.

Automatic Memory Management

Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup. The number of file descriptors for each Oracle instance should be at least 512*PROCESSES. Also, the limit of descriptors for each process should be at least 512. If file descriptors are not sized correctly, you will notice ORA-27123 from various Oracle processes and potentially Linux Error EMFILE (Too many open files) errors in non-Oracle processes.

To determine the amount of shared memory available, enter the following command:

# df -h /dev/shm/

Note:

MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.

On the Initialization Parameters page, note that Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET. Note that the initialization parameters cannot be greater than the shared memory file system on the operating system. For example, if the shared memory file system allocation on your system is 1 GB, but you set Memory Size (MEMORY_TARGET) to 2 GB, then the following error messages are displayed during database startup:

ORA-00845: MEMORY_TARGET not supported on this system
ORA-01078: Failure in processing system parameters

In addition, if you click All Initialization Parameters and the global database name is longer than 8 characters, then the database name value (in the DB_NAME parameter) is truncated to the first eight characters, and the DB_UNIQUE_NAME parameter value is set to the global name.

2.2.2 System Architecture

To determine whether the system architecture can run the software, enter the following command:

# uname -m

This command displays the processor type. Verify that the processor architecture matches the Oracle software release that you want to install. If you do not see the expected output, then you cannot install the software on this system.

2.2.3 Disk Space Requirements

The following are the disk space requirements for installing Oracle Database 11g Release 2 (11.2):

  • At least 1 GB of disk space in the /tmp directory

    To determine the amount of disk space available in the /tmp directory, enter the following command:

    # df -h /tmp 
    

    If there is less than 1 GB of free disk space available in the /tmp directory, then complete one of the following steps:

    • Delete unnecessary files from the /tmp directory to meet the disk space requirement.

    • Set the TMP and TMPDIR environment variables when setting the oracle user's environment.

      See Also:

      "Configuring the oracle User's Environment" for more information on setting TMP and TMPDIR
    • Extend the file system that contains the /tmp directory. If necessary, contact the system administrator for information about extending file systems.

  • To determine the amount of free disk space on the system, enter the following command:

    # df -h
    
  • The following tables describe the disk space requirements for software files, and data files for each installation type on Linux x86:

    Installation Type Requirement for Software Files (GB)
    Enterprise Edition 3.95
    Standard Edition 3.88

    Installation Type Disk Space for Data Files (GB)
    Enterprise Edition 1.7
    Standard Edition 1.5

  • The following tables describe the disk space requirements for software files, and data files for each installation type on Linux x86-64:

    Installation Type Requirement for Software Files (GB)
    Enterprise Edition 4.35
    Standard Edition 3.73

    Installation Type Disk Space for Data Files (GB)
    Enterprise Edition 1.68
    Standard Edition 1.48

Additional disk space, either on a file system or on an Automatic Storage Management disk group is required for the fast recovery area if you choose to configure automated backups.

2.2.4 Display Requirements

The minimum display requirement for Oracle Database 11g Release 2 (11.2) is a resolution of 1024 x 768 or higher.

2.2.5 Run Level Requirement

Ensure that the system is started with run level 3 or run level 5.

2.2.6 Recommended Hardware Requirement for SQL Developer

The following table lists the recommended Memory and Display requirements for SQL Developer:

Resource Recommended
CPU Type and Speed Pentium IV 2 GHz or faster
Java SDK JDK 5.0 Update 6 or later for Linux
Memory 1 GB RAM
Display 65536 colors, set to at least 1024 X 768 resolution

2.3 Checking the Software Requirements

Depending on the products that you intend to install, verify that the following softwares are installed on the system.

Note:

  • This guide contains information required to install Oracle Database 11g Release 2 (11.2) on various platforms of Linux. Ensure that you review information related to the platform on which you intend to install Oracle Database 11g.

  • Oracle Universal Installer performs checks on the system to verify that it meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer.

2.3.1 Operating System Requirements

The following or later versions of the operating system are required for Oracle Database 11g Release 2 (11.2):

  • On Linux x86:

    • Asianux 2 Update 7

    • Asianux 3

    • Oracle Enterprise Linux 4 Update 7

    • Oracle Enterprise Linux 5 Update 2

    • Red Hat Enterprise Linux 4 Update 7

    • Red Hat Enterprise Linux 5 Update 2

    • SUSE Linux Enterprise Server 10 SP2

    • SUSE Linux Enterprise Server 11

  • On Linux x86-64

    • Asianux 2

    • Asianux 3

    • Oracle Enterprise Linux 4 Update 7

    • Oracle Enterprise Linux 5 Update 2

    • Red Hat Enterprise Linux 4 Update 3

    • Red Hat Enterprise Linux 5 Update 2

    • SUSE Linux Enterprise Server 10 SP2

    • SUSE Linux Enterprise Server 11

Starting with Oracle Database 11g Release 2 (11.2), the Security Enhanced Linux (SE Linux) feature is supported for Oracle Enterprise Linux 4, Red Hat Enterprise Linux 4, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5.

Note:

For Asianux Server, Oracle Enterprise Linux, and Red Hat Enterprise Linux, system requirements are identical by kernel version. Specifically:

Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4 requirements are the same.

Asianux Server 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 requirements are the same.

See Also:

"Hardware and Software Certification" for information about how to access the latest system requirements

To determine the distribution and version of Linux installed, enter the following command:

# cat /proc/version

Alternatively, you can also enter the following command on some distributions of Linux:

# lsb_release -id

Note:

Only the distributions and versions listed in the earlier list are supported. Do not install the software on other versions of Linux.

2.3.2 Kernel Requirements

The following are the kernel requirements for Oracle Database 11g Release 2 (11.2):

  • On Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4:

    2.6.9 or later

  • On Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5:

    2.6.18 or later

  • On SUSE Linux Enterprise Server 10:

    2.6.16.21 or later

  • On SUSE Linux Enterprise Server 11:

    2.6.27.19 or later

To determine whether the required kernel is installed, enter the following command:

# uname -r

The following is a sample output displayed by running this command on an Oracle Enterprise Linux 5.0 system:

2.6.18-128.el5PAE

In this example, the output shows the kernel version (2.6.18) and errata level (-128.el5PAE) on the system.

If the kernel version does not meet the requirement, then contact the operating system vendor for information about obtaining and installing kernel updates.

2.3.3 Package Requirements

The following are the list of packages required for Oracle Database 11g Release 2 (11.2):

Note:

  • Oracle recommends that you install your Linux operating system with the default software packages (RPMs), unless you specifically intend to perform a minimal installation, and follow the directions for performing such an installation to ensure that you have all required packages for Oracle software.

  • Oracle recommends that you do not customize RPMs during a default operating system installation. A default installation includes most required packages, and will help you to limit manual checks of package dependencies.

  • If you did not perform a default Linux installation, you intend to use LDAP, and you want to use the scripts odisrvreg, oidca, or schemasync, then install the Korn shell RPM for the Linux distribution.

  • You must install the packages (or later versions) listed in the following table. Also, ensure that the list of RPMs and all of the prerequisites for these RPMs are installed.

On Linux x86:

Operating System Requirement
Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4 The following packages (or later versions) must be installed:
binutils-2.15.92.0.2
compat-libstdc++-33.2.3
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-devel-0.3.105
libaio-0.3.105
libgcc-3.4.6
libstdc++-3.4.6
libstdc++-devel-3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-devel-2.2.11
Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106 
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2 
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
SUSE Linux Enterprise Server 10 The following packages (or later versions) must be installed:
binutils-2.16.91.0.5
compat-libstdc++-5.0.7
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-devel-2.4
ksh-93r-12.9
libaio-0.3.104
libaio-devel-0.3.104
libelf-0.8.5
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.80
sysstat-8.0.4
SUSE Linux Enterprise Server 11 The following packages (or later versions) must be installed:
binutils-2.19
gcc-4.3
gcc-c++-4.3
glibc-2.9
glibc-devel-2.9
ksh-93t
libstdc++33-3.3.3
libstdc++43-4.3.3_20081022
libstdc++43-devel-4.3.3_20081022
libaio-0.3.104
libaio-devel-0.3.104
libgcc43-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
sysstat-8.1.5

On Linux x86-64:

Operating System Requirement
Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4 The following packages (or later versions) must be installed:
binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
expat-1.95.7
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-2.3.4-2.41 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libaio-devel-0.3.105 (32 bit)
libgcc-3.4.6
libgcc-3.4.6 (32-bit)
libstdc++-3.4.6
libstdc++-3.4.6 (32 bit)
libstdc++-devel 3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
SUSE Linux Enterprise Server 10 The following packages (or later versions) must be installed:
binutils-2.16.91.0.5
compat-libstdc++-5.0.7
gcc-4.1.0
gcc-c++-4.1.2
glibc-2.5-24
glibc-devel-2.4
glibc-devel-32bit-2.4
ksh-93r-12.9
libaio-0.3.104
libaio-32bit-0.3.104
libaio-devel-0.3.104
libaio-devel-32bit-0.3.104
libelf-0.8.5
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.80
sysstat-8.0.4
SUSE Linux Enterprise Server 11 The following packages (or later versions) must be installed:
binutils-2.19
gcc-4.3
gcc-32bit-4.3
gcc-c++-4.3
glibc-2.9
glibc-32bit-2.9
glibc-devel-2.9
glibc-devel-32bit-2.9
ksh-93t
libaio-0.3.104
libaio-32bit-0.3.104
libaio-devel-0.3.104
libaio-devel-32bit-0.3.104
libstdc++33-3.3.3
libstdc++33-32bit-3.3.3
libstdc++43-4.3.3_20081022
libstdc++43-32bit-4.3.3_20081022
libstdc++43-devel-4.3.3_20081022
libstdc++43-devel-32bit-4.3.3_20081022
libgcc43-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
sysstat-8.1.5

To determine whether the required packages are installed, enter commands similar to the following:

# rpm -q package_name

If a package is not installed, then install it from the Linux distribution media or download the required package version from the Linux vendor's Web site.

2.3.4 Compiler Requirements

Intel C++ Compiler 10.1 or later and the version of GNU C and C++ compilers listed under "Package Requirements" are supported with Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface, and Oracle XML Developer's Kit (XDK) for Oracle Database 11g Release 2.

Note:

Intel Compiler v10.1 can be used only with gcc 3.4.5 or gcc 4.0 or gcc 4.1 standard template libraries to build Oracle C++ Call Interface (OCCI) applications.

Oracle XML Developer's Kit is supported with the same compilers as OCCI.

2.3.5 Additional Software Requirements

Depending on the components you want to use, you must ensure that the following software are installed:

2.3.5.1 Oracle ODBC Drivers

If you intend to use ODBC, then you should install the most recent ODBC Driver Manager for Linux. You can download and install the Driver Manager from the following URL:

http://www.unixodbc.org

Linux RPMs are also available on this Web site.

  • On Linux x86

    To use ODBC, you must also install the following additional 32-bit ODBC RPMs, depending on your operating system:

    • On Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4:

      unixODBC-2.2.11 (32 bit) or later
      unixODBC-devel-2.2.11 (32 bit) or later
      
    • On Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5:

      unixODBC-2.2.11 (32 bit) or later
      unixODBC-devel-2.2.11 (32 bit) or later
      
    • On SUSE 10:

      unixODBC-32bit-2.2.11 (32 bit) or later
      unixODBC-devel-32bit-2.2.11 (32 bit) or later
      
  • On Linux x86-64

    To use ODBC, you must also install the following additional ODBC RPMs, depending on your operating system:

    • On Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4:

      unixODBC-2.2.11 (32 bit) or later
      unixODBC-devel-2.2.11 (64 bit) or later
      unixODBC-2.2.11 (64 bit ) or later
      
    • On Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5:

      unixODBC-2.2.11 (32 bit) or later
      unixODBC-devel-2.2.11 (64 bit) or later
      unixODBC-2.2.11 (64 bit) or later
      
    • On SUSE 10:

      unixODBC-32bit-2.2.11 (32 bit) or later
      unixODBC-2.2.11 (64 bit ) or later
      unixODBC-devel-2.2.11 (64 bit) or later
      

2.3.5.2 Oracle JDBC/OCI Drivers

You can use Sun JDK 1.5.0-06 with the JNDI extension with the Oracle Java Database Connectivity and Oracle Call Interface drivers. However, these are not mandatory for the database installation.

2.3.5.3 Oracle Messaging Gateway

Oracle Messaging Gateway supports the integration of Oracle Streams Advanced Queuing (AQ) with the following software:

  • IBM WebSphere MQ V6.0, client and server, with corrective service diskette 5 (CSD05) or later:

    MQSeriesClient
    MQSeriesServer
    MQSeriesRuntime
    
  • TIBCO Rendezvous 7.3

If you require a CSD for WebSphere MQ, then refer to the following Web site for download and installation information:

http://www-306.ibm.com/software/integration/wmq/support

2.3.5.4 Browser Requirements

Web browsers must support Java Script, and the HTML 4.0 and CSS 1.0 standards. The following browsers meet these requirements for Oracle Enterprise Manager Database Control:

  • Netscape Navigator 8.1

  • Netscape Navigator 9.0

  • Microsoft Internet Explorer 6.0 SP2

  • Microsoft Internet Explorer 7.0

  • Microsoft Internet Explorer 7.0 SP1

  • Microsoft Internet Explorer 8.0

  • Firefox 2.0

  • Firefox 3.0.7

  • Safari 3.0.4

  • Safari 3.1

  • Safari 3.2

2.4 Preinstallation Requirement for Oracle Database Vault

If you want to install Oracle Database Vault, then set the DB_BLOCK_SIZE initialization parameter to 4096 or larger. If the value is less than 4096, then you cannot change it. The only way to change the DB_BLOCK_SIZE value is by recreating the database.

2.5 Installation Fixup Scripts

During installation, for certain prerequisite check failures, you can click Fix & Check Again to generate a fixup script (runfixup.sh). You can run this script as a root user to complete the required preinstallation steps.

The fixup script does the following:

Oracle recommends that you do not modify the contents of the generated fixup script.

Note:

Using fixup scripts will not ensure that all the prerequisites for installing Oracle Database are satisfied. You must still verify that all the preinstallation requirements are met to ensure a successful installation.

2.6 Checking the Network Setup

Typically, the computer on which you want to install Oracle Database is connected to the network. The computer has local storage, to store the Oracle Database installation. It also contains a display monitor, and DVD drive. This section describes how to install Oracle Database on computers that do not meet the typical scenario. It covers the following cases:

2.6.1 Installing on DHCP Computers

Dynamic Host Configuration Protocol (DHCP) assigns dynamic IP addresses on a network. Dynamic addressing enables a computer to have a different IP address each time it connects to the network. In some cases, the IP address can change while the computer is still connected. You can have a mixture of static and dynamic IP addressing in a DHCP system.

In a DHCP setup, the software tracks IP addresses, which simplifies network administration. This lets you add a new computer to the network without having to manually assign a unique IP address to the newly added computer.

2.6.2 Installing on Multihomed Computers

You can install Oracle Database on a multihomed computer. A multihomed computer is associated with multiple IP addresses. This is typically achieved by having multiple network cards on the computer. Each IP address is associated with a host name. In addition, you can set up aliases for the host name. By default, Oracle Universal Installer uses the ORACLE_HOSTNAME environment variable setting to find the host name. If ORACLE_HOSTNAME is not set and you are installing on a computer that has multiple network cards, then Oracle Universal Installer determines the host name by using the first entry in the /etc/hosts file.

Clients must be able to access the computer either by using this host name or by using aliases for this host name. To verify this, ping the host name from the client computers using the short name (host name only) and the full name (host name and domain name). Both tests must be successful.

Setting the ORACLE_HOSTNAME Environment Variable

Use the following procedure to set the ORACLE_HOSTNAME environment variable. For example, if the fully qualified host name is somehost.us.example.com, then enter one of the following commands:

In Bourne, Bash, or Korn shell:

$ ORACLE_HOSTNAME=somehost.us.example.com
$ export ORACLE_HOSTNAME

In C shell:

% setenv ORACLE_HOSTNAME somehost.us.example.com

2.6.3 Installing on Computers with Multiple Aliases

A computer with multiple aliases is registered with the naming service under a single IP but with multiple aliases. The naming service resolves any of those aliases to the same computer. Before installing Oracle Database on such a computer, set the ORACLE_HOSTNAME environment variable to the computer whose host name you want to use.

2.6.4 Installing on Non-Networked Computers

You can install Oracle Database on a non-networked computer. If the computer, such as a laptop, is configured for DHCP and you plan to connect the computer to the network after the Oracle Database installation, then use the ping command on the computer on which you want to install the database to check if the computer can connect to itself. Perform this step by first using only the host name and then using the fully qualified name, which should be in the /etc/hosts file.

Note:

When you run the ping command on the computer itself, the ping command should return the IP address of the computer.

If the ping command fails, then contact the system administrator.

Connecting the Computer to the Network after Installation

If you connect the computer to a network after installation, then the Oracle Database instance on the computer can work with other instances on the network. The computer can use a static IP or DHCP, depending on the network to which you are connected.

2.7 Creating Required Operating System Groups and Users

Depending on whether this is the first time Oracle software is being installed on this system and on the products that you are installing, you may need to create several operating system groups and users.

If you prefer to allocate operating system user privileges so that you can use one administrative user and one group for operating system authentication for all administrative privileges, then you can use the oracle user as the installation owner, and use one group as the primary group for any user requiring administrative privileges for Automatic Storage Management, and Oracle Database administration. This group must also be the Oracle Inventory group. To simplify using the defaults for Oracle tools the group name should be oinstall.

You can also create custom configuration groups and users based on job role separation. A custom configuration is a configuration with groups and users that divide access privileges granted by membership in separate operating system groups and users. You can create a single user (for example, oracle) to own both Oracle database, and Oracle grid infrastructure installations. Alternatively, you can create a separate user (for example, grid) to own the Oracle grid infrastructure installation.

Note:

In Oracle documentation, a user created to own only Oracle grid infrastructure software installations is called the grid user. A user created to own either all Oracle installations, or only Oracle database installations, is called the oracle user.

2.7.1 Creating Custom Configuration Groups and Users for Job Roles

This section provides an overview of how to create users and groups to divide access privileges by job roles. Log in as root to create these groups and users.

2.7.1.1 Users for Oracle Installations with Job Role Separation

Oracle recommends that you create one software owner to own each Oracle software installation (typically, oracle, for the database software and grid for the Oracle Restart owner user). You must create at least one software owner the first time you install Oracle software on the system.

Oracle software owners must have the Oracle Inventory group as their primary group, so that each Oracle software installation owner can write to the Central Inventory. The database software owner (typically, oracle) must also have the OSDBA group of the grid infrastructure home so that database instances can log on to Automatic Storage Management, and (if you create it) the OSOPER group as secondary groups. In Oracle documentation, the Oracle software owner users are referred to as oracle users.

See Also:

Oracle Database Administrator's Guide for more information about the OSDBA, OSASM and OSOPER groups, and the SYSDBA, SYSASM and SYSOPER privileges

2.7.1.2 Database Groups for Job Role Installations

The following operating system groups and user are required if you are installing Oracle Database:

  • The OSDBA group (typically, dba)

    You must create this group the first time you install Oracle Database software on the system. This group identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege). The name used for this group in Oracle code examples is dba.

  • The OSOPER group for Oracle Database (typically, oper)

    This is an optional group. Create this group if you want a separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege). This group cannot directly connect as SYSOPER, unless explicitly granted. However, they will have the privileges granted by the SYSOPER privilege. By default, even members of the OSDBA group have all privileges granted by the SYSOPER privilege.

    Oracle Universal Installer prompts you to specify the name of this group. The usual name chosen for this group is oper.

2.7.1.3 Grid Infrastructure Groups for Job Role Installations

The following operating system groups and user are required if you are installing Oracle grid infrastructure:

Note:

You can designate a unique group, separate from database administrator groups, or you can use the same group as the OSASM and OSDBA group, to grant system privileges to administer both the ASM instances and Oracle Database instances.
  • The OSDBA group for Automatic Storage Management (typically, asmdba)

    The OSDBA group for Automatic Storage Management can be the same group used as the OSDBA group for the database, or you can create a separate OSDBA group for Automatic Storage Management (typically, asmdba) to provide administrative access to Automatic Storage Management instances.

    The Oracle grid infrastructure software owner (typically, grid) must be a member of the OSDBA group. Membership in the OSDBA group allows access to the files managed by Automatic Storage Management. If you have a separate OSDBA group for Automatic Storage Management, then the Oracle Restart software owner must be a member of the OSDBA group for each database and the OSDBA group for Automatic Storage Management.

  • The OSASM group for Automatic Storage Management (typically, asmadmin)

    SYSASM privileges for Automatic Storage Management files provide administrator privileges for storage file. In Oracle documentation, the operating system group whose members are granted SYSASM privileges is called the OSASM group, and in command lines, is referred to as asmadmin. Automatic Storage Management can support multiple databases.

    Members of the OSASM group can use SQL to connect to an Automatic Storage Management instance as SYSASM using operating system authentication. The SYSASM privileges permit mounting and dismounting disk groups, and other storage administration tasks. SYSASM privileges provide no access privileges on an RDBMS instance.

    If you do not designate a separate group as the OSASM group, then the OSDBA group you define is also by default the OSASM group.

  • The OSOPER group for Automatic Storage Management (typically, asmoper)

    This is an optional group. Create this group if you want a separate group of operating system users to have a limited set of Oracle ASM instance administrative privileges (the SYSOPER for ASM privilege), including starting up and stopping the Oracle ASM instance. By default, members of the OSASM group also have all privileges granted by the SYSOPER for ASM privilege.

    If you want to have an OSOPER for ASM group, then the grid infrastructure owner must be a member of this group.

2.7.2 Creating Database Operating System Groups and Users with Job Role Separation

The following sections describe how to create the required operating system user and groups:

Note:

If necessary, contact your system administrator before using or modifying an existing user.

Oracle recommends that you do not use the UID and GID defaults on each node, as group and user IDs likely will be different on each node. Instead, provide common assigned group and user IDs, and confirm that they are unused on any node before you create or modify groups and users.

2.7.2.1 Creating the Oracle Inventory Group

When you install Oracle software on the system for the first time, Oracle Universal Installer creates the oraInst.loc file. This file identifies the name of the Oracle Inventory group (typically, oinstall), and the path of the Oracle Inventory directory.

You can configure one group to be the access control group for the Oracle Inventory, for database administrators (OSDBA), and for all other access control groups used by Oracle software for operating system authentication. However, this group then must be the primary group for all users granted administrative privileges.

Log in as root, and use the following instructions to locate or create the Oracle Inventory group and a software owner:

Determining Whether the Oracle Inventory Group Exists

An oraInst.loc file has contents similar to the following:

inventory_loc=central_inventory_location
inst_group=group

In the preceding example, central_inventory_location is the location of the Oracle Central Inventory, and group is the name of the group that has permissions to write to the central inventory.

If you have an existing Oracle Inventory, then ensure that you use the same Oracle Inventory for all Oracle software installations, and ensure that all Oracle software users you intend to use for installation have permissions to write to this directory.

To determine if the Oracle Inventory group exist, enter the following command:

# grep oinstall /etc/group

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

# more /etc/oraInst.loc

If the oraInst.loc file exists, then the output from this command is similar to the following:

inventory_loc=/u01/app/oraInventory
inst_group=oinstall

In the previous output example:

  • The inventory_loc group shows the location of the Oracle Inventory

  • The inst_group parameter shows the name of the Oracle Inventory group (in this example, oinstall).

Creating the Oracle Inventory Group

If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following command:

# /usr/sbin/groupadd oinstall

2.7.2.2 Creating the OSDBA Group for Database Installations

You must create an OSDBA group in the following circumstances:

  • An OSDBA group does not exist, for example, if this is the first installation of Oracle Database software on the system

  • An OSDBA group exists, but you want to give a different group of operating system users database administrative privileges for a new Oracle Database installation

If the OSDBA group does not exist or if you require a new OSDBA group, then create it as follows. In the following procedure, use the group name dba unless a group with that name already exists:

# /usr/sbin/groupadd -g 502 dba

2.7.2.3 Creating an OSOPER Group for Database Installation

Create an OSOPER group only if you want to identify a group of operating system users with a limited set of database administrative privileges (SYSOPER operator privileges). For most installations, it is sufficient to create only the OSDBA group. If you want to use an OSOPER group, then you must create it in the following circumstances:

  • If an OSOPER group does not exist; for example, if this is the first installation of Oracle Database software on the system

  • If an OSOPER group exists, but you want to give a different group of operating system users database operator privileges in a new Oracle installation

If you require a new OSOPER group (typically, oper), then create it as follows. In the following, use the group name oper unless a group with that name already exists:

# /usr/sbin/groupadd -g 505 oper

2.7.2.4 Creating the OSASM Group for Automatic Storage Management

If the OSASM group does not exist or if you require a new OSASM group, then create it as follows. In the following procedure, use the group name asmadmin unless a group with that name already exists:

# /usr/sbin/groupadd -504 asmadmin

2.7.2.5 Creating the OSDBA Group for Oracle Grid Infrastructure

If you require a new OSDBA group for Oracle grid infrastructure, then create it as follows. In the following procedure, use the group name asmdba unless a group with that name already exists:

# /usr/sbin/groupadd -g 506 asmdba

2.7.2.6 Creating the OSOPER Group for Automatic Storage Management

If you require an OSOPER group, then create it as follows. In the following procedure, use the group name asmoper unless a group with that name already exists:

# /usr/sbin/groupadd -g 505 asmoper

2.7.2.7 Creating the Oracle Software Owner User

You must create an Oracle software owner user in the following circumstances:

  • If an Oracle software owner user does not exist; for example, if this is the first installation of Oracle software on the system.

  • If an Oracle software owner user exists, but you want to use a different operating system user, with different group membership, to give database administrative privileges to those groups in a new Oracle Database installation.

  • If you have created an Oracle software owner for Oracle grid infrastructure, such as grid, and you want to create a separate Oracle software owner for Oracle Database software, such as oracle.

2.7.2.7.1 Determining if an Oracle Software Owner User Exists

To determine whether an Oracle software owner user named oracle, or grid exists, enter a command similar to the following (in this case, to determine if oracle exists):

# id oracle

If the user exists, then the output from this command is similar to the following:

uid=501(oracle) gid=501(oinstall) groups=502(dba),503(oper)

Determine whether you want to use the existing user, or create another user. If you want to use the existing user, then ensure that the user's primary group is the Oracle Inventory group (oinstall) and that it is a member of the appropriate OSDBA and OSOPER groups. Refer to one of the following sections for more information:

Note:

If necessary, contact your system administrator before using or modifying an existing user.
2.7.2.7.2 Creating an Oracle Software Owner User

If the Oracle software owner user does not exist, or if you require a new Oracle software owner user, such as oracle or grid, then create it as described in this section (in this case to create the oracle user).

In the following procedure, use the user name oracle unless a user with that name already exists:

  1. To create an oracle user, enter a command similar to the following:

    # /usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba,[oper] oracle
    

    In the preceding command:

    • The -u option specifies the user ID. Using this command flag is optional, as you can allow the system to provide you with an automatically generated user ID number. However, you must make note of the oracle user ID number, as you require it later during preinstallation.

    • The -g option specifies the primary group, which must be the Oracle Inventory group--for example, oinstall

    • The -G option specifies the secondary groups, which must include the OSDBA group, and, if required, the OSOPER and ASMDBA groups. For example: dba, or asmdba,oper

  2. Set the password of the oracle user:

    # passwd oracle
    
2.7.2.7.3 Modifying an Existing Oracle Software Owner User

If the oracle user exists, but its primary group is not oinstall, or it is not a member of the appropriate OSDBA or OSOPER groups, then enter a command similar to the following to modify it. 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

2.8 Configure Oracle Installation Owner Shell Limits

For information, review "Configuring the oracle User's Environment"

To improve the performance of the software, you must increase the following shell limits for the oracle and grid user:

Shell Limit Item in limits.conf Hard Limit
Maximum number of open file descriptors nofile 65536
Maximum number of processes available to a single user nproc 16384
Maximum size of the stack segment of the process stack 10240

To increase the shell limits:

Note:

Depending on your environment, make the following changes for all Oracle installation owners. The steps below only show the user oracle.
  1. Add the following lines to the /etc/security/limits.conf file: (the following example shows the software account owner oracle):

    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  1024
    oracle              hard    nofile  65536
    
  2. Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

    session    required     pam_limits.so
    
  3. Depending on the oracle user's default shell, make the following changes to the default shell start-up file:

    • For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE Linux Enterprise Server systems /etc/profile.local):

      if [ $USER = "oracle" ]; then
              if [ $SHELL = "/bin/ksh" ]; then
                    ulimit -p 16384
                    ulimit -n 65536
              else
                    ulimit -u 16384 -n 65536
              fi
      umask 022
      fi
      
    • For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file (or the file on SUSE Linux Enterprise Server systems /etc/csh.login.local):

      if ( $USER == "oracle" ) then
              limit maxproc 16384
              limit descriptors 65536
      endif
      

2.9 Configuring Kernel Parameters

During installation, you can generate and run the Fixup script to check and set the kernel parameter values required for successful installation of the database. This script updates required kernel packages if necessary to minimum values.

If you cannot use the Fixup scripts, then verify that the kernel parameters shown in the following table are set to values greater than or equal to the minimum value shown. The procedure following the table describes how to verify and set the values manually.

Note:

The kernel parameter and shell limit values shown in the following section are minimum values only. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system. Refer to the operating system documentation for more information about tuning kernel parameters.
Parameter Minimum Value File
semmsl

semmns

semopm

semmni

250

32000

100

128

/proc/sys/kernel/sem
shmall 2097152 /proc/sys/kernel/shmall
shmmax Either 4 GB - 1 byte, or half the size of physical memory (in bytes), whichever is lower.

Default: 536870912

/proc/sys/kernel/shmmax
shmmni 4096 /proc/sys/kernel/shmmni
file-max 6815744 /proc/sys/fs/file-max
aio-max-nr Maximum: 1048576

Note: This value limits concurrent outstanding requests and should be set to avoid I/O subsystem failures.

/proc/sys/fs/aio-max-nr
ip_local_port_range Minimum: 9000

Maximum: 65500

/proc/sys/net/ipv4/ip_local_port_range
rmem_default 262144 /proc/sys/net/core/rmem_default
rmem_max 4194304 /proc/sys/net/core/rmem_max
wmem_default 262144 /proc/sys/net/core/wmem_default
wmem_max 1048576 /proc/sys/net/core/wmem_max

Note:

If the current value for any parameter is greater than the value listed in this table, then the Fixup scripts do not change the value of that parameter.

2.9.1 Displaying and Changing Kernel Parameter Values

Enter the commands shown in the following table to display the current values of the kernel parameters, make a note of these values and identify any values that you must change:

Parameter Command
semmsl, semmns, semopm, and semmni # /sbin/sysctl -a | grep sem

This command displays the value of the semaphore parameters in the order listed.

shmall, shmmax, and shmmni # /sbin/sysctl -a | grep shm

This command displays the details of the shared memory segment sizes.

file-max # /sbin/sysctl -a | grep file-max

This command displays the maximum number of file handles.

ip_local_port_range # /sbin/sysctl -a | grep ip_local_port_range

This command displays a range of port numbers.

rmem_default # /sbin/sysctl -a | grep rmem_default
rmem_max # /sbin/sysctl -a | grep rmem_max
wmem_default # /sbin/sysctl -a | grep wmem_default
wmem_max # /sbin/sysctl -a | grep wmem_max
aio-max-nr # /sbin/sysctl -a | grep aio-max-nr

If the value of any kernel parameter is different from the minimum value, then perform the following:

  1. Using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:

    Note:

    Include lines only for the kernel parameter values that you want to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current values are larger than the minimum value, then specify the larger value.
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmall = 2097152
    kernel.shmmax = 536870912
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048586
    

    Note:

    The minimum value required for shmmax is 0.5 GB. However, Oracle recommends that you set the value of shmmax to 2.0 GB for optimum performance of the system.

    By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system. However, on SUSE Linux Enterprise Server systems, enter the following command to ensure that the system reads the /etc/sysctl.conf file when it restarts:

    # /sbin/chkconfig boot.sysctl on
    
  2. Enter the following command to change the current values of the kernel parameters:

    # /sbin/sysctl -p
    

    Review the output from this command to verify that the values are correct. If the values are incorrect, edit the /etc/sysctl.conf file, then enter this command again.

  3. Enter the command /sbin/sysctl -a to confirm that the values are set correctly.

  4. On SUSE systems only, enter the following command to cause the system to read the /etc/sysctl.conf file when it restarts:

    # /sbin/chkconfig boot.sysctl on
    
  5. On SUSE systems only, you must enter the GID of the oinstall group as the value for the parameter /proc/sys/vm/hugetlb_shm_group. Doing this grants members of oinstall a group permission to create shared memory segments.

    For example, where the oinstall group GID is 501:

    # echo 501 > /proc/sys/vm/hugetlb_shm_group
    

    After running this command, use vi to add the following text to /etc/sysctl.conf, and enable the boot.sysctl script to run on system restart:

    vm.hugetlb_shm_group=501
    

    Note:

    Only one group can be defined as the vm.hugetlb_shm_group.
  6. After updating the values of kernel parameters in the /etc/sysctl.conf file, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl.conf file available in the active kernel memory.

2.10 Identifying Required Software Directories

You must identify or create the following directories for the Oracle software:

Note:

Ensure that the paths you select for Oracle software, such as Oracle home paths and the Oracle base path, use only ASCII characters. Because installation owner names are used by default for some path, this ASCII character restriction applies to user names, file names, and directory names.

2.10.1 Oracle Base Directory

The Oracle base directory is a top-level directory for Oracle software installations. On Linux systems, the Optimal Flexible Architecture (OFA) guidelines recommend that you use a path similar to the following for the Oracle base directory:

/mount_point/app/software_owner

In this example:

  • mount_point is the mount point directory for the file system that will contain the Oracle software.

    The examples in this guide use /u01 for the mount point directory. However, you can choose another mount point directory, such as /oracle or /opt/oracle.

  • software_owner is the operating system user name of the software owner installing the Oracle software, for example oracle, or grid.

Note:

If you start a database instance using spfile with ORACLE_BASE environment variable set, then its value is automatically stored in spfile. If you unset ORACLE_BASE environment variable subsequently and start the instance afresh, then database uses the value of Oracle base stored in spfile.

You must specify the Oracle base folder that contains all Oracle products.

Note:

If you have an existing Oracle base, then you can select it from the Use existing list. By default, the list contains the existing value for Oracle base preselected. Refer to "Installing the Oracle Database Software" for further information.

If you do not have an Oracle base, then you can create one by editing the text in the list box.

You can use the same Oracle base directory for more than one installation or you can create separate Oracle base directories for different installations. If different operating system users install Oracle software on the same system, then each user must create a separate Oracle base directory. The following are examples of Oracle base directories that can exist on the same system:

/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle

Refer to "Creating an Oracle Base Directory" for information on creating an Oracle base directory.

2.10.2 Oracle Inventory Directory

The Oracle Inventory directory (oraInventory) stores an inventory of all software installed on the system. It is required and shared by all Oracle software installations on a single system. If you have an existing Oracle Inventory path, then Oracle Universal Installer continues to use that Oracle Inventory.

The first time you install Oracle software on a system, Oracle Universal Installer checks if you have created an OFA-compliant directory structure with the format u[01-09]/app, such as /u01/app, and that the user running the installation has permissions to write to that path. If this is true, then Oracle Universal Installer creates the Oracle Inventory directory similar to /u[01-09]/app/oraInventory. For example:

/u01/app/oraInventory

If you have set the environment variable ORACLE_BASE for the oracle user, then Oracle Universal Installer creates the Oracle Inventory directory similar to $ORACLE_BASE/../oraInventory. For example, if ORACLE_BASE is set to /opt/oracle/11, then the Oracle Inventory directory is created similar to /opt/oracle/oraInventory.

If you have neither created an OFA-compliant path nor set ORACLE_BASE, then the Oracle Inventory directory is placed in the home directory of the user that is performing the installation. For example:

/home/oracle/oraInventory

Oracle Universal Installer creates the directory that you specify and sets the correct owner, group, and permissions for it. You do not need to create it.

Note:

  • All Oracle software installations rely on this directory. Ensure that you back it up regularly.

  • Do not delete this directory unless you have completely removed all Oracle software from the system.

  • By default, the Oracle Inventory directory is not installed under the Oracle Base directory. This is because all Oracle software installations share a common Oracle Inventory, so there is only one Oracle Inventory for all users. Whereas, there is a separate Oracle Base for each user.

2.10.3 Oracle Home Directory

The Oracle home directory is the directory where you choose to install the software for a particular Oracle product. You must install different Oracle products or different releases of the same Oracle product in separate Oracle home directories. When you run Oracle Universal Installer, it prompts you to specify the path to this directory as well as a name that identifies it. The directory that you specify must be a subdirectory of the Oracle base directory. Oracle recommends that you specify a path similar to the following for the Oracle home directory:

oracle_base/product/11.2.0/dbhome_1

Oracle Universal Installer creates the directory path that you specify under the Oracle base directory. It also sets the correct owner, group, and permissions on it. You do not need to create this directory.

Note:

During installation, you must not specify an existing directory that has predefined permissions applied to it as the Oracle home directory. If you do, then you may experience installation failure due to file and group ownership permission errors.

2.11 Identifying or Creating an Oracle Base Directory

Before starting the installation, you must either identify an existing Oracle base directory or if required, create one. This section contains information about the following:

Note:

You can choose to create an Oracle base directory, even if other Oracle base directories exist on the system.

2.11.1 Identifying an Existing Oracle Base Directory

Existing Oracle base directories may not have paths that comply with OFA (Optimal Flexible Architecture) guidelines. However, if you identify an existing Oracle Inventory directory or existing Oracle home directories, then you can usually identify the Oracle base directories, as follows:

  • Identifying an existing Oracle Inventory directory. Refer to "Creating the Oracle Inventory Group" for more information.

    Note:

    Oracle recommends that you do not put the oraInventory directory under Oracle base for a new installation. However, if you have an existing installation, then you should follow the steps suggested in this section.
  • Identifying an existing Oracle home directory

    Enter the following command to display the contents of the oratab file:

    # more /etc/oratab
    

    If the oratab file exists, then it contains lines similar to the following:

    *:/u03/app/oracle/product/11.2.0/dbhome_1:N
    *:/opt/orauser/infra_904:N
    *:/oracle/9.2.0:N
    

    The directory paths specified on each line identify Oracle home directories. Directory paths that end with the user name of the Oracle software owner that you want to use are valid choices for an Oracle base directory. If you intend to use the oracle user to install the software, then you can choose one of the following directories listed in the previous example:

    /u03/app/oracle
    /oracle
    

    Note:

    If possible, choose a directory path similar to the first one (/u03/app/oracle). This path complies with the OFA guidelines.
  • Identifying an existing Oracle base directory

    After you have located the Oracle home directory, you can run the following command to confirm the location of Oracle base:

    cat inventory/ContentsXML/oraclehomeproperties.xml
    

Before deciding to use an existing Oracle base directory for this installation, ensure that it satisfies the following conditions:

  • It should not be on the same file system as the operating system.

  • It must have sufficient free disk space, as follows:

    Requirement Free Disk Space
    The Oracle base directory will contain only software files. Up to 4 GB
    The Oracle base directory will contain both software and database files (not recommended for production databases). Up to 6 GB

    To determine the free disk space on the file system where the Oracle base directory is located, enter the following command:

    # df -h oracle_base_path
    

To continue:

  • If an Oracle base directory exists and you want to use it, then refer to the "Choosing a Storage Option for Oracle Database and Recovery Files" section.

    When you configure the oracle user's environment later in this chapter, set the ORACLE_BASE environment variable to specify the directory you chose.

  • If an Oracle base directory does not exist on the system or if you want to create an Oracle base directory, then refer to the following section.

2.11.2 Creating an Oracle Base Directory

Before you create an Oracle base directory, you must identify an appropriate file system with sufficient free disk space.

To identify an appropriate file system:

  1. To determine the free disk space on each mounted file system use the following command:

    # df -h
    
  2. From the display, identify a file system that has appropriate free space.

    The file system that you identify can be a local file system, a cluster file system, or an NFS file system on a certified NAS device.

  3. Note the name of the mount point directory for the file system that you identified.

To create the Oracle base directory and specify the correct owner, group, and permissions for it:

  1. Enter commands similar to the following to create the recommended subdirectories in the mount point directory that you identified and set the appropriate owner, group, and permissions on them:

    # mkdir -p /mount_point/app/oracle_sw_owner
    # chown -R oracle:oinstall /mount_point/app/oracle_sw_owner
    # chmod -R 775 /mount_point/app/oracle_sw_owner
    

    For example:

    # mkdir -p /u01/app/oracle
    # chown -R oracle:oinstall /u01/app/oracle
    # chmod -R 775 /u01/app/oracle
    
  2. When you configure the oracle user's environment later in this chapter, set the ORACLE_BASE environment variable to specify the Oracle base directory that you have created.

2.12 Choosing a Storage Option for Oracle Database and Recovery Files

Oracle Database files include data files, control files, redo log files, the server parameter file, and the password file. For all installations, you must choose the storage option that you want to use for Oracle Database files. If you want to enable automated backups during the installation, then you must also choose the storage option that you want to use for recovery files (the fast recovery area). You do not have to use the same storage option for each file type.

Note:

Database files and recovery files are supported on file systems and Automatic Storage Management.

Use the following guidelines when choosing the storage options that you want to use for each file type:

For information about how to configure disk storage before you start the installation, refer to one of the following sections depending on your choice:

2.13 Creating Directories for Oracle Database or Recovery Files

This section contains the following topics:

2.13.1 Guidelines for Placing Oracle Database Files on a File System

If you choose to place the Oracle Database files on a file system, then use the following guidelines when deciding where to place them:

  • The default path suggested by Oracle Universal Installer for the database file directory is a subdirectory of the Oracle base directory.

  • You can choose either a single file system or more than one file system to store the database files:

    • If you want to use a single file system, then choose a file system on a physical device that is dedicated to the database.

      For best performance and reliability, choose a RAID device or a logical volume on more than one physical device and implement the stripe-and-mirror-everything (SAME) methodology.

    • If you want to use more than one file system, then choose file systems on separate physical devices that are dedicated to the database.

      This method enables you to distribute physical input-output operations and create separate control files on different devices for increased reliability. It also enables you to fully implement the OFA guidelines. You can choose the Advanced database creation option to implement this method.

  • If you intend to create a preconfigured database during the installation, then the file system (or file systems) that you choose must have at least 2 GB of free disk space.

    For production databases, you must estimate the disk space requirement depending on the use that you want to make of the database.

  • For optimum performance, the file systems that you choose should be on physical devices that are used only by the database.

  • The oracle user must have write permissions to create the files in the path that you specify.

2.13.2 Creating Required Directories

Note:

You must perform this procedure only if you want to place the Oracle Database or recovery files on a separate file system to the Oracle base directory.

To create directories for the Oracle database, or recovery files on separate file systems to the Oracle base directory:

  1. Use the following to determine the free disk space on each mounted file system:

    # df -h
    
  2. From the display, identify the file systems that you want to use:

    File Type File System Requirements
    Database files Choose either:
    • A single file system with at least 2 GB of free disk space

    • Two or more file systems with at least 2 GB of free disk space in total

    Recovery files Choose a file system with at least 2.4 GB of free disk space

    If you are using the same file system for more than one type of file, then add the disk space requirements for each type to determine the total disk space requirement.

  3. Note the names of the mount point directories for the file systems that you identified.

  4. Enter commands similar to the following to create the recommended subdirectories in each of the mount point directories and set the appropriate owner, group, and permissions on them:

    • Database file directory:

      # mkdir /mount_point/oradata
      # chown oracle:oinstall /mount_point/oradata
      # chmod 775 /mount_point/oradata
      

      The default location for Database file directory is $ORACLE_BASE/oradata.

    • Recovery file directory (fast recovery area):

      # mkdir /mount_point/recovery_area
      # chown oracle:oinstall /mount_point/recovery_area
      # chmod 775 /mount_point/recovery_area
      

      The default fast recovery area is $ORACLE_BASE/recovery_area. However, Oracle recommends that you keep the fast recovery area on a separate physical disk than that of the database file directory. This will enable you use the fast recovery area to retrieve data if the disk containing oradata is unusable due to any reasons.

  5. If you also want to use Automatic Storage Management for storage, then refer to the following section:

    "Preparing Disks for an Automatic Storage Management Installation", else refer to the "Stopping Existing Oracle Processes" section.

2.14 Configuring Storage for Oracle Database Files Using Block Devices

This section describes how to configure Oracle Database files on block devices. Use the following procedure to create block device partitions:

  1. Use fdisk to create disk partitions on block devices for database files.

    If you intend to configure block devices and use Automatic Storage Management to manage data files, then create one partition for each disk comprising the whole disk, and go through the section Configuring Disks for Automatic Storage Management with ASMLIB in Oracle Grid Infrastructure Installation Guide.

  2. Create or modify a rules file in /etc/udev/rules.d, to change the permissions of the datafiles from default root ownership.

    Ensure that the file you create is appropriate for your distribution. For example, name this file 99-oracle.rules on Asianux, Red Hat Enterprise Linux, and Oracle Enterprise Linux, or 40-oracle.rules on SUSE Enterprise Server systems.

    Example 2-1 Example of a Rules File With User oracle

    /etc/udev/rules.d/99-oracle.rules
    #
    # ASM disks
    KERNEL=="sdb[6-9]", OWNER="oracle", GROUP="dba", MODE="0660"
    KERNEL=="sdb10", OWNER="oracle", GROUP="dba", MODE="0660"
    

    Example 2-2 Example of a Rules File With User grid

    /etc/udev/rules.d/99-oracle.rules
    #
    # ASM disks
    KERNEL=="sdb[6-9]", OWNER="grid", GROUP="asmadmin", MODE="0660"
    KERNEL=="sdb10", OWNER="grid", GROUP="asmadmin", MODE="0660"
    

    See Also:

    Chapter 2, "Preparing Storage for ASM" in the Oracle Database Storage Administrator's Guide for information on preparing the storage subsystem before you configure Automatic Storage Management.

2.15 Configuring Disk Devices for Oracle Database

The O_DIRECT parameter enables direct read and writes to block devices, avoiding kernel overhead. With Oracle Database Release 10.2 and later, Oracle Database files are configured by default to use direct input/output.

With the 2. 6 kernel or later for Red Hat Enterprise Linux, Oracle Enterprise Linux, and SUSE Enterprise Server, you must create a permissions file to maintain permissions on Oracle database files. If you do not create this permissions file, then permissions on disk devices revert to their default values, root:disk, and Oracle database fails to start. Use the following steps to set the permissions file number:

To configure a permissions file for disk devices, complete the following tasks:

See Also:

Oracle Grid Infrastructure Installation Guide for information about configuring storage for Oracle database files on shared storage devices.

2.15.1 Example of Creating a Udev Permissions File for Oracle Database

Refer to the examples in "Configuring Storage for Oracle Database Files Using Block Devices" for more information on creating a permissions file.

2.15.2 Example of Configuring Block Device Storage for Oracle Database

The following is the procedure to create partitions for Oracle Database files on block devices:

  1. Log in as root

  2. Enter the fdisk command to format a specific storage disk. For example, /sbin/fdisk /dev/sdb

  3. Create a partition. For instance, make a partition of 280 MB for data files.

  4. Use the command similar to the following to update the kernel partition table for the shared storage device:

    /sbin/partprobe diskpath
    

The following is an example of how to use fdisk to create one partition on a shared storage block disk device for a data file:

$ sudo sh
Password:
# /sbin/fdisk /dev/sdb
The number of cylinders for this disk is set to 1024.
Command (m for help): n
Command action
  e   extended
  P   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1024, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4462, default 1)
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1024, default 4462): using default value 4462

Command (m for help):w

The partition table has been altered!
Calling ioctl () to re-read partition table.
Synching disks.
# exit
Last login Wed Feb 21 20:23:01 from localnode
$ sudo sh
Password:
# /sbin/partprobe /dev/sdb1

2.16 Stopping Existing Oracle Processes

Note:

  • If you plan to use Oracle Restart, you must install the grid infrastructure before you install the database. As such, when you perform a database installation, then the database uses the same listener created during the grid infrastructure installation and you do not have to perform the steps listed in this section. Refer to "Configuring the oracle User's Environment" to continue.

  • If you are installing additional Oracle Database 11g products in an existing Oracle home, then stop all processes running in the Oracle home. You must complete this task to enable Oracle Universal Installer to relink certain executables and libraries.

If you choose to create a database during the installation, then most installation types configure and start a default Oracle Net listener using TCP/IP port 1521 and the IPC key value EXTPROC. However, if an existing Oracle Net listener process is using the same port or key value, Oracle Universal Installer will look for the next available free port (for example, 1522) and will configure and start the new listener on this available free port.

To determine whether an existing listener process is running and to shut it down, if necessary:

  1. Switch user to oracle:

    # su - oracle
    
  2. Enter the following command to determine whether a listener process is running and to identify its name and the Oracle home directory in which it is installed:

    $ ps -ef | grep tnslsnr
    

    This command displays information about the Oracle Net listeners running on the system:

    ... oracle_home1/bin/tnslsnr LISTENER -inherit
    

    In this example, oracle_home1 is the Oracle home directory where the listener is installed and LISTENER is the listener name.

    Note:

    If no Oracle Net listeners are running, then refer to the "Configuring the oracle User's Environment" section to continue.
  3. Set the ORACLE_HOME environment variable to specify the appropriate Oracle home directory for the listener:

    • Bourne, Bash, or Korn shell:

      $ ORACLE_HOME=oracle_home1
      $ export ORACLE_HOME
      
    • C or tcsh shell:

      % setenv ORACLE_HOME oracle_home1
      
  4. Enter the following command to identify the TCP/IP port number and IPC key value that the listener is using:

    $ $ORACLE_HOME/bin/lsnrctl status listenername
    

    Note:

    If the listener uses the default name LISTENER, then you do not have to specify the listener name in this command.
  5. Enter a command similar to the following to stop the listener process:

    $ $ORACLE_HOME/bin/lsnrctl stop listenername
    
  6. Repeat this procedure to stop all listeners running on this system.

2.17 Configuring the oracle User's Environment

You run Oracle Universal Installer from the oracle account. However, before you start Oracle Universal Installer you must configure the environment of the oracle user. To configure the environment, you must:

To set the oracle user's environment:

  1. Start a new terminal session, for example, an X terminal (xterm).

  2. Enter the following command to ensure that X Window applications can display on this system:

    $ xhost fully_qualified_remote_host_name
    

    For example:

    $ xhost somehost.us.example.com
    
  3. If you are not already logged in to the system where you want to install the software, then log in to that system as the oracle user.

  4. If you are not logged in as the oracle user, then switch user to oracle:

    $ su - oracle
    
  5. To determine the default shell for the oracle user, enter the following command:

    $ echo $SHELL
    
  6. To run the shell startup script, enter one of the following commands:

    • Bash shell:

      $ . ./.bash_profile
      
    • Bourne or Korn shell:

      $ . ./.profile
      
    • C shell:

      % source ./.login
      
  7. If you are not installing the software on the local computer, then run the following command on the remote machine to set the DISPLAY variable:

    • Bourne, Bash or Korn shell:

      $ export DISPLAY=local_host:0.0      
      
    • C shell:

      % setenv DISPLAY local_host:0.0
      

    In this example, local_host is the host name or IP address of the local computer that you want to use to display Oracle Universal Installer.

    Run the following command on the remote machine to check if the shell and the DISPLAY environmental variable are set correctly:

    echo $SHELL
    echo $DISPLAY
    

    Now to enable X applications, run the following commands on the local computer:

    $ xhost + fully_qualified_remote_host_name
    

    To verify that X applications display is set properly, run a X11 based program that comes with the operating system such as xclock:

    $ xclock_path
    

    In this example, xclock_path is the directory path. For example, you can find xclock at /usr/X11R6/bin/xclocks. If the DISPLAY variable is set properly, then you can see xclock on your computer screen.

    See Also:

    PC-X Server or operating system vendor documents for further assistance
  8. If you determined that the /tmp directory has less than 1 GB of free disk space, then identify a file system with at least 1 GB of free space and set the TMP and TMPDIR environment variables to specify a temporary directory on this file system:

    1. To determine the free disk space on each mounted file system use the following command:

      # df -h /tmp
      
    2. If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:

      $ sudo mkdir /mount_point/tmp
      $ sudo chmod a+wr /mount_point/tmp
      # exit
      
    3. Enter commands similar to the following to set the TMP and TMPDIR environment variables:

      • Bourne, Bash, or Korn shell:

        $ TMP=/mount_point/tmp
        $ TMPDIR=/mount_point/tmp
        $ export TMP TMPDIR
        
      • C shell:

        % setenv TMP /mount_point/tmp
        % setenv TMPDIR /mount_point/tmp
        
  9. Enter commands similar to the following to set the ORACLE_BASE and ORACLE_SID environment variables:

    • Bourne, Bash, or Korn shell:

      $ ORACLE_BASE=/u01/app/oracle
      $ ORACLE_SID=sales
      $ export ORACLE_BASE ORACLE_SID
      
    • C shell:

      % setenv ORACLE_BASE /u01/app/oracle
      % setenv ORACLE_SID sales
      

    In these examples, /u01/app/oracle is the Oracle base directory that you created or identified earlier and sales is the name that you want to call the database (typically no more than five characters).

  10. Enter the following commands to ensure that the ORACLE_HOME and TNS_ADMIN environment variables are not set:

    • Bourne, Bash, or Korn shell:

      $ unset ORACLE_HOME
      $ unset TNS_ADMIN
      
    • C shell:

      % unsetenv ORACLE_HOME
      % unsetenv TNS_ADMIN
      

    Note:

    If the ORACLE_HOME environment variable is set, then Oracle Universal Installer uses the value that it specifies as the default path for the Oracle home directory. However, if you set the ORACLE_BASE environment variable, then Oracle recommends that you unset the ORACLE_HOME environment variable and choose the default path suggested by Oracle Universal Installer.

See Also:

"Configuring the User's Environment" for information about setting the grid infrastructure software owner user's environment