grid standalone new

Upload: mahaboob-subhani

Post on 06-Apr-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Grid Standalone New

    1/16

    http://infotechinspiration.blogspot.com/2010/02/oracle-database-11gr2-grid_02.html

    Oracle Database 11gR2 Grid Infrastructure and Automatic

    Storage Management for a Standalone Server (Part-1)I have successfully Installed Oracle 11gR2 Grid Infrastructure and

    Automatic Storage Management for a Standalone Server on Oracle Enterprise Linux5.4. I mostly use SUSE Enterprise Linux because of YAST tool but Oracle ACFS/ADVMis not supported on SUSE Linux. Oracle Automatic Storage Management Cluster FileSystem and Oracle Automatic Storage Management DynamicVolume Manager(ACFS/ADVM) are supported only on Oracle Enterprise Linux 5 and Red Hat EnterpriseLinux 5 for Linux x86 and Linux x86-64. Maybe ACFS/ADVM support on SUSE Linuxpatches or documents are available on Oracle Metalink. Thats way I chose OEL 5.4 forGrid Infrastructure Installation.

    Requirements for Oracle Grid Infrastructure Installation

    1) Memory Requirement

    At least 1 GB of RAM

    2) Disk Space Requirement

    At least 3 GB of disk space

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

    3) Software Requirement

    Linux_11gR2_grid

    4) ASMLib Software Requirement

    oracleasm-support-2.1.3-1.el5.i386.rpmoracleasmlib-2.0.4-1.el5.i386.rpmoracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm

    These rpm packages are available on OEL 5.4 DVD.

    5) Extra Disk Requirements

    There are unformatted disk partitions are required to mark as ASM disks and form intoan ASM diskgroup. In my case these drives are named /dev/sda, /dev/sdb and dev/sdc.

    Step 1

  • 8/3/2019 Grid Standalone New

    2/16

    Login from Root user

    Step 2

    Create the accounts and groups

    #groupadd -g 501 oinstall#groupadd -g 502 dba#groupadd -g 503 oper#groupadd -g 504 asmadmin#groupadd -g 505 asmoper#groupadd -g 506 asmdba#useradd -g oinstall -G dba,asmdba,oper oracle#useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

    Step 3Create directories in /opt directory

    #mkdir -p /opt/grid#mkdir -p /opt/oracle

    Set Ownership, Group and mod of these directories

    #chown -R grid:oinstall /opt/grid#chown -R oracle:oinstall /opt/oracle

    #chmod -R 775 /opt/grid#chmod -R 775 /opt/oracle

    Step 4Set password for grid and oracle users

    #passwd grid#passwd oracle

  • 8/3/2019 Grid Standalone New

    3/16

    Step 5Setting System Parameters

    i) Edit the /etc/security/limits.conf file and add following lines:

    grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536

    ii) Edit the /etc/pam.d/login file and add following line:

    session required pam_limits.so

    iii) Edit the /etc/sysctl.conf and add following lines:

    fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586

  • 8/3/2019 Grid Standalone New

    4/16

    You need reboot system or execute "sysctl -p" command to apply above settings

    Step 6

    i) Setting Grid User Enviroment

    Edit the /home/grid/.bash_profile file and add following linesTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=ws1; export ORACLE_HOSTNAMEORACLE_SID=+ASM; export ORACLE_SIDORACLE_BASE=/opt/grid; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/Grid11gR2; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$PATH; export PATHif [ $USER = "oracle" ] || [ $USER = "grid" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022

    fi

  • 8/3/2019 Grid Standalone New

    5/16

    ii) Setting Oracle User Enviroment

    Edit the /home/oracle/.bash_profile file and add following lines

    TMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=ws1; export ORACLE_HOSTNAMEORACLE_BASE=/opt/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/OraDB11gR2; export ORACLE_HOMEORACLE_SID=ORCL; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATH

    PATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHif [ $USER = "oracle" ] || [ $USER = "grid" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fi

    umask 022fi

  • 8/3/2019 Grid Standalone New

    6/16

    Step 7

    Some additional packages are required for successful instalation of Oracle GridInfrastructure software. To check wheter required packages are installed onyour operating system use following command:

    # rpm -q binutils elfutils elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-develcompat-libstdc++-33 cpp make compat-db sysstat libaio libaio-devel unixODBCunixODBC-devel|sort

    Step 8

    Install required ASMLib softwares

    #rpm -ivh oracleasm-support-2.1.3-1.el5.i386.rpm /oracleasmlib-2.0.4-1.el5.i386.rpm /oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm

    Step 9

  • 8/3/2019 Grid Standalone New

    7/16

    Check the available partitions

    #ls -l /dev/sd*

    Step 10Both ASMLib and raw devices require the candidate disks to be partitioned before they can be accessed.The following picture shows the "/dev/sda" disk being partitioned.

    The remaining disks ("/dev/sdb" and "/dev/sdc") must be partitioned in the same way.

    Step 11To label the disks for use by ASM, perform the following steps:

    i) configure oracleasm by using the command # oracleasm configure -iand answer the prompts as shown in the screenshot.

  • 8/3/2019 Grid Standalone New

    8/16

    ii) Initialize the asmlib with the oracleasm init command. This command loads theoracleasm module and mounts the oracleasm filesystem.

    iii) Use the oracleasm createdisk > command to create the ASM disk label for each disk.In my casethe disks names are DISK1, DISK2 and DISK3 as shown in the screenshot.

  • 8/3/2019 Grid Standalone New

    9/16

    iv) Check that the disk are visible using the oracleasm listdisks command.

    vii) Check the the disks are mounted in the oracleasm filesystem with the command ls -l /dev/oracleasm/disks

  • 8/3/2019 Grid Standalone New

    10/16

    Step 12i) Extract Linux_11R2_grid software into /mnt directory# unzip /mnt/Linux_11gR2_grid

    Change the ownership and group of grid software directory# chown grid /mnt/grid R# chgrp oinstall /mnt/grid R

    Step 13i) Now login from grid user

    ii) Start the installer with the command./runInstalleriii) On the first screen of the installer, select Install and Configure Grid Infrastructure fora Standalone Server. Click Next.

    iv) On the Select Product Languages screen, select the Languages that should be supported in this

    installation.

  • 8/3/2019 Grid Standalone New

    11/16

    v) On the CreateASMDiskGroup screen,Set Redundancy to Normal

    Select the disks: ORCL:DISK

    1, ORCL:DISK

    2, and ORCL:DISK

    3.

    Click Next

    vi) Specify ASM Password

  • 8/3/2019 Grid Standalone New

    12/16

    vii) Privileged Operating System Groups

    viii) Specify Installation Location

    ix) Perform Prerequisite Checks

  • 8/3/2019 Grid Standalone New

    13/16

    x) Summary

    xi) The setup page shows the install progress

  • 8/3/2019 Grid Standalone New

    14/16

    xii) The Execute Configuration Scripts page asks you to execute a configuration scriptas the root user.

    xiii) Successfully Install

  • 8/3/2019 Grid Standalone New

    15/16

    The Result of the execution of root.sh script

    [root@ws1 OraGrid11gR2]# ./root.shRunning Oracle 11g root.sh script...The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /opt/grid/product/OraGrid11gR2Enter the full pathname of the local bin directory: [/usr/local/bin]:Copying dbhome to /usr/local/bin ...Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by

    Database Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.2009-11-04 19:08:14: Checking for super user privileges2009-11-04 19:08:14: User has super user privileges2009-11-04 19:08:14: Parsing the host nameUsing configuration parameter file:/opt/grid/product/OraGrid11gR2/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'grid', privgrp 'oinstall'..

    Operation successful.

    CRS-4664: Node ws1 successfully pinned.Adding daemon to inittabCRS-4123: Oracle High Availability Services has been started.ohasd is startingws1 2009/11/04 19:11:01/opt/grid/product/OraGrid11gR2/cdata/ws1/backup_20091104_191101.olrSuccessfully configured Oracle Grid Infrastructure for a Standalone Server

  • 8/3/2019 Grid Standalone New

    16/16

    Updating inventory properties for clusterwareStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 2000 MB Passed The inventory pointer is located at /etc/oraInst.locThe inventory is located at /opt/grid/oraInventory

    'UpdateNodeList' was successful.

    ASM can be used asmca Management