contents oracle... · author – a.kishore contents installation of oracle 11g database on oralce...

84
Author – A.Kishore http://www.appsdba.info CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8.................................................................... 2 Oracle 11g Database Software ....................................................................................................................... 2 Other Software’s required .............................................................................................................................. 3 Oracle VirtualBox Software ............................................................................................................................ 4 Oracle Enterprise Linux 5.8 software.............................................................................................................. 4 Oracle VirtualBox Installation ......................................................................................................................... 6 Virtual Machine Setup .................................................................................................................................... 6 Guest Operating System Installation ............................................................................................................ 16 Prepare Steps........................................................................................................................................................ 37 Edit the “hosts” file of Linux1 . ..................................................................................................................... 37 Edit the “sysctl.conf” of linux1 with the following values. ........................................................................... 38 Edit the “limits.conf” file of linux1 with the following values...................................................................... 38 Create directories and grant permissions..................................................................................................... 39 Install missing packages ................................................................................................................................ 40 Install Guest Additions .................................................................................................................................. 45 Snapshot linux1 - Backup.............................................................................................................................. 49 Oracle Installation ................................................................................................................................................. 50 NFS sharing of the software (linux HOST)..................................................................................................... 50 Windows sharing to Linux (windows host) ...................................................................................................... 51 run vncserver on the Guest machine............................................................................................................ 54 Install Database ............................................................................................................................................ 55 Verify the installation ................................................................................................................................... 80 Start and Stop Scripts ................................................................................................................................... 82 Client Access ................................................................................................................................................. 83

Upload: others

Post on 08-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

CONTENTS

InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8.................................................................... 2

Oracle 11g Database Software ....................................................................................................................... 2

Other Software’s required .............................................................................................................................. 3

Oracle VirtualBox Software ............................................................................................................................ 4

Oracle Enterprise Linux 5.8 software.............................................................................................................. 4

Oracle VirtualBox Installation ......................................................................................................................... 6

Virtual Machine Setup .................................................................................................................................... 6

Guest Operating System Installation ............................................................................................................ 16

Prepare Steps........................................................................................................................................................ 37

Edit the “hosts” file of Linux1 . ..................................................................................................................... 37

Edit the “sysctl.conf” of linux1 with the following values. ........................................................................... 38

Edit the “limits.conf” file of linux1 with the following values...................................................................... 38

Create directories and grant permissions..................................................................................................... 39

Install missing packages ................................................................................................................................ 40

Install Guest Additions .................................................................................................................................. 45

Snapshot linux1 - Backup .............................................................................................................................. 49

Oracle Installation................................................................................................................................................. 50

NFS sharing of the software (linux HOST) ..................................................................................................... 50

Windows sharing to Linux (windows host) ...................................................................................................... 51

run vncserver on the Guest machine............................................................................................................ 54

Install Database ............................................................................................................................................ 55

Verify the installation ................................................................................................................................... 80

Start and Stop Scripts ................................................................................................................................... 82

Client Access ................................................................................................................................................. 83

Page 2: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

INSTALLATION OF ORACLE 11G DATABASE ON ORALCE ENTERPRISE LINUX – 5.8

Here is my setup, I have 16 GB Desktop with Linux installed and with 250 SSD on which the

installation was done. I have created 1 VMs using Oracle Virtual Machine. This installation is also

applicable with the folks who are having laptop’s with 8 GB RAM

ORACLE 11G DATABASE SOFTWARE

11.2.0.1 Database Software from OTN

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-

100572.html

Oracle 11g client on Windows Desktop

Linux /Windows

Desktop/Laptop

8/16 GB RAM / 250 SSD

{HOST}

Linux 5.8

4 GB RAM/50 GB

{GUEST}

Page 3: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

OTHER SOFTWARE’S REQUIRED

vnc viewer free version on windows

http://www.realvnc.com/cgi-bin/download.cgi?product=free4/vncviewer/win

Instructions -

http://www.appsdba.info/docs/oracle_apps/redhat/VNC_Doc.pdf

Winscp (free software)

Copy files from windows to linux and vice versa

http://winscp.net/eng/download.php

(this software we will use for ftp between windows and linux)

Instructions -

http://www.appsdba.info/docs/oracle_apps/redhat/WinSCP.pdf

Download putty.exe only

Putty is used to maintenance of you Oracle database

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Instructions -

http://www.appsdba.info/docs/oracle_apps/redhat/PuTTY.pdf

Page 4: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

ORACLE VIRTUALBOX SO FTWARE

http://download.virtualbox.org/virtualbox

Linux Users

http://download.virtualbox.org/virtualbox/5.0.10/VirtualBox-5.0.10-104061-Linux_x86.rpm

Windows Users

http://download.virtualbox.org/virtualbox/5.0.6/ VirtualBox-5.0.6-103037-Win.exe

ORACLE ENTERPRISE LINUX 5.8 SOFTWARE

http://edelivery.oracle.com/linux

You need to Sign in to edelivery.oracle.com and search for Oracle Linux

Page 5: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Select Oracle Linux 5.8

Select the DVD version –

Note:, if you want to Install Linux on a new Server, you need to burn them using the image option available with your cd-writer software, if you are using Oracle VM u may not need

Refer: http://www.petri.co.il/how_to_write_iso_files_to_cd.htm

Page 6: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

ORACLE VIRTUALBOX INSTALLATION

rpm -Uvh VirtualBox-5.0-5.0.2_102096_el5-1.x86_64.rpm on Linux box

or Install the VirtualBox-5.0.6-103037-Win.exe version on the Windows host machine

VIRTUAL MACHINE SETUP

Go to System Tools – Oracle VM VirtualBox

Page 7: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Start VirtualBox and click the "New" button on the toolbar. Click the "Next" button on the first page of the Virtual Machine Wizard.

Page 8: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Enter the name "linux1", OS "Linux" and Version "Oracle (64 bit)", then click the "Next" button.

Page 9: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 10: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 11: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 12: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 13: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

The "linux1" VM will appear on the left hand pane. Scroll down the "Details" tab on the right and click

on the "Network" link.

Page 14: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 15: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Make sure "Adapter 1" is enabled, set to "Bridged Adapter" and "eth0",

Page 16: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

The virtual machine is now configured so we can start the guest operating system installation.

GUEST OPERATING SYST EM INSTALLATION

In the storage section, select the OEL5.8 iso file

V31120-01.iso

Page 17: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Start the virtual machine by clicking the "Start" button on the toolbar. The resulting console window will contain the Oracle Linux boot screen.

Page 18: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 19: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 20: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 21: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Click Yes

Page 22: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 23: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Let us go with DHCP for now, once installation is complete we shall make it static

Page 24: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 25: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 26: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 27: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Reboot the Guest Machine

Page 28: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 29: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 30: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 31: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Reboot the machine

Page 32: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Identify the IP address and make it static

Page 33: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 34: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 35: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Save the settings

Page 36: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

You need to start the network using below command

Service network restart

Page 37: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

PREPARE STEPS

EDIT THE “HOSTS” FILE OF LINUX1 .

Follow the below steps on linux1

vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

192.168.1.2 linux1.appsdba.info linux1

Verify

ping linux2

PING linux2.appsdba.info (192.168.1.4) 56(84) bytes of data.

64 bytes from linux2.appsdba.info (192.168.1.4): icmp_seq=1 ttl=64 time=0.033 ms

64 bytes from linux2.appsdba.info (192.168.1.4): icmp_seq=2 ttl=64 time=0.039 ms

Page 38: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

EDIT THE “SYSCTL.CONF” OF LINUX1 WITH THE FOLLOWING VALUES.

vi /etc/sysctl.conf

kernel.core_uses_pid = 1

kernel.shmmax=4294967295

kernel.shmmni=4096

kernel.sem=256 32000 100 142

