Saturday, February 20, 2010

Installing Oracle Database on Linux

First of all install Oracle Enterprise Linux 4 operating system for installing oracle database on linux os just read my previous post Installing Oracle Enterprise Linux OS for Oracle Database

Configuring/Preparing Enterprise Linux OS for Oracle Database

Linux Operating system is installed successfully, now you need to configure it for installing oracle database. This section walks through the steps required to configure Oracle Enterprise Linux 4 OS for Oracle Database 10g Release 2.

1. Edit the /etc/hosts file must contain a fully qualified name for the server:
192.168.1.230 LinuxDB.mycompany.com LinuxDB

2. Login as “root” user and Right Click On Desktop > Open Terminal ( or su – root if already open)

3. Execute xhost +
4. Create the Oracle Groups, User Account named “oracle” and set oracle user password

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper

/usr/sbin/useradd -g oinstall -G dba,oper oracle
/usr/bin/passwd oracle


5. Create Directories, and assign ownership to “oracle” user

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


6. With an editor open /home/oracle/.bash_profile and add the entries at bottom of file.

umask 022
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
EDITOR=gedit export EDITOR

EXPORT NLS_LANG=.WE8MSWIN1252
ORACLE_HOSTNAME=LinuxDB.mycompany.com; export ORACLE_HOSTNAME

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin; export PATH
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib; export LD_LIBRARY_PATH

ORACLE_BASE=/oradisk/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

if [ $USER = "oracle" ]; then
ulimit -u 16384 -n 65536
fi

After editing/saving .bash_profile file check its working properly, on terminal execute following commands:

$ su – oracle
$ echo $TMP, $TMPDIR, $ORACLE_HOSTNAME
$ echo $ORACLE_BASE, $ORACLE_HOME
$ echo $ORACLE_SID $PATH


7. Configuring the Linux Kernel Parameters

Edit file /etc/sysctl.config in any editor and add following lines in bottom of file

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

The kernel changes made previously take effect with each reboot. Issue this command to set the kernel parameters:

/sbin/sysctl –p

8. Increase the shell limits by adding following lines in /etc/security/limits.conf file

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

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

Installing Oracle Database 10g on Linux

Lunch command terminal, Login as “oracle” user

copy, unzip 10201_database_linux32.zip Installer at /oradisk/app and execute following commands:

$ su – oracle
$ cd /oradisk/app
$ unzip 10201_database_linux32.zip


Start the Oracle Universal Installer

$ cd /oradisk/app/database
$ ./runInstaller


Oracle universal installer will appear, now follow as required

1. Select Installation Method

Select Basic Installation
Oracle Home Location: /oradisk/app/oracle/product/10.2.0/db
Installation Type: Enterprise Edition (1.3GB)
UNIX DBA Group: oinstall
Make sure Create Starter Database is checked
Global Database Name: demo1
Enter the Database Password and Confirm Password
Click on Next

2. Specify Inventory Directory and Credentials

Inventory Directory: /oradisku01/app/oracle/oraInventory
Operating System group name: oinstall
Click on Next
Product-specific Prerequisite Checks
If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
Click on Next
Summary
A summary of the products being installed is presented.
Click on Install.

5. Configuration Assistants

The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically

6. Execute Configuration Scripts
At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
Click on OK when finished.

7. End of Installation
Make note of the URLs presented in the summary, and click on Exit when ready.
Congratulations! Your new Oracle Database 10g Release 2 database is up and ready for use.

Connecting to Database

$ su – oracle
$ cd $ORACLE_HOME
$ sqlplus /nolog


 
SQL> connect /as sysdba
Connected.


SQL>

.

1 comments:

sap upgrades said...

Well done work. You wrote each and every steps for installing Oracle Database on Linux. I thinks its good post for the person who is first time installing the oracle database on Linux.