Oracle: Installing Oracle 10g on Linux

Tags:

Note: This article is intended to provide you an overview of the installation process. Please do not use this as reference for installing a production system. These instructions are purely for educational purpose only.

sudo apt-get install build-essential lesstif2-dev alien gcc rpm make binutils gawk alien lesstif2 libc6 libaio1 libstdc++5 libaio libc6-dev rpm libmotif3 libstdc++5 libg++2.8.1.3-glibc2.2 ksh gcc-3.3 g++-3.3 libstdc++5 gcc libaio1  
geeko@labster:~$ sudo apt-get install build-essential lesstif2-dev alien gcc rpm make binutils gawk alien lesstif2 libc6 libaio1 libstdc++5 libaio libc6-dev rpm libmotif3 libstdc++5 libg++2.8.1.3-glibc2.2 ksh gcc-3.3 g++-3.3 libstdc++5 gcc libaio1  
Password:  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
build-essential is already the newest version.  
lesstif2-dev is already the newest version.  
alien is already the newest version.  
gcc is already the newest version.  
rpm is already the newest version.  
rpm set to manual installed.  
make is already the newest version.  
binutils is already the newest version.  
alien is already the newest version.  
lesstif2 is already the newest version.  
lesstif2 set to manual installed.  
libc6 is already the newest version.  
libaio1 is already the newest version.  
libstdc++5 is already the newest version.  
Note, selecting libaio1 instead of libaio  
libaio1 is already the newest version.  
libc6-dev is already the newest version.  
libc6-dev set to manual installed.  
rpm is already the newest version.  
libstdc++5 is already the newest version.  
ksh is already the newest version.  
libstdc++5 is already the newest version.  
gcc is already the newest version.  
libaio1 is already the newest version.  
The following extra packages will be installed:  
cpp-3.3 libstdc++2.10-glibc2.2 libstdc++5-3.3-dev  
Suggested packages:  
gcc-3.3-doc libstdc++5-3.3-doc  
The following NEW packages will be installed:  
cpp-3.3 g++-3.3 gawk gcc-3.3 libg++2.8.1.3-glibc2.2 libmotif3 libstdc++2.10-glibc2.2 libstdc++5-3.3-dev  
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.  
Need to get 6877kB of archives.  
After unpacking 23.8MB of additional disk space will be used.  
Do you want to continue [Y/n]? y  
Get:1 http://us.archive.ubuntu.com feisty/main gawk 1:3.1.5.dfsg-4build1 [479kB]  
Get:2 http://us.archive.ubuntu.com feisty/main cpp-3.3 1:3.3.6-15ubuntu1 [1385kB]  
Get:3 http://us.archive.ubuntu.com feisty/main gcc-3.3 1:3.3.6-15ubuntu1 [549kB]  
Get:4 http://us.archive.ubuntu.com feisty/main libstdc++5-3.3-dev 1:3.3.6-15ubuntu1 [775kB]  
Get:5 http://us.archive.ubuntu.com feisty/main g++-3.3 1:3.3.6-15ubuntu1 [1772kB]  
Get:6 http://us.archive.ubuntu.com feisty/universe libstdc++2.10-glibc2.2 1:2.95.4-24 [329kB]  
Get:7 http://us.archive.ubuntu.com feisty/universe libg++2.8.1.3-glibc2.2 1:2.95.4-24 [316kB]  
Get:8 http://us.archive.ubuntu.com feisty/multiverse libmotif3 2.2.3-1.5 [1273kB]  
Fetched 6877kB in 30s (224kB/s)  
Selecting previously deselected package gawk.  
(Reading database … 114401 files and directories currently installed.)  
Unpacking gawk (from …/gawk_1%3a3.1.5.dfsg-4build1_i386.deb) …  
Selecting previously deselected package cpp-3.3.  
Unpacking cpp-3.3 (from …/cpp-3.3_1%3a3.3.6-15ubuntu1_i386.deb) …  
Selecting previously deselected package gcc-3.3.  
Unpacking gcc-3.3 (from …/gcc-3.3_1%3a3.3.6-15ubuntu1_i386.deb) …  
Selecting previously deselected package libstdc++5-3.3-dev.  
Unpacking libstdc++5-3.3-dev (from …/libstdc++5-3.3-dev_1%3a3.3.6-15ubuntu1_i386.deb) …  
Selecting previously deselected package g++-3.3.  
Unpacking g++-3.3 (from …/g++-3.3_1%3a3.3.6-15ubuntu1_i386.deb) …  
Selecting previously deselected package libstdc++2.10-glibc2.2.  
Unpacking libstdc++2.10-glibc2.2 (from …/libstdc++2.10-glibc2.2_1%3a2.95.4-24_i386.deb) …  
Selecting previously deselected package libg++2.8.1.3-glibc2.2.  
Unpacking libg++2.8.1.3-glibc2.2 (from …/libg++2.8.1.3-glibc2.2_1%3a2.95.4-24_i386.deb) …  
Selecting previously deselected package libmotif3.  
Unpacking libmotif3 (from …/libmotif3_2.2.3-1.5_i386.deb) …  
Setting up gawk (3.1.5.dfsg-4build1) …  
Setting up cpp-3.3 (3.3.6-15ubuntu1) …  
Setting up gcc-3.3 (3.3.6-15ubuntu1) …  
Setting up libstdc++2.10-glibc2.2 (2.95.4-24) …  
Setting up libg++2.8.1.3-glibc2.2 (2.95.4-24) …  
Setting up libmotif3 (2.2.3-1.5) …  
Setting up libstdc++5-3.3-dev (3.3.6-15ubuntu1) …  
Setting up g++-3.3 (3.3.6-15ubuntu1) …  
geeko@labster:~$

  • Then I created the user and groups and configured the user.

