Systems Engineering and RDBMS

Configuring RedHat Linux for Oracle 10gR2 client installation

Posted by decipherinfosys on June 4, 2007

Here is a blog post detailing how to configure an environment on a RedHat Linux OS for the installation of a 10gR2 Oracle Client. It assumes some familiarity with both RHEL and Oracle.

These are the steps:

1) Create the Oracle user and necessary groups:

a. Log into the machine as root.

i. Either telnet as a lesser user and su to root, or use putty or some other ssh connection.

b. Before we can create the user, we must first create the groups that we are going to assign the user to. We need two groups for the installation: oinstall and dba. Although it is not required for the installation, we try to use the same group and userid’s across platforms. For the Oracle user we want to use 501, oinstall – 300, dba – 500. It is very possible these userid’s are not available (ie used by another group). If this cannot be changed, then you can pick another id, or have the system do it for you. The purpose of this is to make file sharing simpler when mounting volumes for other machines. The –g option indicates you’re a going to manually specify the group id. Below are the commands to create the necessary groups.

i. groupadd -g 300 oinstall
ii. groupadd –g 500 dba

c. Create the Oracle user (You can also use a GUI tool for this, if available). For the user, we want the id to be 501. Again another can be used. The common id convention is for convenience. Below is the command to create the oracle user.

i. useradd -u 501 -g oinstall -G dba -d /home/oracle -s /bin/ksh oracle

1. –u sets the userid to 500
2. –g specified the primary group to be oinstall
3. –G specifies the dba as an additional group oracle will belong to. This can be a comma delimited list of groups.
4. –d specifies /home/oracle to be the user’s system home directory. It will be created automatically.
5. –s specifies the default shell for the oracle user to be /bin/ksh. This is the korn shell.

ii. This will create the user oracle home, but the group for the oracle home will be oinstall. This should be changed as it has nothing to do with the installation. Go to the /home directory and execute the following:
chgrp -R dba oracle
The /home/oracle directory is a directory where DBA’s can keep scripts and such.
iii. The password for the oracle user needs to be set. Use the passwd command to do this:
passwd oracle
You will be prompted to enter the password and then confirm.

iv. In korn shell, the user’s environment is initialize via settings in the “.profile” file. The two attachments below can be used to initialize the environments. The ‘.’ in front of the file name indicates that the file is hidden. It is not a typo.

1. “.profile” This will be the initializing file. For oracle, our convention is to keep this file fairly simple. Since Oracle software can have multiple “Oracle” (not system) homes, we create additional “.” environment files that allow DBA’s to easily change the environment for specific homes. This will become clearer during the oracle client installation instruction.
export PATH=.:$PATH:/sbin

# set up the terminal:
stty istrip
stty erase “^?” kill “^U” intr “^C” eof “^D”

export TERM
# Set up the shell environment:
set -u
trap “echo ‘logout'” 0

# Set up the shell variables:
export EDITOR

set -o vi

#. ./.oracle92RACenv
. ./.oracle10gRACenv

2. “.” environment file can be call what ever is appropriate. In this case, we will call it “.oracle10gR2ClientEnv”. This will be more detailed in the environmental variables. It will contain the settings for a specific “Oracle” Home. There are two important values in this file, that will need to be changed. That is the ORACLE_HOME value and the ORACLE_BASE value. Where ever the ORACLE_HOME is for this installation, that full path will need to be specified. Same for the ORACLE_BASE. These will be defined in the following steps. You will need to revisit this file to ensure it is configured properly.

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:${HOME}/bin:/usr/bin/X11:/sbin:.;export PATH
umask 022
set -o vi
alias ll=’ls -ltr’

ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE


ORA_NLS33=${ORACLE_HOME}/ocommon/nls/admin/data;export ORA_NLS33

