Archive

Archive for the ‘Installation’ Category

Cleaning up a failed installation or reinstalling Oracle 10g or 11g

August 20th, 2009 No comments

su – root

# For 10g
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

# For 11g
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

. $ORACLE_HOME/bin/localconfig delete
# stops the Oracle CSS daemon and deletes configuration
rm -rf /u01/app/oracle/*

rm -rf /u01/app/oraInventory
rm -f /etc/oraInst.loc /etc/oratab
rm -rf /etc/oracle
rm -f /etc/inittab.cssd
rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

Oracle Universal Installer

July 26th, 2009 No comments

 

One of the beauties of the Oracle database is that nearly everything associated with it can be automated. Oracle installation is one of the easiest tasks to handle with little or no human intervention. Sadly, Oracle Corporation has historically provided little documentation on exactly how to accomplish this.

This chapter will discuss the main steps in automating an Oracle installation. Some platforms may require specific preparation before the installer can run. This preparation is usually straightforward and simple, but consult the installation guide for your specific platform before proceeding.

Automated Installation

When performing an automated install, you must provide the installer with a text file containing all the necessary instructions. Oracle calls these Oracle Universal Installer (OUI) response files. A response file is a plain text file, which must follow Oracle’s syntax exactly.

To use a response file during an installation on Windows or UNIX, use the following commands (where "custom.rsp" is the name you’ve given your response file):

Windows

setup.exe [-silent] -responseFile C:\OraInst\custom.rsp

UNIX

./runInstaller [-silent] -responseFile /u01/OraInst/custom.rsp

The -silent qualifier is optional. When a silent install is indicated, the installer will not open any graphical user interface (GUI) windows under any circumstances. All needed information must be provided in the response file for a silent install. If any information is missing, the installer will exit, returning an error and the name of the log file to examine for details.

If the -silent qualifier is omitted, the installer will open normally and wait for the user to move through the install steps manually. Each page will be filled in with answers from the response file, but the installation will not proceed automatically. This is very useful if you want an installation "template" rather than a fully automated install.

In addition to the Oracle-provided sample response files, the installer can record a session to create a response file for use in later installations. To record a session, use the -record and -destinationFile qualifiers. For Windows and UNIX, for example:

Windows

setup.exe -record -destinationFile C:\OraInst\rec.rsp

UNIX

./runInstaller -record -destinationFile /u01/OraInst/rec.rsp

The installer will start and run normally. Choices made during the installation session will be recorded to the designated response file. After all selections have been made, a summary page will be presented. At this point, you can continue with the install or click the Cancel button to end it. Even if the installation is cancelled, the recorded response file is created.

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

July 24th, 2009 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.