sudo groupadd oinstall  
sudo groupadd dba  
sudo groupadd nobody  
sudo useradd -g oinstall -G dba,nobody -d /home/oracle -s /bin/bash oracle  
sudo mkdir -p /home/oracle  
(sudo chown oracle:dba /home/oracle

  • Now, the kernel parameters need to be updated, generally the thumb rule is that you can allocate max. upto 70% of the memory to Oracle.

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 = 1048576  
net.core.rmem_max = 1048576  
net.core.wmem_default = 262144  
net.core.wmem_max = 262144  
sudo /sbin/sysctl -p  
sudo vi /etc/security/limits.conf  
soft nproc 2047  
hard nproc 16384  
soft nofile 1024  
hard nofile 65536

  • Additional Setup before we start installation

Then on command line:

sudo ln -s /usr/bin/awk /bin/awk  
sudo ln -s /usr/bin/rpm /bin/rpm  
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so  
sudo ln -s /usr/bin/basename /bin/basename  
sudo touch /etc/redhat-release  
sudo vi /etc/redhat-release  
(Enter the line below in this file)  
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)

  • logout and login again as oracle then open the .bashrc in your home (/home.oracle) and add following lines. (Change the ORACLE_SID from ORADBA to any other name of your choice but limit to 8 characters- thats your DB name)

export ORACLE_BASE=/home/oracle/product  
export ORACLE_HOME=/home/oracle/product/10.2.0  
export ORACLE_SID=ORADBA  
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch

  • logout and login again as oracle, then copy the software tar file to /export/oracle

unzip 10201_database_linux32.zip (This will create a directory called database in current directory)  
cd database  
./runInstaller  
This should bring up the installer for you.

Root.sh

geeko@labster:~$ sudo /export/oracle/11.1.0/root.sh  
Password:  
Running Oracle 11g root.sh script…

The following environment variables are set as:  
ORACLE_OWNER= oracle  
ORACLE_HOME= /export/oracle/11.1.0

Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin  
The file "dbhome" already exists in /usr/bin. Overwrite it? (y/n)  
[n]: y  
Copying dbhome to /usr/bin …  
The file "oraenv" already exists in /usr/bin. Overwrite it? (y/n)  
[n]: y  
Copying oraenv to /usr/bin …  
The file "coraenv" already exists in /usr/bin. Overwrite it? (y/n)  
[n]: y  
Copying coraenv to /usr/bin …

Entries will be added to the /etc/oratab file as needed by  
Database Configuration Assistant when a database is created  
Finished running generic part of root.sh script.  
Now product-specific root actions will be performed.  
Finished product-specific root actions.  
geeko@labster:~$