2 Preinstallation Tasks

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

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 the following procedure:

  1. Log in to the system as a user that is a member of the admin group.

  2. Start a local terminal session (/Applications/Utilities/Terminal).

  3. If you are not logged in as the root user, then enter the following command to start a shell session with root privileges:

    $ sudo sh

  4. When prompted, enter your password.

Note:

Alternatively, if you are logged in as a user who is a member of the admin group, then use the sudo command to run commands as the root user, as follows:

$ sudo /usr/sbin/sysctl -a

Checking the Hardware Requirements

The system must meet the following minimum hardware requirements:

  • At least 1 GB of physical RAM

  • Amount of swap space configured must be at least the same amount as that of the physical RAM installed

  • 400 MB of disk space in the /tmp directory

  • Between 1.5 GB and 3.5 GB of disk space for the Oracle software, depending on the installation type

  • 1.2 GB of disk space for a preconfigured database that uses file system storage (optional)

To ensure that the system meets the hardware requirements, perform the following steps:

  1. To determine the physical RAM size, use System Profiler (/Applications/Utilities/System Profiler) or enter the following command:

    # /usr/sbin/system_profiler SPHardwareDataType | grep Memory
    

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

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

    # df -h /
    

    Note:

    Mac OS X dynamically creates swap files as required in /private/var/vm directory. Ensure that you have at least the same amount of disk space as the physical memory installed on the root (/) file system to accommodate the swap files that are created.
  3. To determine the amount of free disk space on the system, enter the following command:

    # df -h
    

    The following table shows the approximate disk space requirements for software files for each installation type:

    Installation Type Requirement for Software Files (GB)
    Enterprise Edition 1.5
    Standard Edition 1.5
    Custom (max) 2.0

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

    # uname -p
    

    Note:

    This command displays the processor type. The command output must be i386. If you do not see the expected output, then you cannot install the software on this system.

Checking the Software Requirements

You must verify that the following software is installed on the system. The procedure following the table describes how to verify these requirements.

Item Requirement
Operating system Apple Mac OS X Server 10.5.4
Tools
  • Xcode 3.0 or later
  • GNU C compiler (gcc) version 4.0.1 or later

    This version of gcc is included in Xcode 3.0 or later.

  • JDK 1.4.2_16

Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface The version of the GNU C and C++ compiler listed previously is supported for use with these products.
Oracle JDBC/OCI Drivers You must use the following JDK version with the Oracle JDBC/OCI drivers:
  • JDK 1.4.2 with the JNDI extension


To determine the operating system version, enter the following command:

  • # sw_vers

    The output of this command must be similar to the following:

    ProductName:    Mac OS X Server
    ProductVersion: 10.5.4
    BuildVersion:   9E17
    

Note:

Only the versions listed in the previous table are supported. Do not install the software on other versions of Apple Mac OS X.

Checking the Network Setup

Typically, the computer on which Oracle Database is to be installed, is connected to the network, has local storage to contain the Oracle Database installation, has a display monitor, and has a CD-ROM or DVD drive.

This section describes how to install Oracle Database on computers that do not meet the typical scenario. It covers the following cases:

Configuring Name Resolution

When you run Oracle Universal Installer, an error may occur if name resolution is not set up. To avoid this error, before you begin installation, you must ensure that host names are resolved only through the /etc/hosts file.

