Databases

Installing Oracle 11g R2 on Oracle Linux 5.8

Used instructions on these links
http://www.oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-5.php
http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#i1011296

You can run firefox on the server and go to the oracle database download page. I'm using a 32 bit server so I chose

(11.2.0.1.0)
Download Linux x86 File 1, File 2 (2GB)

The user running Firefox needs write access to the downloads location

I downloaded them to /home/oracle, having run

 chmod 777 /home/oracle

Then I looged in as root, moved them to the root directory and unzipped them

unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip

You should now have a single directory called "database" containing installation files.

Pre requisites

Minimum of 2 GB RAM required To determine the RAM size, enter the following command:

grep MemTotal /proc/meminfo

At least 1 GB of disk space in the /tmp directory. To determine the amount of disk space available in the /tmp directory, enter the following command:

# df -h /tmp   -- this came to 285 GB

Easy pre req setup

The following sets up a lot of the prerequisites, including the users and groups

yum install oracle-validated
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/11.2.0/db_home1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Install Software

Now log back in as Oracle using the putty X11 settings

cd /database
./runInstaller

Deselect option to receive security updates, click Next, click Yes to confirm

Select install database software only, click Next

Select single database installation, click Next

Select Product Languages: Make sure all the languages you want are selected, click Next

Select Database Edition: Select Enterprise Edition, click Next

Specify Installation Location

Make sure that oracle base is
/u01/app/oracle
and the software location is
/u01/app/oracle/product/11.2.0/db_home1
click Next

Privileged Operating System Groups: Select dba for both OSDBA and OSOPER groups and click Next

Summary: click Finish

Install Product: displays the progress of the installation

Execute Configuration Scripts When the execute configuration scripts window appears, follow the steps in the window. Run the script(s) from root and accept all the defaults by just pressing enter.
Return to the window and click OK.

Finish: Click Close

Create Listener

netca

Oracle Net Configuration Assistant

Listener configuration, click Next

Add, click Next

I left name as LISTENER, click Next

Select Protocols: click Next

Use the standard port, click Next

click Next

click Finish

Create Database

Add the following to Oracle's .bash_profile

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=myoel.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_home1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Now using the oracle user, run dbca

Select create database and click Next

Select General Purpose or Transaction Processing click Next

Database Identification: Global Database Name: I used orcl.database.com, and for SID I used orcl

Management Options: leave Configure Enterprise Manager selected and click Next

Database credentials: I selected Use the same Administrative password for All Accounts

Database File locations: I just clicked Next

Recovery configuration: I just clicked Next

Database content: I select Sample Schemas

Initialisation Parameters: I select Sample Schemas

Database Storage click next

Create Options: Select Create Databse. Create Save as Database Template, name orcl Description: orcl Database Template.
Select Generate Databse Creation Scripts Destination Directory /home/oracle/dbscripts, click Next
saved summary as summary.html in /home/oracle. click /OK/Finish

Database Configuration Assistant displays
The Sevrver parameter file is in /db_home1/dbs/spfileorcl.ora the Database Control URL, in this case
https://myoel.localdomain:1158/em

Click the password management button. Scroll down to the HR username, deselect Lock Account and enter a password. click OK

click Exit

Using Enterprise Manager

From any machine on your network, enter the url for em. In my case this was
https://192.168.1.81:1158/em

enter sys,password and connect as SYSDBA

emctl start dbconsole