Showing posts with label Oracle 11g Installation on RHEL 6. Show all posts
Showing posts with label Oracle 11g Installation on RHEL 6. Show all posts

Wednesday, June 4, 2014

Install Oracle 11g on RHEL 5

1.    Oracle Installation Pre-Requisite:

2.       Red Hat Enterprise Linux Server 6  (or greater), which is Kernel - 2.6.32-131.0.15.el6.x86_64 or newer.
All these packages need but sometimes may be kernel version is higher or lower, it all depends upon server kernel version.

  1. binutils-2.20.51.0.2
  2. compat-libstdc++-33-3.2.3
  3. compat-libstdc++-33-3.2.3 (32 bit)
$ rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep -i compat-libstdc
compat-libstdc++-33-3.2.3-69.el6 (i686)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)

  1. elfutils-libelf-0.148
  2. elfutils-libelf-devel-0.148
  3. gcc-4.4.4
  4. gcc-c++-4.4.4
  5. glibc-2.12-1
  6. glibc-2.12-1 (32 bit)
  7. glibc-common-2.12
  8. glibc-devel-2.12
  9. glibc-devel-2.12 (32 bit)
  10. glibc-headers-2.12
  11. ksh-20100621
  12. libaio-0.3.107
  13. libaio-0.3.107 (32 bit)
  14. libaio-devel-0.3.107
  15. libaio-devel-0.3.107 (32 bit)
  16. libgcc-4.4.4
  17. libgcc-4.4.4 (32 bit)
  18. libstdc++-4.4.4
  19. libstdc++-4.4.4 (32 bit)
  20. libstdc++-devel-4.4.4
  21. libstdc++-devel-4.4.4 (32 bit)
  22. make-3.81
  23. sysstat-9.0.4

Few More RPM’s that need to be install

      If you intend to use the Oracle ODBC driver then you will require the following optional rpms.
-bash-3.2$ rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep -i unixODBC
11) unixODBC-2.2.14-12.el6_3 (x86_64)             <<< both ARCH's are required. See next item
12) unixODBC-devel-2.2.14-12.el6_3 (i686)       <<< both ARCH's are required. See next item
13) unixODBC-devel-2.2.14-12.el6_3 (x86_64)  <<< both ARCH's are required. See next item
14) unixODBC-2.2.14-12.el6_3 (i686)                  <<< both ARCH's are required. See next item


RPM’s required for 10 g Installation on RHEL6
All these packages need but sometimes may be kernel version is higher or lower, it all depends upon server kernel version.

=================================================
binutils-2.17.50.0.6-2 (x86_64)
compat-db-4.2.52-5.1 (x86_64)
compat-libstdc++-296-2.96-138 (i386)
compat-libstdc++-33-3.2.3-61(x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
control-center-2.16.0-14 (x86_64)
gcc-4.1.1-52 (x86_64)
gcc-c++-4.1.1-52 (x86_64)
glibc-2.5-12 (x86_64)
glibc-2.5-12 (i686)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12 (i386)
glibc-headers-2.5-12 (x86_64)
ksh-20060214-1.4 (x86_64)
libaio-0.3.106-3.2 (x86_64)
libgcc-4.1.1-52 (i386)
libgcc-4.1.1-52 (x86_64)
libgnome-2.16.0-6 (x86_64)
libgnomeui-2.16.0-5 (x86_64)
libgomp-4.1.1-52 (x86_64)
libstdc++-4.1.1-52 (x86_64)
libstdc++-devel-4.1.1-52 (x86_64)
libXp-1.0.0-8 (I 386)
make-3.81-1.1 (x86_64)
sysstat-7.0.0-3 (x86_64)

=================================================
 
3.  Additional Required OS Components (per this NOTE)
    a.) Please do not rush, skip, or minimize this critical step. This list is based upon a "default-RPMs" installation of 64-bit (S390x) RHEL Server 5. Additional RPMs (beyond anything known to Oracle) may be needed if a "less-than-default-RPMs" installation of 64-bit (S390x) RHEL Server 5 is performed. For more information, please refer to Note 376183.1, "Defining a "default RPMs" installation of the RHEL OS"
    b.) Several RPMs will be required as prerequisites to those listed in section II.3.c:
    
   1.) elfutils-libelf-devel-static-0.137-3.el5.s390x.rpm
   2.) kernel-headers-2.6.18-164.el5.s390x.rpm
   3.) libgomp-4.4.0-6.el5.s390x.rpm
