Skip Headers
Oracle® Database Installation Guide
10g Release 1 (10.1) for Apple Mac OS X
Part No. B13953-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

2 Pre-installation Tasks

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

Log 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, follow these steps:

  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, 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, you can use the sudo command to run commands as the root user, as follows:
$ sudo /usr/sbin/sysctl -a

Check the Hardware Requirements

The system must meet the following minimum hardware requirements:

To ensure that the system meets these requirements, follow these 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 installed in the system is less than the required size, you must install more memory before continuing.

  2. To ensure that the system has enough swap space, enter the following command:

    # df -h /
    
    

    Note:

    Mac OS X dynamically creates swap files as required in the /private/var/vm directory. Make sure that you have at least 1 GB of available disk space on the root (/) file system to accommodate newly created swap files.

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

    # df -h /tmp
    
    

    If there is less than 400 MB of disk space available in the /tmp directory, complete one of the following steps:

    • Delete unnecessary files from the /tmp directory to achieve the required disk space.

    • Set the TEMP and TMPDIR environment variables when setting the oracle user's environment (described later).

    • Extend the file system that contains the /tmp directory. If necessary, contact your system administrator for information about extending file systems.

  4. 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.0
    Standard Edition 1.0
    Custom (maximum) 1.0

Check the Software Requirements

Check that the required software and patches are installed on the system.

Check for Required Software

Depending on the products that you intend to install, verify that the following software is installed on the system. The procedure following the table describes how to check these requirements.

Installation Type or Product Requirement
All installations The following operating system version:

Apple Mac OS X Server 10.3.6

All Installations The following software (or a higher version) must be installed:
  • Xcode Tools 1.1 or higher

  • GNU C compiler (gcc) version 3.3 20030304 (Apple Computer, Inc. build 1635)

    This version of gcc is included in Xcode Tools 1.2 or higher or in the Dec 2003 gccLongBranch Tools update.

PL/SQL native compilation,
Pro*C/C++,
Oracle Call Interface,
Oracle C++ Call Interface,
Oracle XML Developer's Kit (XDK)
The version of the GNU C and C++ compiler listed previously is supported for use with these products.
Oracle Spatial The following software is required to build the Oracle Spatial sample programs:
  • X11 for Mac OS X and X11 SDK for Mac OS X

  • OpenMotif 2.2.3 or higher

Note: This software is required only to build the sample programs. For information about obtaining OpenMotif, see the following Web site:

http://darwinports.opendarwin.org/

To ensure that the system meets these requirements, follow these steps:

  1. To determine the version of the operating system, enter the following command:

    # sw_vers
    

    Note:

    Only Mac OS X Server is supported.

  2. To determine whether the required version of gcc is installed, enter the following command:

    # gcc -v
    
    

    This command returns output similar to the following:

    Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
    Thread model: posix
    gcc version 3.3 20030304 (Apple Computer, Inc. build 1635) (-mlongcall)
    
    

    If the required version (including the date and build number) or a later version is not installed, download and install either of the following:

    • The Dec 2003 gccLongBranch Tools update

    • Xcode Tools 1.2 or higher, which includes the correct version of gcc

    You can download this software from the Apple Developer Connection Web site:

    http://connect.apple.com
    
    

    After you log in, choose Download Software, then Developer Tools to display the download page.

Create Required UNIX Groups and User

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 UNIX groups and a UNIX user.

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

The following UNIX group and user are required for all installations:

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:

The Oracle Database Administrator's Reference for UNIX Systems and the Oracle Database Administrator's Guide contain more information about the OSDBA and OSOPER groups and the SYSDBA and SYSOPER privileges.

The following sections describe how to create the required UNIX user and groups.


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, lightweight directory access protocol (LDAP) or Network Information Services (NIS). For information about using directory services, contact your system administrator or see your operating system documentation.

Creating the Oracle Inventory Group

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

Determine Whether the Oracle Inventory Group Exists