To ensure that host names are resolved only through the /etc/hosts file:

  1. Verify that the /etc/hosts file is used for name resolution. You can do this by using the following command:

    # dscacheutil -configuration
    

    The output of this command must contain /BSD/local.

  2. Verify that the host name has been set by using the hostname command as follows:

    # hostname
    

    The output of this command must be similar to the following:

    myhost.mycomputer.com
    
  3. Verify that the domain name has not been set dynamically by using the domainname command as follows:

    # domainname
    

    This command must not return any results.

  4. Verify that the hosts file contains the fully qualified host name by using the following command:

    # cat /etc/hosts | grep `eval hostname`
    

    The output of this command must contain an entry for the fully qualified host name and for localhost.

    For example:

    192.168.100.16    myhost.us.mycompany.com   myhost
    127.0.0.1         localhost                 localhost.localdomain
    

    If the hosts file does not contain the fully qualified host name, then open the file and make the required changes in it.

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 that computer a unique IP address.

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 if clients are able to access the computer, ping the host name from the client computers using the short name (hostname only) and the full name (hostname 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.acme.com, then enter the following commands:

For Bourne, Bash, or Korn shell:

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

For C shell:

% setenv ORACLE_HOSTNAME somehost.us.acme.com

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 is to be used.

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 the database is to be installed, 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 must be in the /etc/hosts file.

Note:

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

If the ping command fails, then contact your network 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 your 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.

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.

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

  • The OSDBA group (dba)

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

    To specify a group name other than the default dba group, you must choose the Custom installation type to install the software or start Oracle Universal Installer as a user that is not a member of this group. In this case, Oracle Universal Installer prompts you to specify the name of this group.

  • The OSOPER group (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). By default, members of the OSDBA group also have the SYSOPER privilege.

    To specify a separate OSOPER group, other than the default dba group, you must choose the Custom installation type to install the software or start Oracle Universal Installer as a user that is not a member of the dba group. In this case, Oracle Universal Installer prompts you to specify the name of this group. Usually, oper is chosen as the group name.

  • An unprivileged user

    Verify that the unprivileged user nobody exists on the system. The nobody user must own the external jobs (extjob) executable after the installation.

The following operating system group and user are required for all installations:

  • The Oracle Inventory group (typically, oinstall)

    You must create this group the first time you install Oracle software on the system. The usual name chosen for this group is oinstall. This group owns the Oracle inventory, which is a catalog of all Oracle software installed on the system.

    Note:

    If Oracle software is already installed on the system, then the existing Oracle Inventory group must be the primary group of the operating system user that you use to install new Oracle software.
  • The Oracle software owner user (typically, oracle)

    You must create this user the first time you install Oracle software on the system. This user owns all of the software installed during the installation. This user must have the Oracle Inventory group as its primary group. It must also have the OSDBA and OSOPER groups as secondary groups.

    Note:

    In Oracle documentation, this user is referred to as the oracle user.

A single Oracle Inventory group is required for all installations of Oracle software on the system. After the first installation of Oracle software, you must use the same Oracle Inventory group for all subsequent Oracle software installations on that system. However, you can choose to create different Oracle software owner users, OSDBA groups, and OSOPER groups (other than oracle, dba, and oper) for separate installations. By using different groups for different installations, members of these different groups have DBA privileges only on the associated databases rather than on all databases on the system.

See Also:

Oracle Database Administrator's Reference for UNIX-Based Operating Systems and Oracle Database Administrator's Guide for more information about the OSDBA and OSOPER groups and the SYSDBA and SYSOPER privileges

Note:

The following sections describe how to create local users and groups. As an alternative to creating local users and groups, you could create the appropriate users and groups in a directory service, for example, Network Information Services (NIS). For information about using directory services, contact your system administrator or refer to your operating system documentation.

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

Creating the Oracle Inventory Group

You must create the Oracle Inventory group if it does not exist. The following subsections describe how to determine the Oracle Inventory group name, if it exists, and how to create it if necessary.

Determining Whether the Oracle Inventory Group Exists

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 and the path of the Oracle Inventory directory.

To determine whether the Oracle Inventory group exists, enter the following command:

# more  /var/opt/oracle/oraInst.loc

If the output of this command shows the oinstall group name, then the group exists.

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

inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

The inst_group parameter shows the name of the Oracle Inventory group, oinstall.

Creating the Oracle Inventory Group

If the oraInst.loc file does not exist, then create the Oracle Inventory group by using either of the following methods:

  • Use Workgroup Manager (/Applications/Server/Workgroup Manager) to create a group called oinstall.

  • Use command-line utilities to create the Oracle Inventory group:

    1. Enter the following command to list existing groups and group IDs (GIDs):

      # dscl . -list /groups gid name | more
      
    2. Identify an unused GID for the new Oracle Inventory group.

    3. Enter commands similar to the following to create the oinstall group:

      # dscl . -create /groups/oinstall
      # dscl . -append /groups/oinstall gid gid_number
      # dscl . -append /groups/oinstall passwd "*"
      

Creating the OSDBA Group

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 in a new Oracle installation

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

  • Use Workgroup Manager to create a group called dba.

  • Use command-line utilities to create the OSDBA group:

    1. Enter the following command to list existing groups and GIDs:

      # dscl . -list /groups gid name | more
      
    2. Identify an unused GID for the new OSDBA group.

    3. Enter commands similar to the following to create the dba group:

      # dscl . -create /groups/dba
      # dscl . -append /groups/dba gid gid_number
      # dscl . -append /groups/dba passwd "*"
      

Creating an OSOPER Group (Optional)

Create an OSOPER group only 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, then create it as follows. In the following command, use the group name oper unless a group with that name exists.

  • Use Workgroup Manager to create a group called oper.

  • Use command-line utilities to create the OSOPER group:

    1. Enter the following command to list existing groups and GIDs:

      # dscl . -list /groups gid name | more
      
    2. Identify an unused GID for the new OSOPER group.

    3. Enter commands similar to the following to create the oper group:

      # dscl . -create /groups/oper
      # dscl . -append /groups/oper gid gid_number
      # dscl . -append /groups/oper passwd "*"
      

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

Determining Whether an Oracle Software Owner User Exists

To determine whether an Oracle software owner user named oracle exists, enter the following command:

# id oracle

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

uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)