fs.file-max = 6815744

kernel.msgmnb = 65535

kernel.msgmni = 2878

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.tcp_wmem = 262144 262144 262144

net.ipv4.tcp_rmem = 262144 262144 262144

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

EDIT THE “LIMITS.CONF” FILE OF LINUX1 WITH THE FOLLOWING VALUES.

vi /etc/security/limits.conf

* hard nofile 327680

* soft nofile 262144

* hard nproc 327680

* soft nproc 262144

* hard memlock 3145728

* soft memlock 3145728

* hard stack 16384

* soft stack 10240

Page 39: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Create "oracle" User and Directories in both nodes.

groupadd -g 1000 oinstall

groupadd -g 1031 dba

useradd -u 1101 -g oinstall -G dba oracle

CREATE DIRECTORIES AND GRANT PERMISSIONS

mkdir -p /u01/app/oracle

chown -R oracle:oinstall /u01/app/

chmod -R 775 /u01/app/oracle

chown oracle:oinstall /u01/app/oracle

mkdir –p /u01/app/oraInventory

chmod -R 775 /u01/app/oraInventory

cd /u01/app

chown -R oracle:dba oraInventory

Change the password of oracle user

[root@rac1 home]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

Page 40: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

INSTALL MISSING PACKAGES

Please download the packages required

http://www.appsdba.info/packages/58.zip

Using winscp transfer the files to linux box

Page 41: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 42: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

# From Oracle Linux 5 DVD

To identify the missing packages

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \

openmotif21 \

xorg-x11-libs-compat \

gcc \

gcc-c++ \

glibc \

glibc-common \

glibc-devel \

libgcc \

libstdc++-devel \

libstdc++ \

libXi \

libXp \

libaio \

libgomp \

make \

gdbm \

sysstat \

compat-libstdc++-296 \

compat-libstdc++-33 \

elfutils-libelf-devel \

elfutils-libelf-devel-static \

libaio-devel \

unixODBC \

unixODBC-devel \

| grep "not installed"

Page 43: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

rpm -Uvh sysstat-7.0.2-11.el5.x86_64.rpm

rpm -Uvh libaio-devel-0.3.106-5.i386.rpm

rpm -Uvh libaio-devel-0.3.106-5.x86_64.rpm

rpm -Uvh unixODBC-libs-2.2.11-10.el5.i386.rpm

rpm -Uvh unixODBC-libs-2.2.11-10.el5.x86_64.rpm

rpm -Uvh unixODBC-2.2.11-10.el5.i386.rpm

rpm -Uvh unixODBC-2.2.11-10.el5.x86_64.rpm

rpm -Uvh unixODBC-devel-2.2.11-10.el5.i386.rpm

rpm -Uvh unixODBC-devel-2.2.11-10.el5.x86_64.rpm

rpm -Uvh xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm

rpm -Uvh libXp-1.0.0-8.1.el5.i386.rpm

rpm -Uvh libXp-1.0.0-8.1.el5.x86_64.rpm

rpm -Uvh openmotif21-2.1.30-11.EL5.i386.rpm

rpm -Uvh compat-db-4.2.52-5.1.x86_64.rpm

rpm -Uvh compat-db-4.2.52-5.1.i386.rpm

Page 44: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Login as the oracle user and create a file oracle.env.

su – oracle

Note : Changed the hostname marked in pink

cat > oracle.env

# User specific environment and startup programs

# database name - ORCL

PATH=$PATH:$HOME/bin

export PATH

PATH=$PATH:$HOME/bin

export PATH

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

DB_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

ORACLE_HOSTNAME=linux1.appsdba.info; export ORACLE_HOSTNAME

export ORACLE_UNQNAME=ORCL

export ORACLE_SID=ORCL

ORACLE_HOME=$DB_HOME; export ORACLE_HOME

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

ORACLE_TERM=xterm; export ORACLE_TERM

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

Page 45: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

INSTALL GUEST ADDITIONS

