Forgot your password?    
+ Reply to Thread
Results 1 to 3 of 3

Thread: RAC 11g R2 Installation

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    RAC 11g R2 Installation

    rpm -Uvh binutils-2.*
    rpm -Uvh compat-libstdc++-33*
    rpm -Uvh elfutils-libelf-0.*
    rpm -Uvh elfutils-libelf-devel-*
    rpm -Uvh gcc-4.*
    rpm -Uvh gcc-c++-4.*
    rpm -Uvh glibc-2.*
    rpm -Uvh glibc-common-2.*
    rpm -Uvh glibc-devel-2.*
    rpm -Uvh glibc-headers-2.*
    rpm -Uvh ksh-2*
    rpm -Uvh libaio-0.*
    rpm -Uvh libaio-devel-0.*
    rpm -Uvh libgcc-4.*
    rpm -Uvh libstdc++-4.*
    rpm -Uvh libstdc++-devel-4.*
    rpm -Uvh make-3.*
    rpm -Uvh sysstat-7.*
    rpm -Uvh unixODBC-2.*
    rpm -Uvh unixODBC-devel-2.*

    # For Oracle Linux, use relevant versions of the following packages from your media.
    # When using UEK, oracleasm-2* is not needed as it is part of the kernel.
    rpm -Uvh oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
    rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm

    cd /
    ejectAdd or amend the following lines to the "/etc/sysctl.conf" file.

    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmall = 2097152
    kernel.shmmax = 1054504960
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default=262144
    net.core.rmem_max=4194304
    net.core.wmem_default=262144
    net.core.wmem_max=1048586Run the following command to change the current kernel parameters.

    /sbin/sysctl -pAdd the following lines to the "/etc/security/limits.conf" file.

    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536Add the following lines to the "/etc/pam.d/login" file, if it does not already exist.

    session required pam_limits.soCreate the new groups and users.

    groupadd -g 1000 oinstall
    groupadd -g 1200 dba
    useradd -u 1100 -g oinstall -G dba oracle
    passwd oracleCreate the directories in which the Oracle software will be installed.

    mkdir -p /u01/app/11.2.0/grid
    mkdir -p /u01/app/oracle/product/11.2.0/db_1
    chown -R oracleinstall /u01
    chmod -R 775 /u01/


    Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

    SELINUX=disabled



    Login as the oracle user and add the following lines at the end of the .bash_profile file.

    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR

    ORACLE_HOSTNAME=rac1.localdomain; export ORACLE_HOSTNAME
    ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME
    DB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME
    ORACLE_HOME=$DB_HOME; export ORACLE_HOME
    ORACLE_SID=RAC1; export ORACLE_SID
    ORACLE_TERM=xterm; export ORACLE_TERM
    BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
    PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi

    alias grid_env='. /home/oracle/grid_env'
    alias db_env='. /home/oracle/db_env'Create a file called "/home/oracle/grid_env" with the following contents.

    ORACLE_SID=+ASM1; export ORACLE_SID
    ORACLE_HOME=$GRID_HOME; export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHCreate a file called "/home/oracle/db_env" with the following contents.

    ORACLE_SID=RAC1; export ORACLE_SID
    ORACLE_HOME=$DB_HOME; export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHOnce the "/home/oracle/grid_env" has been run, you will be able to switch between environments as follows.

    $ grid_env
    $ echo $ORACLE_HOME
    /u01/app/11.2.0/grid
    $ db_env
    $ echo $ORACLE_HOME
    /u01/app/oracle/product/11.2.0/db_1
    $



    # fdisk /dev/sdb
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previous
    content won't be recoverable.


    The number of cylinders for this disk is set to 1305.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-1305, default 1):
    Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
    Using default value 1305

    Command (m for help): p

    Disk /dev/sdb: 10.7 GB, 10737418240 bytes
    255 heads, 63 sectors/track, 1305 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 1305 10482381 83 Linux

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    Syncing disks.
    #In each case, the sequence of answers is "n", "p", "1", "Return", "Return", "p" and "w".

    Once all the disks are partitioned, the results can be seen by repeating the previous "ls" command.

    # cd /dev
    # ls sd*
    sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1 sdf sdf1
    #Determine your current kernel.

    uname -rm
    2.6.18-164.el5 x86_64
    #If you prefer using UDEV over ASMLib, you can ignore the rest of this section, An example of UDEV setup is shown here.

    Download the appropriate ASMLib RPMs from OTN. In this case we installed the last two from the media, so we just need the first package. For RHEL we would need all three of the following:

    oracleasmlib-2.0.4-1.el5.x86_64.rpm
    oracleasm-support-2.1.3-1.el5.x86_64.rpm
    oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm
    Install the packages using the following command.

    rpm -Uvh oracleasm*.rpmConfigure ASMLib using the following command.

    # oracleasm configure -i
    Configuring the Oracle ASM library driver.

    This will configure the on-boot properties of the Oracle ASM library
    driver. The following questions will determine whether the driver is
    loaded on boot and what permissions it will have. The current values
    will be shown in brackets ('[]'). Hitting <ENTER> without typing an
    answer will keep that current value. Ctrl-C will abort.

    Default user to own the driver interface []: oracle
    Default group to own the driver interface []: dba
    Start Oracle ASM library driver on boot (y/n) [n]: y
    Scan for Oracle ASM disks on boot (y/n) [y]:
    Writing Oracle ASM library driver configuration: done
    #Load the kernel module using the following command.

    # /usr/sbin/oracleasm init
    Loading module "oracleasm": oracleasm
    Mounting ASMlib driver filesystem: /dev/oracleasm
    # If you have any problems, run the following command to make sure you have the correct version of the driver.

    # /usr/sbin/oracleasm update-driverMark the five shared disks as follows.

    # /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1
    Writing disk header: done
    Instantiating disk: done
    # /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1
    Writing disk header: done
    Instantiating disk: done
    # /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1
    Writing disk header: done
    Instantiating disk: done
    # /usr/sbin/oracleasm createdisk DISK4 /dev/sde1
    Writing disk header: done
    Instantiating disk: done
    # /usr/sbin/oracleasm createdisk DISK5 /dev/sdf1
    Writing disk header: done
    Instantiating disk: done
    # It is unnecessary, but we can run the "scandisks" command to refresh the ASM disk configuration.

    # /usr/sbin/oracleasm scandisks
    Reloading disk partitions: done
    Cleaning any stale ASM disks...
    Scanning system for ASM disks...
    #We can see the disk are now visible to ASM using the "listdisks" command.

    # /usr/sbin/oracleasm listdisks
    DISK1
    DISK2
    DISK3
    DISK4
    DISK5
    #The shared disks are now configured for the grid infrastructure

  2. #2
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    Install the Grid Infrastructure

    ./runInstaller


    Select the "Install and Configure Grid Infrastructure for a Cluster" option, then click the "Next" button.



    Select the "Typical Installation" option, then click the "Next" button.



    On the "Specify Cluster Configuration" screen, click the "Add" button.



    Enter the details of the second node in the cluster, then click the "OK" button.



    Click the "SSH Connectivity..." button and enter the password for the "oracle" user. Click the "Setup" button to to configure SSH connectivity, and the "Test" button to test it once it is complete.



    Click the "Identify network interfaces..." button and check the public and private networks are specified correctly. Once you are happy with them, click the "OK" button and the "Next" button on the previous screen.



    Enter "/u01/app/11.2.0/grid" as the software location and "Automatic Storage Manager" as the cluster registry storage type. Enter the ASM password and click the "Next" button.



    Set the redundancy to "External", select all 5 disks and click the "Next" button.



    Accept the default inventory directory by clicking the "Next" button.



    Wait while the prerequisite checks complete. If you have any issues, either fix them or check the "Ignore All" checkbox and click the "Next" button.



    If you are happy with the summary information, click the "Finish" button.



    Wait while the setup takes place.



    When prompted, run the configuration scripts on each node.



    The output from the "orainstRoot.sh" file should look something like that listed below.

    # cd /u01/app/oraInventory
    # ./orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.

    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    #The output of the root.sh will vary a little depending on the node it is run on. Example output can be seen here (Node1, Node2).

    Once the scripts have completed, return to the "Execute Configuration Scripts" screen on "rac1" and click the "OK" button.



    Wait for the configuration assistants to complete.



    Click the "Close" button to exit the installer.

  3. #3
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    Install the Database
    Make sure the "rac1" and "rac2" virtual machines are started, then login to "rac1" as the oracle user and start the Oracle installer.

    ./runInstallerUncheck the security updates checkbox and click the "Next" button.



    Accept the "Create and configure a database" option by clicking the "Next" button.



    Accept the "Server Class" option by clicking the "Next" button.



    Make sure both nodes are selected, then click the "Next" button.



    Accept the "Typical install" option by clicking the "Next" button.



    Enter "/u01/app/oracle/product/11.2.0/db_1" for the software location. The storage type should be set to "Automatic Storage Manager". Enter the appropriate passwords and database name, in this case "RAC.localdomain".



    Wait for the prerequisite check to complete. If there are any problems either fix them, or check the "Ignore All" checkbox and click the "Next" button.



    If you are happy with the summary information, click the "Finish" button.



    Wait while the installation takes place.



    Once the software installation is complete the Database Configuration Assistant (DBCA) will start automatically.



    Once the Database Configuration Assistant (DBCA) has finished, click the "OK" button.



    When prompted, run the configuration scripts on each node. When the scripts have been run on each node, click the "OK" button.



    Click the "Close" button to exit the installer.



    The RAC database creation is now complete.

    Check the Status of the RAC
    There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.

    $ srvctl config database -d RAC
    Database unique name: RAC
    Database name: RAC
    Oracle home: /u01/app/oracle/product/11.2.0/db_1
    Oracle user: oracle
    Spfile: +DATA/RAC/spfileRAC.ora
    Domain: localdomain
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools: RAC
    Database instances: RAC1,RAC2
    Disk Groups: DATA
    Services:
    Database is administrator managed
    $

    $ srvctl status database -d RAC
    Instance RAC1 is running on node rac1
    Instance RAC2 is running on node rac2
    $The V$ACTIVE_INSTANCES view can also display the current status of the instances.

    $ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Sat Sep 26 19:04:19 2009

    Copyright (c) 1982, 2009, Oracle. All rights reserved.


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options

    SQL> SELECT inst_name FROM v$active_instances;

    INST_NAME
    --------------------------------------------------------------------------------
    rac1.localdomain:RAC1
    rac2.localdomain:RAC2

    SQL>If you have configured Enterprise Manager, it can be used to view the configuration and current status of the database using a URL like "https://rac1.localdomain:1158/em".

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics