Archive

Archive for the ‘CentOS 5.2’ Category

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.

Creating A CentOS 5.2 64 bit Virtual machine using VMware 2.0 – Part 2

July 21st, 2009 Mark Wagner No comments

Now that you have created you new virtual machine we need to get it ready to install CentOS and eventually Oracle on to it.

Lets add some more disks:

  • One for the Oracle installation (8 gig)
  • 4 for 2 mirrored ASM Disk Groups (10 gig)

Hopefully you remember how to log in a get to look at your virtual machine you created in Part 1

image

Adding Hard disks to your Virtual Machine

Under the Commands section click the Add Hardware Link.

image

Click Add Hard Disk

Click Next – Choose the size of the disk you want to create

For the Oracle 11g installation with ASM I am creating an 8 gig disk for the Oracle installation and four 10 gig disks to be used as ASM Disk Groups

Repeat this step until all necessary disks are created

image 

Now your Hard disks are created and you are ready to move on

 

Starting up your Virtual Machine

image   Select your Virtual Machine and either click the Green arrow or under commands – select Power On

Once your Virtual machine is powered up Click on the Console tab

image

Then click on the Screen to luanch the virtual machine Screen

image

Installing CentOS 5.2 64 bit on your Virtual Machine

At this point you should either insert your CentOS Installation CD/DVD in your Drive or click the CD icon in the lower right corner and select your CentOS ISO.

image Press Enter to start your Installation

image  I skip the media check

image Click Next

image I speak English so… Click Next

image …  English Keyboard … NEXT

image Select Yes – This is the Drive we are installing CentOS on… gotta format it.. Don’t worry there isn’t any data on it.  Remember we just created it at the top of this post

Repeat the YES selection for all the drives you Created.

image Deselect all the Drives other then the one your planning on using for your installation.

image Check the box for Review and Modify Partition Layout / Click Next

image  Select yes to deleting all data

image Create the /u01 Partition on sdb filling it to maximum size

Create a partition on sda for /tmp size it at a minimum of 1024mb

Click Next

image

Leave the Grub Boot Loader (Defualt setting) – Click Next

I am Using NAT so I have left the defualt network setting of DHCP

image

Click Next

Select your appropriate time zone

image

Click Next

Set your Root password

image

Click Next

Select your Installation type:

  • Desktop Gnome
  • Server
  • Customize Now

image

Click Next

Select the Development tools

image

Click Next

image

image

Click Next

image

 

 

 

Creating A CentOS 5.2 64 bit Virtual machine using VMware 2.0 – Part 1

July 21st, 2009 Mark Wagner No comments

 

Start the VMware Server Homepage

 

image

Log In

image

Click The Virtual Machines Tab

Creating A New Virtual Machine

Then Click Create Virtual Machine

image

Change the name of the virtual machine

image

Click Next

Select Linux Operating System

Then Select – Other 2.6x Linux (64 bit)

image

Click Next

If Planning to install Oracle later you need to up the amount of RAM dedicated to the virtual machine.  I suggest 1024MB or Higher.

image

Click Next

image

Select create a new virtual disk.  Select the size you would like for your new Virtual disk.

image

Click Next

Click Add a Network Adapter

image

You can then select the type of networking you need: Bridged, NAT, or Host Only

image

Click Next

CD/DVD Drive – I recommend using the Physical device

Click Next

Floppy Drive – Don’t install a floppy – Unless you have a physical device or floppy images you plan on using

Click next

USB Controller – I used default setting for the USB Controller

Click next

image 

Click Finish

You have now created the virtual Machine to install CentOS on.

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!