Install Oracle 11gR2 on Centos 5.5

First off, I wish to thank Wil van Antwerpen for posting the original how to, which lays out with great simplicity the steps needed to install Oracle 11gR2. You can find his how to at the following link http://planetvm.net/blog/?p=1353

My tutorial is a bit different because it describes an advanced install of Oracle 11gR2.  This article assumes you know how to navigate in a Linux system using the shell and a basic understanding of permissions, user and group creation. There will be a supplemental how to regarding setting up your BASH profile in order to be able to use SQLPlus from your command prompt. This how to covers only the install and how to access the admin panel after the install……And here we go.

Contents

  • STEP 1: Download install files and update system
    STEP 2: Prepare your system for the install.
    STEP 3: Add user and groups
    STEP 4:Modify kernel parameters
    STEP 5:Create the directories
    STEP 6:Install Oracle
    STEP 7:Modify your .bash_profile


STEP 1: Download install files and update system

First you will need to download the Oracle setup files. Make sure you select the appropriate architecture for your system. Link to download the files from

It is recommended to update your system before you install Oracle. So please run as root

#yum update

You will also need a set of packages installed before you proceed with the actual install of Oracle.

#yum install compat-db gcc gcc-c++ libstdc++ pdksh sysstat compat-libstdc++-33
elfutils-libelf-devel elfutils-libelf-devel-static
unixODBC unixODBC-devel libaio-devel


STEP 2: Prepare your system for the install

Steps involved:

add users/groups
Modify kernel
create directories
set shell limits.

You can download the script files that will take care for you the kernel changes, directory creation and the shell limits adjustment. Once you unzip the files you will have to give each script executable permissions by issuing the command:

chmod +x name-of script.sh

Download the scripts from


STEP 3: Add user and groups

We will need to create specific groups and users that will be used by Oracle. Groups that will be created are oinstall and dba. User oracle will be created and it will has as it’s primary group the oinstall group and secondary group the dba group.

To add the groups run the commands:

#groupadd oinstall
#groupadd dba

To add the oracle user with the group ownership described above run the following command:

#useradd -m -g oinstall -G dba oracle

The m option creates the home directory for oracle. The g option sets oinstall as the primary group for the oracle user. the G option sets dba as the secondary group.


STEP 4:Modify kernel parameters and set shell limits

The sysctl.conf file holds kernel parameters and needs to have certain parameters added to it. The parameters that will need to be modified are listed below.

In addition on the scripts you downloaded above there is the script that will set your shell limits. You need to give the script execute permissions like shown above and then run the script.

Below is a listing of the Kernel parameters that are going to be changed and what they do.

/proc/sys/kernel/shmmni - Max number of shared memory segments.
/proc/sys/kernel/sem    - Max number/size of semaphore allocated.
/proc/sys/fs/file-max sets the max number of file-handles kernel  allocates
*/proc/sys/net/ipv4/ip_local_port_range defines the local port range TCP/UDP uses.
/proc/sys/net/core/net.core.rmem_default maximum socket receive buffer size
/proc/sys/net/core/net.core.wmem_default - Default Send Window
/proc/sys/net/core/net.core.rmem_max - Maximum TCP Receive Window
/proc/sys/net/core/net.core.wmem_max - Maximum TCP Send Window
/proc/sys/fs/aio-max-nr – Maximum number of concurrent requests
*There are  two numbers.1st # is the 1st local port.2nd is the last local port.


STEP 5:Create the directories

You can either use the script provided above or you can run these commands your self.

mkdir -p /u01
mkdir -p /opt/oracle
mkdir -p /opt/oracle/product
mkdir -p /opt/oraInventory

Change permissions on the directories

These commands will set as owner of these directories the oracle user in group oinstall

chown -R oracle:oinstall /u01
chown -R oracle:oinstall /opt/oracle
chown -R oracle:oinstall /opt/oraInventory

These commands will give the directories Owner:read,write,execute Group:read,write,execute Others:read and execute

chmod -R 775 /u01
chmod -R 775 /opt/oracle
chmod -R 775 /opt/oracle/product


STEP 6:Install Oracle

Move the zip files to the /opt/oracle directory

mv location-of-fileA location-of-fileB /opt/oracle

Change the permissions to these files by issuing the command below. The command will make oracle the owner of these files with group oinstall.

chown oracle:oinstall name_of_file

At this point it is a good idea to reboot the machine in order to make sure the kernel changes will take effect. Once the machine comes up again, go back to the /opt/oracle directory and unzip the files. Make sure to unzip both files.

unzip name-of-file

A directory called database will be created. Enter that directory and issue the command

./runinstaller

  • Select the first option

Install-Option-1.JPG

  • Since this is a how to on advanced install, select the second checkbox.

Example.jpg

  • Unless you have another instance installed, select the first option.

Nodeinstall3.jpg

  • Select the second radiobox. It offers a more verbose option menu

Instasll-type-4.jpg

  • Select the first option. It provides all features available.

DB-edition7.jpg

  • You can select the Select Options and select features you wish to install. Leave it at default if not sure.

DB-edition7a.jpg

  • Select the directories that we created earlier, as shown in the screenshot. This Oracle Base location is the root install location of Oracle. The /opt/oracle/11.2.0/dbhome_1 is where system files are needed for oracle to work.

Install-loc-8.jpg

  • In this folder log files are kept of software that has been installed

Inventory-9.jpg

  • Select purpose of database. We want a General purpose database.

Config-10.jpg

  • Enter the name of your database and your SID (Service ID)

SID-11.jpg

  • Leave the default settings for memory management. You can select the Sample Schemas and select for the install to create the sample schemas.

Config-12.jpg

  • If you must….go ahead.

Management13.jpg

  • Location of the actual oracle data files. This particular install I was doing was being one on a virtual machine which had only one partition to it, thus the simplistic install.

Storage-options14.jpg

  • If you must…go ahead

Backup-15.jpg

  • This is a familiar window you can see in a MS-SQL2008 install.

Password-16.jpg

  • SYSDBA and SYSOPER group selection. If you remember these are the groups that were created earlier.

Owners17.jpg

  • If there are any left over configuration settings they will be taken of by running the script. Follow the instructions on the screen.

Fix18.jpg

  • It may also be the case that there are packages missing that are not installed yet. Use the yum install command to install any missing packages.

Missing-package19.jpg

  • This is a very important file. It provides info about your install. It has been a life saver in my little adventures.

Important20.jpg

  • Yaay. You can login by opening your browser. Enter your hostname and the appropriate port number given to you right after the install. Enter as username sys. From the dropdown list select sysdba and enter the password you entered during the install.

Yay.jpg

STEP 7:MODIFY YOUR  .bash_profile file

If you run the sqlplus utility you may receive the following errror:

SP2-0667: Message file sp1<lang>.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

You can rectify this by doing the following

You will need to enter some variables to your .bash_profile, which in case you do not know is located in your home directory. With your favorite editor edit this file. Here is the variables that you need in order for the install to be completed.

ORACLE_BASE=/opt/base

ORACLE_OWNER=oracle; export ORACLE OWNER

ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1

ORACLE_SID=ORACLE

PATH=$PATH:$ORACLE_HOME/bin

Share Button

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.