PATH=${ORACLE_HOME}/bin:/usr/ccs/bin:/usr/local/bin:/usr/vacpp/bin:/opt/IBMJava2-131/bin:/opt/IBMJava2-131/jre/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin; export PATH
CLASSPATH=${ORACLE_HOME}/JRE/lib:${ORACLE_HOME}/jlib:${ORACLE_HOME}/rdbms/jlib:${ORACLE_HOME}/network/jlib;export CLASSPATH

TMPDIR=/u01/tmp;export TMPDIR

MACHINE_NAME=`hostname -s`;export MACHINE_NAME
PS1=’10g_${ORACLE_SID}_${MACHINE_NAME} ${PWD}=> ‘;export PS1

2) Create the installation directories for the oracle binaries. For this example /u01 will be used as the base volume.

a. As root create an “app” directory off of /u01.
b. Change the owner and group of the “app” directory as follows:
chown oracle:dba app
c. As oracle, Create the following path: “/u01/app/oracle/product/Ora102” This is the value needed for the ORACLE_HOME parameter in the environment file.
At this point, the group associated with the files and directories above “app” should be oinstall. This will be done by default as you create the directories.
d. In the environment file, set the ORACLE_BASE value to “/u01/app/oracle”.
set the ORACLE_HOME value to “${ORACLE_BASE}/ product/Ora102”.
e. Once these are set correctly, re-initialize by executing “. ./.profile”.
f. At the command prompt, confirm the settings by using the following example: (note* the bolded values should be correct)

10gR2Client_RHBLD01 /home/oracle=> . ./.profile
10gR2Client_RHBLD01 /home/oracle=>
10gR2Client_RHBLD01 /home/oracle=> echo $ORACLE_HOME
10gR2Client_RHBLD01 /home/oracle=> echo $ORACLE_BASE
10gR2Client_RHBLD01 /home/oracle=> cd $ORACLE_HOME
10gR2Client_RHBLD01 /u01/app/oracle/product/Ora102=> cd $ORACLE_BASE
10gR2Client_RHBLD01 /u01/app/oracle=>

g. Create the temporary directory that is specified by TMPDIR in the “.” environment file. Do not forget to do this. The client installation may continue all the way through with out error, but when you attempt to execute sqlplus and connect to a database, you will get errors.
Change the owner ship of the temporary directory using: “chown oracle:dba tmp”
Validate by: cd $TMPDIR. This should take you to the temporary directory specified.

3) Pre-Installation requirements:

a. Kernel version: 2.6.9-5.EL

10gR2Client_RHBLD01 /u01/Installation_Media/client=> uname -a
Linux RHBLD01 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux

b. Required packages(version must be these or higher):


If not installed, then install. If not the appropriate version, then upgrade the component.
The packages can be checked for their version by executing the following:

rpm –q <package_name>

10gR2Client_RHBLD01 /u01/Installation_Media/client=> rpm -q binutils

example(not installed):
10gR2Client_RHBLD01 /u01/Installation_Media/client=> rpm -q xscreensaveer
package xscreensaveer is not installed

There are several ways to update/install the packages:

1) manually update/install the packages using rpm. (becomes painful with dependencies)
2) use up2date to get the latest version of the packages. Up2date handles dependencies for you by installing or upgrading dependent packages.
3) Use the up2data gui if available.

4) In order to perform the installation, you will need to have an xserver (Exceed) running on your local machine or you will have to go directly to the console, which will need a gui interface. I will give instruction for the remote connection using an xserver.

a. telnet to the machine as oracle.
b. Go to the directory where you have unpacked the installation software.
c. Execute “export DISPLAY=<your ipaddress>:0.0” This is case sensitive.
d. Start the xserver on your machine in passive mode.
e. Execute ./runInstaller
f. The gui installation should appear on your machine for the Oracle client.

5) You are now ready to begin the client installation process. Please refer to the installing Oracle 10gR2 client installation document for more details. You can also refer our previous blog post for it.

Sorry, the comment form is closed at this time.

%d bloggers like this: