May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

How to setup Oracle 11g DB

To install Oracle 11g DB,  just install the following packages at the startup and continue

# yum install binutils gcc glibc glibc-devel cpp make setarch pdksh libaio libaio-devel compat-gcc-34 compat-gcc-34-c compat-libstdc-296 compat-libstdc-33 sysstat -y

Creating groups and user for Oracle Installation:

# groupadd oinstall
# groupadd dba
# useradd -m -g oinstall -G dba -d /home/oracle -s /bin/bash -c  “Oracle Software Owner” oracle
# passwd oracle

Installing Oracle DB:

# mv 11g package to /home/oracle
# cd /home/oracle
# chown oracle *
# cd

Now as oracle user execute the installation script

# xhost +
# su – oracle
unzip both the packages, after unzip it, a folder called “database” is created.

# cd database
# ./runInstaller

a graphical window will appear, Let me tell what all options to select in each window

1st window:-Next2nd Window:-

select Create and configure a database

3rd Window:-

select Server Class

4th Window:-

Single Instance database Installation

5th Window:-

Advanced Install

6th Window:-

select the language to install(english)

7th Window:-

enterprise edition

8th Window:-

Oracle Base:-
/home/oracle/app/oracleSoftware Location:-
/home/oracle/app/oracle/product/11.2.0/dbhome_1
9th Window:-Inventory Directory:-
/home/oracle/app/oraInventoryInventory Group name:-
oinstall

10th Window:-

General Purpose

11th Window:-

Global Database Name:-
orcl

SID
orcl

12th Window:-

select all default characters

13th Window:-

default option

14th Window:-

File System: /home/oracle/app/oracle/oradata

15th Window:-

Do not enable Automated Backup

16th Window:-

use same password for all accounts: oracle

17th Window:-

DataBase Administrator group:- dba
DataBase Operator group:- oinstall

18th Window:-

if any error comes run the script and if packages error comes install those packages using yum.

 fix and check again (tab) / and install packages needed using yum
[
Setting Kernel Parameters…
fs.file-max = 65536
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_max = 1048576
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
]

19th Window:-

finish, installation start

20th Window:-

installing

21th Window:-

close

Connecting to the Database, Now reboot server and login as oracle user. To login to our database, we run sqlplus. But before it, set Environment Variables. Add the below lines to .bash_profile file in the /home/oracle directory.

# su – oracle  [ login as oracle user ]

Then export Oracle Path:- ( for 11g )

vim .bash_profile
vim /etc/profile

Then export Oracle Path:-

export ORACLE_BASE=/home/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH

This will Complete the basic steps in Oracle DB setup.

Now you can start the database.

$ lsnrctl start

The above command starts the database listener. Below command starts the database
$ dbstart[ /etc/oratab
orcl:/home/oracle/oracle/product/10.2.0/db_1:Y ( change N to Y ) ]To start the Oracle Enterprise Manager execute the below command.
$ emctl start dbconsole
Now open a new terminal and access the newly created database using
sqlplus as oracle user.[ # su – oracle ]
$ sqlplus system/oracle@orcl
NOTE : oracle is the password set for the newly created database during installation

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>