If the user exists, then determine whether to use the existing user or create another oracle user. To use the existing user, ensure that the user's primary group is the Oracle Inventory group. Refer to one of the following sections for more information:

Note:

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

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, then create it as follows. In the following procedure, use the user name oracle unless a user with that name exists.

  • Use Workgroup Manager to create a user with the following properties:

    Property Recommended Value
    Name Oracle Software Owner
    Short name oracle
    Password Specify and verify a password for the oracle user
    Primary group oinstall
    Default shell Any supported shell, for example /bin/tcsh or /bin/bash
    Home directory A home directory consistent with other user home directories, for example /Users/oracle

  • Use command-line utilities to create the Oracle software owner user:

    1. Enter the following command to list existing users and user IDs (UIDs):

      # dscl . -list /users uid name | more
      
    2. Identify an unused UID for the new Oracle software owner user.

    3. Enter commands similar to the following to create the oracle user:

      # dscl . -create /users/oracle
      # dscl . -append /users/oracle uid uid_number
      # dscl . -append /users/oracle gid oinstall_gid
      # dscl . -append /users/oracle shell /bin/bash
      # dscl . -append /users/oracle home /Users/oracle
      # dscl . -append /users/oracle realname "Oracle software owner"
      
    4. Create the home directory for the oracle user and change the owner and group on that directory:

      # mkdir /Users/oracle
      # chown oracle:oinstall /Users/oracle
      
    5. Set the password for the oracle user:

      # passwd oracle
      

Refer to the "Identifying Required Software Directories" to continue.

Modifying an Oracle Software Owner User

If the oracle user exists, but its primary group is not oinstall, then use either of the following methods to modify it:

  • Use Workgroup Manager to modify the oracle user, specifying oinstall as the Primary group.

  • Use command-line utilities to modify the oracle user:

    1. Enter the following command to determine the GID of the oinstall group:

      # dscl . -list /groups/oinstall gid name | more
      
    2. Enter the following command to change the GID of the oracle user to the GID of the oinstall group:

      # dscl . -delete /users/oracle gid
      # dscl . -append /users/oracle gid oinstall_gid
      

Configuring Kernel Parameters

Note:

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

Verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. The procedure following the table describes how to verify and set the values.

Parameter Value
kern.sysv.semmsl 87381
kern.sysv.semmns 87381
kern.sysv.semmni 87381
kern.sysv.semmnu 87381
kern.sysv.semume 10
kern.sysv.shmall 2097152
kern.sysv.shmmax Half the size of physical memory (in bytes)
kern.sysv.shmmni 4096
kern.maxfiles 65536
kern.maxfilesperproc 65536
net.inet.ip.portrange.first 1024
net.inet.ip.portrange.last 65000
kern.corefile core
kern.maxproc 2068
kern.maxprocperuid 2068

Note:

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

To view the current value specified for these kernel parameters, and to change them if necessary:

  1. Enter the commands shown in the following table to view the current values of the kernel parameters:

    Note:

    Make a note of the current values and identify any values that you must change.
    Parameter Command
    kern.sysv.semmsl, kern.sysv.semmns, kern.sysv.semmni, kern.sysv.semmnu, kern.sysv.semume # /usr/sbin/sysctl -a | grep sem

    This command displays the value of the semaphore parameters.

    kern.sysv.shmall, kern.sysv.shmmax, kern.sysv.shmmni # /usr/sbin/sysctl -a | grep shm

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

    kern.maxfiles, kern.maxfilesperproc # /usr/sbin/sysctl -a | grep maxfiles

    This command displays the maximum number of file handles.

    net.inet.ip.portrange.first, net.inet.ip.portrange.last # /usr/sbin/sysctl -a | grep net.inet.ip.portrange

    This command displays the current port number.

    kern.corefile # /usr/sbin/sysctl -a | grep corefile
    kern.maxproc, kern.maxprocperuid # /usr/sbin/sysctl -a | grep maxproc

  2. If the value of any kernel parameter is different from the recommended value, then complete either of the following procedure:

    • Use the following command as a root user, to set the values of the kernel parameters:

      # /usr/sbin/sysctl -w parameter_name=parameter_value
      
    • Use any text editor, to 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 to be changed. However, if any of the current values are larger than the recommended value, then specify the larger value.
      kern.sysv.semmsl=87381
      kern.sysv.semmns=87381
      kern.sysv.semmni=87381
      kern.sysv.semmnu=87381
      kern.sysv.semume=10
      kernel.shmall=2097152
      kernel.sys.shmmax=2147483648
      kernel.sys.shmmni=4096
      kern.maxfiles=65536
      kern.maxfilesperproc=65536
      net.inet.ip.portrange.first=1024
      net.inet.ip.portrange.last=65000
      kern.corefile=core
      kern.maxproc=2068
      kern.maxprocperuid=2068
      

      If you specify the values in the /etc/sysctl.conf file, then the changed values persist when you restart the system.

Setting Shell Limits for the oracle User

To improve the performance of the software on Apple Mac OS X (Intel) systems, you must increase the following shell limits for the oracle user:

Shell Limit Hard Limit
Maximum number of open file descriptors 65536
Maximum number of processes available to a single user 2068

To increase the shell limits:

  1. Change directory to the following directory:

    # cd /System/Library/StartupItems/IPServices

  2. Open the IPServices script using any text editor.

  3. Add the following ulimit commands to the start of the StartService function in this script:

    ulimit -Hu 2068
    ulimit -Su 2068
    ulimit -Hn 65536
    ulimit -Sn 65536
    
  4. Add the same ulimit commands to the /etc/rc script, before the SystemStarter command.

Identifying Required Software Directories

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

Oracle Base Directory

The Oracle base directory is a top-level directory for Oracle software installations. It is analogous to the C:\Oracle directory used for Oracle software installations on Microsoft Windows systems. On Apple Mac OS X (Intel) 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/oracle_sw_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 could choose another mount point directory, such as /oracle or /opt/oracle.

  • oracle_sw_owner is the operating system user name of the Oracle software owner, for example oracle.

You can use the same Oracle base directory for multiple installations 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 example Oracle base directories could all exist on the same system:

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

The following sections describe how to identify existing Oracle base directories that may be suitable for your installation and how to create an Oracle base directory if necessary.

Regardless of whether you create an Oracle base directory or decide to use an existing one, you must set the ORACLE_BASE environment variable to specify the full path to this directory.

Oracle Inventory Directory

The Oracle Inventory directory (oraInventory) stores an inventory of all software installed on the system. It is required by, and shared by, all Oracle software installations on a single system. The first time you install Oracle software on a system, Oracle Universal Installer prompts you to specify the path to this directory. Oracle recommends that you choose the following path:

oracle_base/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.

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, and also 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/10.2.0/db_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.

Caution:

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.

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.

Identifying an Existing Oracle Base Directory

Existing Oracle base directories may not have paths complying with OFA 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

    Enter the following command to view the contents of the oraInst.loc file:

    # more /var/opt/oracle/oraInst.loc
    

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

    inventory_loc=/u01/app/oracle/oraInventory
    inst_group=oinstall
    

    The inventory_loc parameter identifies the Oracle Inventory directory (oraInventory). The parent directory of the oraInventory directory is typically an Oracle base directory. In the previous example, /u01/app/oracle is an Oracle base directory.

  • Identifying existing Oracle home directories

    Enter the following command to view 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/10.2.0/db_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 to be used are valid choices for an Oracle base directory. If you intend to use the oracle user to install the software, then choose either of the following directories from the previous example:

    /u03/app/oracle
    /oracle
    

    Note:

    If possible, choose a directory path similar to the first (/u03/app/oracle). This path complies with the OFA guidelines.

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

  • It must 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 contains only software files. Up to 3 GB
    The Oracle base directory contains both software and database files (not recommended for production databases). Up to 4 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.

Creating an Oracle Base Directory

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

Requirement Free Disk Space
The Oracle base directory contains only software files. Up to 3 GB, depending on the platform
The Oracle base directory contains both software and database files (not recommended for production databases). Up to 4 GB, depending on the platform

To identify an appropriate file system:

  1. Use the df -h command to determine the free disk space on each mounted file system.

  2. From the display, identify a file system that has appropriate free space.

  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, if the mount point you identify is /u01 and oracle is the user name of the Oracle software owner, then the recommended Oracle base directory path is as follows:

    /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.

Choosing a Storage Option for Oracle Database and Recovery Files

The File System storage option is supported for storing Oracle Database files and Oracle Database 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 to be used for Oracle Database files. For enabling automated backups during the installation, you must also choose the storage option for recovery files (the flash recovery area). You do not have to use the same storage option for each file type.