When you install Oracle software on the system for the first time, the 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 oraInst.loc file exists, the output from this command is similar to the following:

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

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

Create the Oracle Inventory Group

If the oraInst.loc file does not exist, use one of the following methods to create the Oracle Inventory group:


Note:

Oracle recommends that you use the group name oinstall for the Oracle Inventory group.

  • 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):

      # nireport . /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:

      # nicl . -create /groups/oinstall
      # nicl . -append /groups/oinstall gid gid_number
      # nicl . -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 UNIX users database administrative privileges in a new Oracle installation

If the OSDBA group does not exist or if you require a new OSDBA group, create it as follows. In the following procedures, use the group name dba unless a group with that name already 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:

      # nireport . /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:

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

Creating an OSOPER Group (Optional)

Create an OSOPER group only if you want to identify a group of UNIX 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, 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 UNIX users database operator privileges in a new Oracle installation

If you require an new OSOPER group, create it as follows. In the following procedures, use the group name oper unless a group with that name already 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:

      # nireport . /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:

      # nicl . -create  /groups/oper
      # nicl . -append /groups/oper gid gid_number
      # nicl . -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 UNIX user, with different group membership, to give database administrative privileges to those groups in a new Oracle Database installation

Determine Whether an Existing 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, 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, determine whether you want to use the existing user or create a new user. If you want to use the existing user, ensure that the user's primary group (gid) is the Oracle Inventory group and that it is a member of the appropriate OSDBA and OSOPER groups. See one of the following sections for more information:


Note:

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

Create a New Oracle Software Owner User

If the Oracle software owner user does not exist or if you require a new Oracle software owner user, create it as follows. In the following procedures, use the user name oracle unless a user with that name already 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
    Other groups The OSDBA group (dba), and optionally the OSOPER group (oper) if you created it
    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):

      # nireport . /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:

      # nicl . -create /users/oracle
      # nicl . -append /users/oracle uid uid_number
      # nicl . -append /users/oracle gid oinstall_gid
      # nicl . -append /users/oracle shell /bin/bash
      # nicl . -append /users/oracle home /Users/oracle
      # nicl . -append /users/oracle realname "Oracle software owner"
      
      
    4. Enter commands similar to the following to add the oracle user to the OSDBA and OSOPER groups (dba and oper):

      # nicl . -append /groups/dba users oracle
      # nicl . -append /groups/oper users oracle
      
      
    5. 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
      
      
    6. Set the password for the oracle user:

      # passwd oracle
      
      

See the "Verifying That the UNIX User nobody Exists" section to continue.

Modify 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, you can use one of the following methods to modify it:

  • Use Workgroup Manager to modify the oracle user, specifying oinstall as the Primary group and the appropriate OSDBA or OSOPER groups, for example dba and oper, as secondary groups.

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

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

      # nireport . /groups/oinstall gid name
      
      
    2. Enter the following command to change the GID of the oracle user to the GID of the oinstall group:

      # nicl . -delete /users/oracle gid
      # nicl . -append /users/oracle gid oinstall_gid
      
      
    3. If necessary, enter the following commands to add the oracle user to the OSDBA and OSOPER groups:

      # nicl . -append /groups/dba users oracle
      # nicl . -append /groups/oper users oracle
      
      

Verifying That the UNIX User nobody Exists


Note:

The nobody user exists by default on all Mac OS X systems.

Before installing the software, verify that the UNIX user nobody exists on the system:

  1. To determine whether the user exists, enter the following command:

    # id nobody
    
    

    If this command displays information about the nobody user, you do not have to create that user.

  2. If the nobody user does not exist, create it as follows:

    1. Enter the following command to determine whether the nobody group exists:

      # nireport . /groups name gid | grep nobody
      
      
    2. If the nobody group does not exist, enter commands similar to the following to create it:

      # nicl . -create /groups/nobody
      # nicl . -append /groups/nobody gid -2
      # nicl . -append /groups/nobody passwd "*"
      
      
    3. Enter commands similar to the following to create the nobody user:

      # nicl . -create /users/nobody
      # nicl . -append /users/nobody uid -2
      # nicl . -append /users/nobody gid -2
      # nicl . -append /users/nobody shell /usr/bin/false
      # nicl . -append /users/nobody home /var/empty
      # nicl . -append /users/nobody realname "Unprivileged User"
      # nicl . -append /users/nobody passwd "*"
      
      

