Archive

Posts Tagged ‘Oracle 11g’

OS Prep for Oracle 11g installation – Redhat EL 5 or Centos 5.2 – 64bit Installation

July 24th, 2009 Mark Wagner No comments

OS Installation

  1. At least 1 GB to /tmp  Current Server has 4 GB for /tmp
  2. Package Installation
    • Follow the Oracle recommended practice of using a "default RPMs" installation. Accept the default software selection.
    • Additional RPMs are required to run Oracle Database 11g Release 1. These will be installed later.
  3. Disable Firewall
  4. Select Disabled SELinux.

Verify & Configure OS Installation  -  64-bit (x86_64) Installations

Required kernel version: 2.6.18 This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .

Check your kernel version by running the following command:

uname -rm
Ex:
# uname -rm
2.6.18-8.el5 x86_64

Required package versions (or later):

  • binutils-2.17.50.0.6
  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-0.125
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-2.5-12
  • glibc-2.5-12 (32 bit)
  • glibc-common-2.5
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-0.3.106
  • libaio-0.3.106 (32 bit)
  • libaio-devel-0.3.106
  • libgcc-4.1.1
  • libgcc-4.1.1 (32 bit)
  • libstdc++-4.1.1
  • libstdc++-4.1.1 (32 bit)
  • libstdc++-devel 4.1.1
  • make-3.81
  • sysstat-7.0.0

Note that there are a number of packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both should be provided on the 64-bit Linux installation media.

If you’ve performed a "default RPMs" install as suggested by Oracle, there are still some required packages that must be installed:

  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-devel-0.3.106
  • libstdc++-devel 4.1.1
  • sysstat-7.0.0

To install the remaining packages, mount the RedHat Enterprise Linux media and move to the directory containing the RPMs.

Some required packages are dependent upon other packages, so the dependant packages must be installed as well. Login as root and run the following commands to install the remaining required packages and their dependent packages:

Using Yum

yum install elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm compat-libstdc++-33* libaio-devel*.x86_64.rpm sysstat*

Using installation CDs

Mount CD 2

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm

    Ex:
        # rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
warning: elfutils-libelf-devel-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:glibc-headers ########################################### [ 11%]
        2:glibc-devel ########################################### [ 22%]
        3:libgomp ########################################### [ 33%]
        4:gcc ########################################### [ 44%]
        5:libstdc++-devel ########################################### [ 56%]
        6:gcc-c++ ########################################### [ 67%]
        7:glibc-devel ########################################### [ 78%]
        8:elfutils-libelf-devel-s########################################### [ 89%]
        9:elfutils-libelf-devel ########################################### [100%]
    cd /
    eject
Mount CD 3

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm

        Ex:
        # rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
        warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:libaio-devel ########################################### [ 33%]
        2:compat-libstdc++-33 ########################################### [ 67%]
        3:compat-libstdc++-33 ########################################### [100%]

    cd /
    eject

Mount CD 4

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh sysstat*

        Ex:
        # rpm -ivh sysstat*
        warning: sysstat-7.0.0-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:sysstat ########################################### [100%]

    cd /
    eject

To verify that the required packages have been installed on your system, run the following command:

rpm -q –queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat

    Ex:
    # rpm -q –queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \

    > compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \

    > glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \

    > make sysstat

    binutils-2.17.50.0.6-2.el5 (x86_64)

    compat-libstdc++-33-3.2.3-61 (i386)

    compat-libstdc++-33-3.2.3-61 (x86_64)

    elfutils-libelf-0.125-3.el5 (x86_64)

    elfutils-libelf-devel-0.125-3.el5 (x86_64)

    gcc-4.1.1-52.el5 (x86_64)

    gcc-c++-4.1.1-52.el5 (x86_64)

    glibc-2.5-12 (i686)

    glibc-2.5-12 (x86_64)

    glibc-common-2.5-12 (x86_64)

    glibc-devel-2.5-12 (x86_64)

    glibc-devel-2.5-12 (i386)

    libaio-0.3.106-3.2 (x86_64)

    libaio-0.3.106-3.2 (i386)

    libaio-devel-0.3.106-3.2 (x86_64)

    libgcc-4.1.1-52.el5 (x86_64)

    libgcc-4.1.1-52.el5 (i386)

    libstdc++-4.1.1-52.el5 (x86_64)

    libstdc++-4.1.1-52.el5 (i386)

    libstdc++-devel-4.1.1-52.el5 (x86_64)

    make-3.81-1.1 (x86_64)

    sysstat-7.0.0-3.el5 (x86_64)

