oracledba.help
Install

Oracle 11 (11.2.0.1.0) Client Installation

Overview

What follows is the most common way to install the Oracle 11 client.

Prerequisites

  1. Download install file to /tmp/linux.x64_11gR2_client.zip
  2. Perform? Oracle Linux system prep.

Procedure

 -- Create oracle User
 su -
 groupadd --gid 54321 oinstall
 useradd --uid 54321 --gid oinstall oracle
 passwd oracle

 mkdir -p /u01/app/oracle
 mkdir /u01/app/oracle/sw
 mkdir /u01/oraInventory
 chown -R oracle:oinstall /u01/app
 chown -R oracle:oinstall /u01/sw

 mkdir -p /u01/oraInventory
 chown -R oracle:oinstall /u01/oraInventory
 chmod -R 765 /u01

 -- Make Shell Entries
 su - oracle

 vi .bashrc
 Go to example.

 source .bashrc 
 printenv|grep ORA

 -- Prep Install
 mkdir /u01/sw/OraCl11g
 cp /tmp/linux.x64_11gR2_client.zip /u01/sw/OraCl11g/
 cd /u01/sw/OraCl11g/
 unzip linux.x64_11gR2_client.zip

 -- Run Installer
 Log Into GUI as "oracle" user.
 cd /u01/sw/OraCl11g/client
 ./runInstaller

 You will be prompted to run root scripts.

Post Install Tasks

 -- Configure tnsnames.ora
 cd /u01/app/product/11.2.0/client_1/network/admin
 vi tnsnames.ora
 Go to example.

 -- Test
 tnsping MYDB1 10

 export ORACLE_SID=MYDB1
 sqlplus 'scott/tiger@MYDB1'

 export ORACLE_SID=MYDB2
 sqlplus 'sys/********@MYDB2 as sysdba'

APPENDIX

.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

# User specific aliases and functions
export ORACLE_SID=oradb
export ORACLE_BASE=/u01/app
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/client_1
export PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/local/bin:.local/bin:$HOME/bin
export TMP=/tmp
export TMPDIR=/tmp

# Aliases - Common
alias cl='crontab -l'
alias l9='ls -alt | head -9' 
alias l20='ls -alt | head -20'
alias l50='ls -alt | head -50'
alias tf='date;ls -l|wc -l'

# DBA Aliases
ORACLE_DB=oradb
alias cdbin='cd $ORACLE_HOME/bin;pwd'
alias cdtrace='cd $ORACLE_BASE/diag/rdbms/$ORACLE_DB\/$ORACLE_SID\/trace;pwd'
alias cdnet='cd $ORACLE_HOME/network/admin;pwd'

alias oslog='tail -f /var/log/messages'
alias sqp='rlwrap sqlplus sys/mypw@oradb as sysdba'
alias sqldev='cd $ORACLE_HOME/sqldeveloper/sqldeveloper/bin;./sqldeveloper &'
alias src='source $HOME/.bashrc'

tnsnames.ora

MYDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydb1)
    )
  )

MYDB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.52)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydb2)
    )
  )