B.4 Configuring the System for Oracle Database Installation

An experienced DBA should install Oracle. In addition to the recommendations from the DBA, Novell also has some recommendations for installing Oracle. These recommendations are in the following areas:

B.4.1 Setting Kernel Values

IMPORTANT:The kernel values suggested in this section are minimum values only. These settings should be changed only if your system settings are lower than the recommended minimum values, and only after consulting your system administrator and Oracle documentation. For more information, see the Oracle Web site. This URL was current at the time of publishing the document.

Linux

  1. Log in as root.

  2. Back up /etc/sysctl.conf.

  3. Using a text editor, change the kernel parameters by appending the following text to the /etc/sysctl.conf file:

    The kernel settings below are minimal recommended settings. These settings can be increased if the machine hardware can support it.

    To determine your current setting for a particular kernel parameter, execute the command:

    sysctl <kernel_parameter>

    For example, to check the current value of the kernel parameter kernel.sem, execute the command: sysctl kernel.sem

    On SUSE Linux 10 SP2:

    # Oracle requires MLOCK privilege for hugetlb memory.
    vm.disable_cap_mlock=1
    

    On Red Hat Linux 4:

    # Kernel settings for Oracle
    kernel.core_uses_pid = 1
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 262144
    net.core.rmem_max = 262144
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144
    
  4. Execute the following command to load the modifications to the /etc/sysctl.conf file:

    sysctl -p
    /sbin/sysctl –p (on Red Hat Linux4)
    
  5. Set the file handles and process limits by appending the following text to the /etc/security/limits.conf file. nproc is the maximum limit on the number of processes and nofile is the maximum limit on the number of open files. These are the recommended values, but they can be modified if needed. The following is an example if your Oracle userid is oracle.

    # Settings added for Oracle
    oracle          soft    nofile  65536
    oracle          hard    nofile  65536
    oracle          soft    nproc   16384
    oracle           hard     nproc   16384
    

Solaris 10

Oracle 10g

noexec_user_stack=1

semsys:seminfo_semmni=100

semsys:seminfo_semmns=1024

semsys:seminfo_semmsl=256

semsys:seminfo_semvmx=32767

shmsys:shminfo_shmmax=4294967295

shmsys:shminfo_shmmni=100

  1. By default, Oracle instances are run as the oracle user of the dba group. A project with the group.dba name is created to serve as the default project for the oracle user. Run the id command to verify the default project for the oracle user.

    # su - oracle
    $ id -p
    uid=100(oracle) gid=100(dba) projid=100(group.dba)
    $ exit
    
  2. To set the maximum shared memory size to 2 GB, run the projmod command

    # projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba
    

    Alternatively, add the project.max - shm-memory=(privileged,2147483648,deny)resource control to the last field of the project entries for the Oracle project.

  3. After these steps are complete, the /etc/project file should contain the following:

    # cat /etc/project
    

    The following is the output of the command:

    system:0::::
    user.root:1::::
    noproject:2::::
    default:3::::
    group.staff:10::::
    group.dba:100:Oracle default
    project:::project.max-shmmemory=(privileged,2147483648,deny
    
  4. To verify that the resource control is active, run the id and prctl commands:

    # su - oracle
    $ id -p
    uid=100(oracle) gid=100(dba) projid=100(group.dba)
    $ prctl -n project.max-shm-memory -i process $$
    process: 5754: -bash
    NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
    project.max-shm-memory
    privileged 2.00GB – deny
    

Oracle 11g

For information on setting the kernel values for Oracle 11g, see Section B.1, Installing Oracle 11g in Section B.0, Oracle Setup.

NOTE:For additional information, see the Oracle documentation for Solaris 10 installation. This URL was current at the time of publication of the document.

B.4.2 Creating Group and User Accounts for Oracle (Solaris Only)

  1. Log in as root.

  2. Create a UNIX group and UNIX user accounts for the Oracle database owner.

    • Add a dba group (as root):

      groupadd –g 400 dba
      
    • Add the oracle user (as root) for the csh shell:

      useradd –g dba –d /export/home/oracle –m –s /bin/csh oracle
      
    • Add the oracle user (as root) for the bash shell:

      useradd –g dba –d /export/home/oracle –m –s /bin/bash oracle
      

B.4.3 Setting Environment Variables for Oracle (Solaris Only)

  1. Log in as root.

  2. To set the necessary environment variables for Oracle in the csh shell, add the following information to the local.cshrc file:

    setenv ORACLE_HOME /opt/oracle
    setenv ORACLE_SID ESEC
    setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
    setenv DISPLAY :0.0
    set path=(/bin /bin/java /usr/bin /usr/sbin ${ORACLE_HOME}/bin /usr/ucb/etc.)
    if ( $?prompt ) then
    set history=32
    endif
    
  3. To set the necessary environment variables for Oracle in the bash shell, add the following information to the .profile file in the $ORACLE_HOME directory:

    setenv ORACLE_HOME /opt/oracle
    setenv ORACLE_SID ESEC
    setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
    setenv DISPLAY :0.0
    set path=(/bin /bin/java /usr/bin /usr/sbin ${ORACLE_HOME}/bin /usr/ucb/etc.)
    if ( $?prompt ) then
    set history=32
    endif
    

B.4.4 Installing Oracle

To install Oracle, see Section B.0, Oracle Setup. This section describes installation settings recommended for Sentinel operations. It also describes the procedures for creating the Oracle instance. (Novell recommends creating the instance by using the Sentinel installer, but provides instructions if corporate policy requires that the DBA create the instance manually.)