Important:

Database files, and recovery files are supported on file systems.

For more information about storage options, refer to the "Database Storage Options" section.

For information about how to configure disk storage before you start the installation, refer to the following section:

Creating Directories for Oracle Database or Recovery Files

This section contains the following topics:

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 multiple file systems to store the database files:

    • To use a single file system, 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 multiple physical device and implement the stripe-and-mirror-everything (SAME) methodology.

    • To use multiple file systems, choose file systems on separate physical devices that are dedicated to the database.

      This method enables you to distribute physical I/O and create separate control files on different devices for increased reliability. It also enables you to fully implement the OFA guidelines described in Appendix C, "Optimal Flexible Architecture". You must choose either the Advanced database creation option or the Custom installation type during the installation to implement this method.

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

    For production databases, you must estimate the disk space requirement depending on what the database would be used for.

  • For optimum performance, the file systems that you choose must 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.

Guidelines for Placing Oracle Recovery Files on a File System

Note:

You must choose a location for recovery files only if you intend to enable automated backups during the installation.

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

  • To prevent disk failure from making both the database files and the recovery files unavailable, place the recovery files in a file system on a different physical disk from the database files.

    The file system that you choose must have at least 2 GB of free disk space.

    The disk space requirement is the default disk quota configured for the flash recovery area (specified by the DB_RECOVERY_FILE_DEST_SIZE initialization parameter).

    If you choose the Custom installation type or the Advanced database configuration option, then you can specify a different disk quota value.

    See Also:

    Oracle Database Backup and Recovery Basics for more information about sizing the flash recovery area
  • The default path suggested by Oracle Universal Installer for the flash recovery area is a subdirectory of the Oracle base directory.

    This default location is not recommended for production databases.

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

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 df -h command to determine the free disk space on each mounted file system.

  2. From the display, identify the file systems that to be used:

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

    • Two or more file systems with at least 1.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 multiple type of files, 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
      
    • Recovery file directory (flash recovery area):

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

Stopping Existing Oracle Processes

Caution:

If you are installing additional Oracle Database 10g 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, then Oracle Universal Installer can only configure the new listener; it cannot start it. To ensure that the new listener process starts during the installation, you must shut down any existing listener before starting Oracle Universal Installer.

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:

    • For Bourne, Bash, or Korn shell:

      $ ORACLE_HOME=oracle_home1
      $ export ORACLE_HOME
      
    • For 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.

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:

  • Set the default file mode creation mask (umask) to 022 in the shell startup file.

  • Set the DISPLAY environment variable.

To set the oracle user's environment:

  1. Start a new terminal session.

  2. 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.

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

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

    $ echo $SHELL
    
  5. Open the oracle user's shell startup file in any text editor:

    Note:

    On MAC OS X .bash_profile is the user startup file for the Bash shell.
    • For Bourne shell (sh), Bash shell (bash), or Korn shell (ksh):

      $ vi .bash_profile
      
    • For C shell (csh or tcsh):

      % vi .login
      
  6. Enter or edit the following line, specifying a value of 022 for the default file mode creation mask:

    umask 022
    
  7. If the ORACLE_SID, ORACLE_HOME, or ORACLE_BASE environment variable is set in the file, then remove the appropriate lines from the file.

  8. Save the file, and exit from the editor.

  9. To run the shell startup script, enter the following commands:

    • For Bash shell:

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

      $ . ./.profile
      
    • For C shell:

      % source ./.login
      
  10. If you determined that the /tmp directory has less than 400 MB of free disk space, then identify a file system with at least 400 MB of free space and set the TMP and TMPDIR environment variables to specify a temporary directory on this file system:

    1. Use the df -h command to identify a suitable file system with sufficient free space.

    2. If necessary, enter commands similar to the following to create a temporary directory on the file system that you identify, and then set the appropriate permissions on the directory:

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

      • For Bourne, Bash, or Korn shell:

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

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

    • For Bourne, Bash, or Korn shell:

      $ ORACLE_BASE=/u01/app/oracle
      $ ORACLE_SID=sales
      $ export ORACLE_BASE ORACLE_SID
      
    • For 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 of the database (typically no more than five characters).

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

    • For Bourne, Bash, or Korn shell:

      $ unset ORACLE_HOME
      $ unset TNS_ADMIN
      
    • For 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.
  13. To verify that the environment has been set correctly, enter the following commands:

    $ umask
    $ env | more
    

    Verify that the umask command displays a value of 22, 022, or 0022 and the environment variables that you set in this section have the correct values.