===============================================
Note:

  4.  Oracle Global Customer Support has noticed a recent trend with install problems that originate from installing too many RPMs. For example:
    a.) installing your own JDK version (prior to beginning the Oracle Software “runInstaller”) is not needed on IBM:Linux on System z, and is not recommended. A pre-existing JDK often interferes with the correct JDK that the  Oracle Software “runInstaller” will place and use.
    b.) installing more than the required version of the gcc / g++ RPMs often leads to accidentally using (aka enabling or activating) the incorrect one. If you have multiple RDBMS versions installed on the same IBM:Linux on System z server, then you will likely have to manage multiple versions of gcc /g++ . For more information, please see Note 444084.1, "Multiple gcc / g++ Versions in Linux"

 5.  All of the RPMs in section II. are on the Red Hat Enterprise Linux 5 Update 4 64-bit zlinux distribution media.

 6.  The gcc-4.1.2 and gcc-c++-4.1.2 RPM items above will ensure that the correct gcc / g++ versions are installed. It is also required that you ensure that these correct gcc / g++ versions are active, and in-use. Ensure that the commands "gcc --version" and "g++ --version" each return "4.1.x".

  7. The oracle account used to install Oracle 11.2.0.1, should not have the Oracle install related variables set by default. For example setting ORACLE_HOME, PATH, LD_LIBRARY_PATH to include Oracle binaries in .profile, .login file and /etc/profile.d should be completely avoided.
    a.) Setting $ORACLE_BASE (not $ORACLE_HOME) is recommended, since it eases a few prompts in the OUI runInstaller tool.
    b.) following the succesful install, it is recommended to set $ORACLE_HOME, and to set $PATH to include the Oracle binaries ($ORACLE_HOME/bin) as the first location.

  8. Log in as Oracle user and start the installation as follows:
     ./runInstaller

    a.) When performing the 11.2.0.2 installation, make sure to use the "runInstaller" version that comes with 11.2.0.2 software.
    b.) it is best practice not to use any form of "su" to start the runInstaller, in order to avoid potential display-related problems


2. Hardware Requirement and Settings

To determine the RAM size, enter the following command:

# grep MemTotal /proc/meminfo
To determine the amount of shared memory available, enter the following command:
# df -h /dev/shm/

The workaround, if you encounter the ORA-00845 error, is to increase the /dev/shm mountpoint size.
ORA-00845: MEMORY_TARGET not supported on this system

For example:
# mount -t tmpfs shmfs -o size=7g /dev/shm

To make this change persistent across system restarts, add an entry in /etc/fstab similar to the following:

                     shmfs /dev/shm tmpfs size=7g 0

System Architecture

            To determine if the system architecture can run the software, enter the following command:

            # uname -m

            To determine the distribution and version of Linux installed, enter the following command:

            # cat /proc/version

            You can also enter the following command on some distributions of Linux: 

            # lsb_release –id 

            if you are not installing the software on the local computer, then run the following command on the remote computer to set the DISPLAY variable: 

            Bourne, Bash or Korn shell: 

            $ export DISPLAY=local_host:0.0  

            Required OS Components (per Release Notes, and Install Guide) :  RPM required

To get  the Hugepages setting on the server run attached script on server.
It will give the hugepages details like below:

[oracle@fcepmdbdev01 oradba]$ ./hugepage_setting.sh
Recommended setting: vm.nr_hugepages = 1541


Here is the link for hugepages:






3. Environment Settings

====================
1.       Modify kernel settings in /etc/sysctl.conf (RedHat) as follows. If the current value for any parameter is higher than the value listed in this table, do not change the value of that parameter. Range values (such as net.ipv4.ip_local_port_range) must match exactly.  
2.       also below parameter is having entry for vmware server.

    # Controls the maximum shared segment size, in bytes
kernel.shmmax = 3219999999

kernel.shmall = 2097152

# Convert 3GB SGA into bytes and divide by page size, I used the Linux calc to do the math
# getconf PAGE_SIZE
# echo "( 3 * 1024 * 1024 * 1024 ) / 4096 " | bc -l
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
########################################
vm.hugetlb_shm_group = 503
vm.nr_hugepages = 1542
# increase TCP max buffer size settable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limit
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# increase the length of the processor input queue
net.core.netdev_max_backlog = 30000

  2. To activate these new settings into the running kernel space, run the “sysctl –p” command as root.

  3. Set Shell Limits for the oracle User. Assuming that the "oracle" UNIX user will perform the installation, do the following:

    a.) Add the following settings to /etc/security/limits.conf
oracle soft nproc  2047
oracle hard nofile 65536
oracle hard nproc  16384
oracle soft nofile 1024
oracle soft stack  10240

    b.) Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
         session required pam_limits.so

    c.) Add the following lines to /etc/profile:

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

4. The hostname command should return the fully qualified hostname as shown
below:
    % hostname
        hostname.domainname

5 . If any Java packages are installed on the system, unset the Java environment variables, for example JAVA_HOME.

6.) Setting $ORACLE_BASE (not $ORACLE_HOME) is recommended, since it eases a few prompts in the OUI runInstaller tool.
7.) Following the successful install, it is recommended to set $ORACLE_HOME, and to set $PATH to include $ORACLE_HOME/bin at the beginning of the $PATH string.

8) check the selinux
[oracle@fcepmdbuat01 ~]$ cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing  
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

9) Add Oracle User and groups

groupadd -g 502 oinstall
groupadd -g 503 dba

useradd -u 501 -g oinstall -G dba, sysadmin, wheel oracle
passwd oracle

10) Setting up directory and its permission:

mkdir -p /orabin/oracle/product/11.2.0
chown -R oracle:oinstall /orabin
chmod -R 775 /orabin

RunInstaller GUI

1) Open the xming and putty with X11 enabling session
2) Unzip the 11203 zip 1 and 2
3) run the runInstaller from command promprt:
# /orabin/Software/runInstaller


Convert snapshot standby database to Physical standby database: Dataguard 11gR2

Step 1 SQL> shutdown immediate; Step 2 SQL> startup nomount Step 3 SQL> alter database mount; Step 4 SQL>  ALTER DATABASE CONV...