To install support for ODBC the required packages have to be installed on your system.

unixODBC-2.2.11 (32 bit) or later

unixODBC-devel-2.2.11 (64 bit) or later

unixODBC-2.2.11 (64 bit) or later

Use yum to install if Needed

# yum install unixODBC*

Create Oracle Account

Create Oracle groups and user account:
In the same terminal window as root do the following:

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle

Expected output:
uid=501(Oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

Set the password for Oracle:

$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Set Kernel Parameters

Cut and paste the following commands while logged in as root into a script and run it or directly at a terminal prompt:

cat >> /etc/sysctl.conf <<EOF
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 = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576
EOF
/sbin/sysctl -p

The output should be:
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
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 = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576

Next run the following commands as root to verify your settings:

/sbin/sysctl -a | egrep “shm|sem|file-max|ip_local_port_range| rmem_default|rmem_max|wmem_default|wmem_max”

The output should be:

net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
vm..hugetlb_shm_group = 0
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648
fs.file-max = 65536

Create Directories

Now create directories to store the Oracle software and the database files (again as root in the same window):

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app

Set Shell Limits for Oracle User

An easy way to set these values is to create a quick script in /tmp. Cut and paste the following commands while logged in as root into a script and run it:

cat >> /etc/security/limits.conf <<EOF1
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF1
cat >> /etc/pam.d/login <<EOF2
session required /lib/security/pam_limits.so
EOF2
cat >> /etc/profile <<EOF3
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF3
cat >> /etc/csh.login <<EOF4
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF4

Now the OS is ready for the Oracle Software installation.

How to see the files stored in ASM – Oracle Automatic Storage Management

July 7th, 2009 Mark Wagner No comments

#asmcmd -p

Asmcmd lets you view directory structuture and files stored inside Oracle ASM usitlizing a CLI and unix like commands.

Command Description
cd Changes the current directory to the specified directory.
du Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively.
exit Exits ASMCMD.
find Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
help Displays the syntax and description of ASMCMD commands.
ls Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.
lsct Lists information about current ASM clients.
lsdg Lists all disk groups and their attributes.
mkalias Creates an alias for a system-generated filename.
mkdir Creates ASM directories.
pwd Displays the path of the current ASM directory.
rm Deletes the specified ASM files or directories.
rmalias Deletes the specified alias, retaining the file that the alias points to.

Wildcard

The wildcard characters “*” and “%” match zero or more characters anywhere within an absolute or relative path. The two characters behave identically. The ASMCMD commands that accept wildcards are ls, du, rm, and find. The following examples illustrate the use of wildcards.

Setting Shell Limits for Oracle User on CentOS 5.2

July 4th, 2009 Mark Wagner No comments

Set Shell Limits for Oracle User

An easy way to set these values is to create a quick script in /tmp. Cut and paste the following commands while logged in as root into a script and run it:

 

cat >> /etc/security/limits.conf <<EOF1
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF1

cat >> /etc/pam.d/login <<EOF2
session required /lib/security/pam_limits.so
EOF2

cat >> /etc/profile <<EOF3
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF3

cat >> /etc/csh.login <<EOF4
if ( \$USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF4

Setting Kernel Parameters for Oracle 11g on Redhat EL & CentOS 5.2

July 4th, 2009 Mark Wagner No comments

Set Kernel Parameters

Cut and paste the following commands while logged in as root into a script and run it or directly at a terminal prompt:

 

cat >> /etc/sysctl.conf <<EOF
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 = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576
EOF
/sbin/sysctl -p

 

The output should be:

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
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 = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576

Setting Up Environment Variables for Oracle 11g on Centos 5.2

July 4th, 2009 Mark Wagner No comments

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!