Configure Kernel Parameters and Shell Limits


Note:

The kernel parameter and shell limit values shown in this section are recommended values only. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system. See 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.corefile core
kern.sysv.semmni 87381
kern.sysv.semmns 87381
kern.sysv.semmnu 87381
kern.sysv.semmsl 87381
kern.sysv.semume 10
kern.sysv.maxproc 2068
kern.sysv.maxprocperuid 2068


Note:

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

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

  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.corefile # /usr/sbin/sysctl -a | grep corefile
    kern.sysv.semmni, kern.sysv.semmns, kern.sysv.semmnu, kern.sysv.semmsl, kern.sysv.semume # /usr/sbin/sysctl -a | grep sem
    kern.maxproc, kern.maxprocperuid # /usr/sbin/sysctl -a | grep maxproc

  2. If the value of any kernel parameter is different to the recommended value, complete the following steps:

    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.

      kern.corefile=core
      kern.sysv.semmni=87381
      kern.sysv.semmns=87381
      kern.sysv.semmnu=87381
      kern.sysv.semmsl=87381
      kern.sysv.semume=10
      kern.maxproc=2068
      kern.maxprocperuid=2068
      
      

      By specifying the values in the /etc/sysctl.conf file, they persist when you reboot the system.

    2. For each parameter that you must modify, enter a command similar to the following to change the current value:

      # /usr/sbin/sysctl -w parameter_name=value
      
      

      For example:

      # /usr/sbin/sysctl -w kern.maxproc=2068
      
      

Set Shell Limits

To improve the performance of the software on Mac OS X systems, you must increase the following shell limits:

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.

Identify Required Software Directories

You must identify or create three directories for the Oracle software, as follows:

The following subsections describe the requirements for these directories.

Oracle Base Directory

The Oracle base directory acts as a top-level directory for Oracle software installations. It is analogous to the C:\Oracle directory used for Oracle software installations on Windows systems. On UNIX 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:

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 UNIX users install Oracle software on the same system, each user must create a separate Oracle base directory. The following example Oracle base directories could all exist on the same system:

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

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

Regardless of whether you create a new 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, the Installer prompts you to specify the path to this directory. Oracle recommends that you choose the following path:

oracle_base/oraInventory

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


Note:

All Oracle software installations rely on this directory. Make sure 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 the 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/10.1.0/db_1

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

Identify or Create an Oracle Base Directory

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


Note:

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

Identifying an Existing Oracle Base Directory

Existing Oracle base directories might not have paths that comply with OFA guidelines. However, if you identify an existing Oracle Inventory directory or existing Oracle home directories, you can usually identify the Oracle base directories, as follows:

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

To continue:

Creating a New Oracle Base Directory

Before you create a new 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 will contain only software files. At least 1 GB
The Oracle base directory will contain both software and database files (not recommended for production databases). At least 2.2 GB

To identify an appropriate file system, follow these steps:

  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.

    The file system that you identify must be a local file system.

  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, follow these steps:

  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
    
    

    If the mount point you identified is /Volumes/u01 and oracle is the user name of the Oracle software owner, the recommended Oracle base directory path is as follows:

    /Volumes/u01/app/oracle
    
    
  2. When you are configuring the oracle user's environment later in this chapter, set the ORACLE_BASE environment variable to specify this directory.

Choose a Storage Option for Oracle Database and Recovery Files