Log into the VM as the root user and add the "divider=10" option to the kernel boot options in "/etc/grub.conf" file to reduce the idle CPU load. The entry should look something like this.

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00

# initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Enterprise Linux (2.6.18-164.el5)

root (hd0,0)

kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet divider=10

initrd /initrd-2.6.18-164.el5.img

Page 46: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Click on the "Devices > Install Guest Additions" menu option at the top of the VM screen, then run the

following commands.

Page 47: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

df –h

cd /media/VBOXADDITIONS_5.0.2_102096/

sh ./VBoxLinuxAdditions.run

The VM will need to be restarted for the additions to be used properly. The next section requires a

shutdown so no additional restart is needed at this time.

Page 48: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 49: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

SNAPSHOT LINUX1 - BACKUP

Shutdown linux1

After shutdown go to Oracle VM

Page 50: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

ORACLE INSTALLATION

NFS SHARING OF THE SOFTWARE (LINUX HOST)

Note : You can use NFS sharing or copy the software

The software is available on host machine – 192.168.1.31

On the server (host machine)-

vi /etc/exports

/software/RAC_SOFTWARE/ 192.168.1.10(ro)

service nfs restart

On the client – node1

mkdir –p /software

mount 192.168.1.11:/d01/oracle/software/RAC_SOFTWARE/software

Page 51: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

WINDOWS SHARING TO L INUX (WINDOWS HOST)

In this topic we shall see how to share a windows folder and access it in Linux

1> Share a folder in Windows

Page 52: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 53: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Windows IP address 192.168.1.9 and USER is the user in the windows 7/8

Now login to Linux and access all the shared folder on Windows

smbclient -L 192.168.1.9 -U USER

mount -o username=USER //192.168.1.9/11204 /software

Note:

If it is too complicated, you can winscp to copy the files from windows to linux

Page 54: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

RUN VNCSERVER ON THE GUEST MACHINE

From windows machine using vncviewer

Page 55: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

INSTALL DATABASE

Let’s install the Oracle Database

Run the environment file – oracle.env

As root run - +xhost

Page 56: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 57: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 58: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 59: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 60: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 61: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 62: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 63: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 64: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 65: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 66: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Select character Set

Page 67: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 68: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 69: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 70: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 71: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 72: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

oracle_4U

Page 73: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 74: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 75: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Problem –

Solution

cd /var/tmp/

rm -rf .oracle/

Page 76: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 77: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

As root user

/u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Running Oracle 11g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin ...

Page 78: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

Copying coraenv to /usr/local/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.

Page 79: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 80: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

VERIFY THE INSTALLATION

[oracle@linux1 ~]$ . ./oracle.env

[oracle@linux1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Sat Dec 12 20:41:17 2015

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL> select name from v$database;

NAME

---------

ORCL

select member from v$logfile

union

select name from v$controlfile

union

select name from v$datafile

union

select name from v$tempfile;

Page 81: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

Page 82: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

START AND STOP SCRIPTS

cat > start_db.sh

. ./oracle.env

lsnrctl start

$ORACLE_HOME/bin/sqlplus "/ as sysdba" << EOF

startup

EOF

cat > stop_db.sh

. ./oracle.env

lsnrctl stop

$ORACLE_HOME/bin/sqlplus "/ as sysdba" << EOF

shutdown immediate

EOF

Page 83: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info

CLIENT ACCESS

Install Oracle client on your laptop/desktop

Copy below entry from server and paste it in the client

cd $ORACLE_HOME/network/admin

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = oracledba11.appsdba.info)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = ORCL)

)

)

Make the entry in your local tnsnames.ora

C:\app\Kishore\product\11.2.0\client_1\network\admin

tnsping ORCL

Page 84: CONTENTS Oracle... · Author – A.Kishore  CONTENTS InStallation of Oracle 11g database on Oralce Enterprise Linux – 5.8..... 2

Author – A.Kishore

http://www.appsdba.info