The following table shows the storage options supported for storing Oracle database files and Oracle database recovery files. Oracle database files include datafiles, 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, you must also choose the storage option that you want to use for recovery files (the flash recovery area). You do not have to use the same storage option for each file type.

Storage Option File Types Supported
Database Recovery
File system Yes Yes
Automatic Storage Management Yes Yes
Raw devices Yes No

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

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

Create Directories for Oracle Database or Recovery Files

If you decide to place the Oracle database or recovery files on a file system, use the following guidelines when deciding where to place them.

Guidelines for Placing Oracle Database Files on a File System

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

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, use the following guidelines when deciding where to place them:

Creating Required Directories


Note:

You must complete 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, follow these steps:

  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 you want to use:

    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 GB of free disk space.

    If you are using the same file system for more than one type of file, 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
      
      
  5. If you also want to use ASM or raw devices for storage, see one of the following sections:

    Otherwise, see the "Stop Existing Oracle Processes" section.

Configure Disks for Automatic Storage Management

This section describes how to configure disks for use with ASM. Before you configure the disks, you must determine the number of disks and the amount of free disk space that you require. The following sections describe how to identify the requirements and configure the disks on each platform:

Identifying Storage Requirements for ASM

To identify the storage requirements for using ASM, you must determine how many devices and the amount of free disk space that you require. To complete this task, follow these steps:

  1. Determine whether you want to use ASM for Oracle database files, recovery files, or both.


    Note:

    You do not have to use the same storage mechanism for database files and recovery files. You can use the file system for one file type and ASM for the other.

    If you enable automated backups during the installation, you can choose ASM as the storage mechanism for recovery files by specifying an ASM disk group for the flash recovery area. Depending on how you choose to create a database during the installation, you have the following options:

    • If you select an installation method that runs DBCA in interactive mode, by choosing the Advanced database configuration option for example, you can decide whether you want to use the same ASM disk group for database files and recovery files, or you can choose to use different disk groups for each file type.

      The same choice is available to you if you use DBCA after the installation to create a database.

    • If you select an installation method that runs DBCA in non-interactive mode, you must use the same ASM disk group for database files and recovery files.

  2. Choose the ASM redundancy level that you want to use for the ASM disk group.

    The redundancy level that you choose for the ASM disk group determines how ASM mirrors files in the disk group and determines the number of disks and amount of disk space that you require, as follows:

    • External redundancy

      An external redundancy disk group requires a minimum of one disk device. The effective disk space in an external redundancy disk group is the sum of the disk space in all of its devices.

      Because ASM does not mirror data in an external redundancy disk group, Oracle recommends that you use only RAID or similar devices that provide their own data protection mechanisms as disk devices in this type of disk group.

    • Normal redundancy

      In a normal redundancy disk group, ASM uses two-way mirroring by default, to increase performance and reliability. A normal redundancy disk group requires a minimum of two disk devices (or two failure groups). The effective disk space in a normal redundancy disk group is half the sum of the disk space in all of its devices.

      For most installations, Oracle recommends that you use normal redundancy disk groups.

    • High redundancy

      In a high redundancy disk group, ASM uses three-way mirroring to increase performance and provide the highest level of reliability. A high redundancy disk group requires a minimum of three disk devices (or three failure groups). The effective disk space in a high redundancy disk group is one-third the sum of the disk space in all of its devices.

      While high redundancy disk groups do provide a high level of data protection, you must consider the higher cost of additional storage devices before deciding to use this redundancy level.

  3. Determine the total amount of disk space that you require for the database files and recovery files.

    Use the following table to determine the minimum number of disks and the minimum disk space requirements for the installation:

    Redundancy Level Minimum Number of Disks Database Files Recovery Files Both File Types
    External 1 1.15 GB 2.3 GB 3.45 GB
    Normal 2 2.3 GB 4.6 GB 6.9 GB
    High 3 3.45 GB 6.9 GB 10.35 GB

    If an ASM instance is already running on the system, you can use an existing disk group to meet these storage requirements. If necessary, you can add disks to an existing disk group during the installation.

    The following section describes how to identify existing disk groups and determine the free disk space that they contain.

  4. Optionally identify failure groups for the ASM disk group devices.


    Note:

    You need to complete this step only if you intend to use an installation method that runs DBCA in interactive mode, for example, if you intend to choose the Custom installation type or the Advanced database configuration option. Other installation types do not enable you to specify failure groups.

    If you intend to use a normal or high redundancy disk group, you can further protect your database against hardware failure by associating a set of disk devices in a custom failure group. By default, each device comprises its own failure group. However, if two disk devices in a normal redundancy disk group are attached to the same SCSI controller, the disk group becomes unavailable if the controller fails. The controller in this example is a single point of failure.

    To protect against failures of this type, you could use two SCSI controllers, each with two disks, and define a failure group for the disks attached to each controller. This configuration would enable the disk group to tolerate the failure of one SCSI controller.


    Note:

    If you define custom failure groups, you must specify a minimum of two failure groups for normal redundancy disk groups and three failure groups for high redundancy disk groups.

  5. If you are sure that a suitable disk group does not exist on the system, install or identify appropriate disk devices to add to a new disk group. Use the following guidelines when identifying appropriate disk devices:

    • All of the devices in an ASM disk group should be the same size and have the same performance characteristics.

    • Do not specify more than one partition on a single physical disk as a disk group device. ASM expects each disk group device to be on a separate physical disk.

    • Although you can specify a logical volume as a device in an ASM disk group, Oracle does not recommend their use. Logical volume managers can hide the physical disk architecture, preventing ASM from optimizing I/O across the physical devices.

    For information about completing this task, see the "Configuring Disks for ASM" section.

Using an Existing ASM Disk Group

If you want to store either database or recovery files in an existing ASM disk group, you have the following choices, depending on the installation method that you select:

  • If you select an installation method that runs DBCA in interactive mode, by choosing the Advanced database configuration option for example, you can decide whether you want to create a new disk group or use an existing one.

    The same choice is available to you if you use DBCA after the installation to create a database.

  • If you select an installation method that runs DBCA in non-interactive mode, you must choose an existing disk group for the new database; you cannot create a new disk group. However, you can add disk devices to an existing disk group if it has insufficient free space for your requirements.


Note:

The ASM instance that manages the existing disk group can be running in a different Oracle home directory.

To determine whether an existing ASM disk group exists, or to determine whether there is sufficient disk space in a disk group, you can use Oracle Enterprise Manager Grid Control or Database Control. Alternatively, you can use the following procedure:

  1. View the contents of the oratab file to determine whether an ASM instance is configured on the system:

    # more /etc/oratab
    
    

    If an ASM instance is configured on the system, the oratab file should contain a line similar to the following:

    +ASM:oracle_home_path:N
    
    

    In this example, +ASM is the system identifier (SID) of the ASM instance and oracle_home_path is the Oracle home directory where it is installed. By convention, the SID for an ASM instance begins with a plus sign.

  2. Set the ORACLE_SID and ORACLE_HOME environment variables to specify the appropriate values for the ASM instance that you want to use.

  3. Connect to the ASM instance as the SYS user with SYSDBA privilege and start the instance if necessary:

    # $ORACLE_HOME/bin/sqlplus "SYS/SYS_password as SYSDBA"
    SQL> STARTUP
    
    
  4. Enter the following command to view the existing disk groups, their redundancy level, and the amount of free disk space in each one:

    SQL> SELECT NAME,TYPE,TOTAL_MB,FREE_MB FROM V$ASM_DISKGROUP;
    
    
  5. From the output, identify a disk group with the appropriate redundancy level and note the free space that it contains.

  6. If necessary, install or identify the additional disk devices required to meet the storage requirements listed in the previous section.


    Note:

    If you are adding devices to an existing disk group, Oracle recommends that you use devices that have the same size and performance characteristics as the existing devices in that disk group.

Configuring Disks for ASM


Note:

On Mac OS X systems, Oracle recommends that you create a single whole-disk partition on each disk that you want to use.

To configure disks for ASM using raw devices, follow these steps:

  1. If necessary, install the disks that you intend to use for the disk group and reboot the system.

  2. Enter the following command to display information about the disks attached to the system:

    # diskutil list
    
    

    From the display, identify the name of the disk devices that you want to use for the ASM disk group.

  3. Enter the following command to start the Apple partition table editor:

    # /usr/sbin/pdisk
    
    
  4. To create a single whole-disk partition on each device that you want to include in the disk group, repeat the following steps:

    1. Enter e to edit the partition table.

    2. Enter the device name of the disk that you want to partition, for example /dev/rdisk4.

    3. Enter p to display the partition table for that disk.

    4. If the disk does not have a partition table, enter i to create one.

      Press Enter at each prompt to accept the default values for block and device sizes, then enter p again to display the new partition table. The output should be similar to the following:

      /dev/rdisk4  map block size=512
         #:                 type name               length   base    ( size )
         1:  Apple_partition_map Apple                  63 @ 1
         2:           Apple_Free Extra            20479936 @ 64     ( 100.0G)
      
      Device block size=512, Number of Blocks=204800000
      DeviceType=0x0, DeviceId=0x0
      
      
    5. Enter C to create a new disk partition and specify the partition type.

    6. Enter the following values for the new partition:

      Prompt Recommended Response
      First block Enter the block number associated with the start (base) of the free space on the disk, for example 64.
      Length in blocks Enter the length in blocks (the length value) of the free space on the disk, for example 20479936.
      Name of partition Enter a name for the partition, for example ASM_Disk1.
      Type of partition Enter Apple_Label.

    7. Enter p again, to display the new partition table.

      The type displayed for the new partition should be Apple_Label.

    8. Enter w, then y to write the new partition table to the disk.

    9. Enter q to return to the top-level menu.

  5. When you have finished creating partitions, enter q to quit from pdisk.

  6. For each disk device that you want to use, enter commands similar to the following to create new devices files for the disk partition that you created, with the correct owner, group, and permissions:

    # /sbin/disklabel -create /dev/diskns2 owner-uid=oracle owner-gid=dba \
    owner-mode=0660
    
    

    In this example, the device name specifies slice 2, which represents the whole-disk partition that you created on diskn. This command creates additional block and character device files for the partition that you specified, owned by the oracle user and dba group, and with permissions 660:

    /dev/diskns2s1
    /dev/rdiskns2s1
    
    

    When you specify disk devices for ASM, you must specify the character device file name (/dev/rdiskns2s1).

Configure Raw Partitions

Table 2-1 lists the number, size, and sample partition names for the partitions that you must create for database files.

Table 2-1 Raw Partitions Required for Database Files on Mac OS X

Number Size (MB) Purpose and Sample Partition Device Name
1 500 SYSTEM tablespace
dbname_system_raw_500m
1 500 SYSAUX tablespace
dbname_sysaux_raw_500m
1 500 UNDOTBS1 tablespace
dbname_undotbs1_raw_500m
1 250 TEMP tablespace
dbname_temp_raw_250m
1 160 EXAMPLE tablespace
dbname_example_raw_160m
1 120 USERS tablespace
dbname_users_raw_120m
2 120 Two online redo log files
dbname_redo1_m_raw_120m
2 110 First and second control files
dbname_control{1|2}_raw_110m
1 5 Server parameter file (SPFILE)
dbname_spfile_raw_5m
1 5 Password file
dbname_pwdfile_raw_5m


Note:

If you prefer to use manual, instead of automatic, undo management, create a single RBS tablespace raw device at least 500 MB in size instead of the UNDOTBS1 raw device.

Table 2-2 Raw Partitions Required for CRS Files on Mac OS X

Number Size (MB) Purpose and Sample Partition Name
1 100 Oracle Cluster Registry
ora_ocr_raw_100m

Note: You need to create this raw partition only once on the cluster. If you create more than one database on the cluster, they all share the same Oracle cluster registry.

1 20 Oracle CRS voting disk
ora_vote_raw_20m

Note: You need to create this raw partition only once on the cluster. If you create more than one database on the cluster, they all share the same Oracle CRS voting disk.


The following subsections describe how to configure raw partitions on Mac OS X.

Create Raw Partitions

To create the required raw partitions, follow these steps:

  1. If necessary, install the disks that you intend to use for the raw partitions and reboot the system.

  2. Enter the following command to display information about the disks attached to the system:

    # diskutil list
    
    

    From the display, identify the name of the disk devices that you want to use for the raw partitions.

  3. Enter the following command to start the Apple partition table editor:

    # /usr/sbin/pdisk
    
    
  4. To create partitions on each device that you want to use, repeat the following steps:

    1. Enter e to edit the partition table.

    2. Enter the device name of the disk that you want to partition, for example /dev/rdisk4.

    3. Enter p to display the partition table for that disk.

    4. If the disk does not have a partition table, enter i to create one.

      Press Enter at each prompt to accept the default values for block and device sizes, then enter p again to display the new partition table. The output should be similar to the following:

      /dev/rdisk4  map block size=512   #:                 type name                length   base    ( size )
         1:  Apple_partition_map Apple                 512 @ 1
         2:           Apple_Free Extra           209750425 @ 513     ( 100.0G)
      
      Device block size=512, Number of Blocks=204800000
      DeviceType=0x0, DeviceId=0x0
      
      
    5. Enter C to create new disk partitions and specify their type.

      Enter the following values for each new partition that you want to create:


      Note:

      Do not create more than 15 partitions on any disk. See the pdisk man page for more information.

      Prompt Recommended Response
      First block Enter the block number associated with the start (base) of the free space on the disk, for example 513.
      Length in blocks Enter the size of the partition that you want to create. For example, enter 500m to create a 500 MB partition.
      Name of partition Enter a name for the partition, for example dbname_system_raw_500m. In this example, dbname is the name that you want to call the database, system is the database object identifier, and 500m is the raw partition size.
      Type of partition Enter Apple_Label.

    6. Enter p again, to display the new partition table.

      The type displayed for the new partitions should be Apple_Label.

    7. Enter w, then y to write the new partition table to the disk.

    8. Enter q to return to the top-level menu.

  5. When you have finished creating partitions, enter q to quit from pdisk.

  6. For each partition that you created, enter commands similar to the following to create new devices files for that partition, with the correct owner, group, and permissions:

    # /sbin/disklabel -create /dev/disknsx owner-uid=oracle owner-gid=dba \
    owner-mode=0660 dev-name=sample_partition_name
    
    

    For example:

    # /sbin/disklabel -create /dev/disknsx owner-uid=oracle owner-gid=dba \
    owner-mode=0660 dev-name=orcl_system_raw_500m
    
    

    In these examples, the device name specifies partition (slice) x on disk n. The disk label command creates additional block and character device files for the partition that you specified, with the specified user, group, and permissions. For example

    /dev/orcl_system_raw_500m
    /dev/rorcl_system_raw_500m
    
    

    When you specify raw devices in the raw device mapping file or during the installation, you must specify the character device file name (for example /dev/rorcl_system_raw_500m).

Create the DBCA Raw Device Mapping File

To allow Database Configuration Assistant (DBCA) to identify the appropriate raw partition for each database file, you must create a raw device mapping file, as follows:

  1. Set the ORACLE_BASE environment variable to specify the Oracle base directory that you identified or created previously:

    • Bourne, Bash, or Korn shell:

      $ ORACLE_BASE=/Volumes/u01/app/oracle ; export ORACLE_BASE
      
      
    • C shell:

      % setenv ORACLE_BASE /Volumes/u01/app/oracle
      
      
  2. Create a database file subdirectory under the Oracle base directory and set the appropriate owner, group, and permissions on it:

    # mkdir -p $ORACLE_BASE/oradata/dbname
    # chown -R oracle:oinstall $ORACLE_BASE/oradata
    # chmod -R 775 $ORACLE_BASE/oradata
    
    

    In this example, dbname is the name of the database that you chose previously.

  3. Change directory to the $ORACLE_BASE/oradata/dbname directory.

  4. Edit the dbname_raw.conf file in any text editor to create a file similar to the following:

    system=/dev/rdbname_system_raw_500m
    sysaux=/dev/rdbname_sysaux_raw_500m
    example=/dev/rdbname_example_raw_160m
    users=/dev/rdbname_users_raw_120m
    temp=/dev/rdbname_temp_raw_250m
    undotbs1=/dev/rdbname_undotbs1_raw_500m
    redo1_1=/dev/rdbname_redo1_1_raw_120m
    redo1_2=/dev/rdbname_redo1_2_raw_120m
    control1=/dev/rdbname_control1_raw_110m
    control2=/dev/rdbname_control2_raw_110m
    spfile=/dev/rdbname_spfile_raw_5m
    pwdfile=/dev/rdbname_pwdfile_raw_5m
    
    

    Use the following guidelines when creating or editing this file:

    • Each line in the file must have the following format:

      database_object_identifier=raw_device_path
      
      
    • For a single-instance database, the file must specify one automatic undo tablespace datafile (undotbs1), and at least two redo log files (redo1_1, redo1_2).

    • Specify at least two control files (control1, control2).

    • To use manual instead of automatic undo management, specify a single RBS tablespace datafile (rbs) instead of the automatic undo management tablespace.

  5. Save the file and note the file name that you specified.

  6. When you are configuring the oracle user's environment later in this chapter, set the DBCA_RAW_CONFIG environment variable to specify the full path to this file.

Stop Existing Oracle Processes


Caution:

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

If you choose to create a database during the installation, 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, the 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 listeners before starting the Installer.

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

  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 -auxwww | 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, see the "Configure 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 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, 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.

Configure the oracle User's Environment

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

To set the oracle user's environment, follow these steps:

  1. Start a new terminal session.

  2. Use the ssh, rlogin, or telnet command to log in to the system where you want to install the software as the oracle user.


    Note:

    You must complete this step even if you are installing the software on the local system.

  3. To determine the default shell for the oracle user, enter the following command:

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

    • Bourne shell (sh), Bash shell (bash), or Korn shell (ksh):

      $ vi .profile
      
      

      Note:

      If the oracle user's shell is the Bash shell, open the .bash_profile file, if it exists.

    • C shell (csh or tcsh):

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

    umask 022
    
    
  6. If the ORACLE_SID, ORACLE_HOME, or ORACLE_BASE environment variables are set in the file, remove the appropriate lines from the file.

  7. Save the file and exit from the editor.

  8. To run the shell startup script, enter one of the following commands:

    • Bash shell:

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

      $ . ./.profile
      
      
    • C shell:

      % source ./.login
      
      
  9. If you determined that the /tmp directory has less than 400 MB of free disk space, identify a file system with at least 400 MB of free space and set the TEMP 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, as a user that is a member of the admin group, 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
      
      
    3. As the oracle user, enter commands similar to the following to set the TEMP and TMPDIR environment variables:

      • Bourne, Bash, or Korn shell:

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

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

    • Bourne, Bash, or Korn shell:

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

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

    In these examples, /Volumes/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).

  11. Enter the following command 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, the 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, Oracle recommends that you unset the ORACLE_HOME environment variable and choose the default path suggested by the Installer.

  12. 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 that the environment variables you set in this section have the correct values.