Oracle Client Installation in Linux

ORACLE CLIENT INSTALLATION IN LINUX

  • Download oracle client (Version -> 10201_client_linux_x86_64.cpio.gz)
  • gzip -d 10201_client_linux_x86_64.cpio.gz
  • cpio -idmv < 10201_client_linux_x86_64.cpio
  • LINUX USER/GROUP creation

    The following local UNIX group and user must exist on the system:

    * The oinstall group (the Oracle Inventory group)
    * The oracle user (the Oracle software owner)

    The oinstall group and the oracle user may already exist on your system. To determine whether they exist already, and if necessary, to create them, follow these steps:

    1.To determine whether the oinstall group exists, enter the following command:

    # grep oinstall /etc/group
    If the output from this command shows the specified group name, that group already exists.

    2.If necessary, enter the following command to create the oinstall group:

    # /usr/sbin/groupadd oinstall

    3.To determine whether the oracle user exists and belongs to the correct groups, enter the following command:

    # id oracle
    If the oracle user exists, this command displays information about the groups to which the user belongs. The output should be similar to the following, indicating that oinstall is the primary group:

    uid=502(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

    4.If necessary, complete one of the following actions:
    * If the oracle user exists, but its primary group is not oinstall, enter a command similar to the following, where the -g option specifies oinstall as the primary group and the -G option specifies any existing groups to which the oracle user belongs:

    # /usr/sbin/usermod -g oinstall -G dba oracle

    * If the oracle user does not exist, enter the following command to create it:

    # /usr/sbin/useradd -g oinstall oracle

    This command creates the oracle user and specifies:
    o oinstall as the primary group
    o dba as an optional secondary group

    5.Enter the following command to set the password of the oracle user:

    # passwd oracle

  • Enter the following command to create sub-directories in the mount point directory that you identified for the Oracle base directory:

    # mkdir -p /home/oracle

    Note: assume base directory is /home/oracle

  • Change the owner and group of the directory that you created to the oracle user and the oinstall group:

    # chown -R oracle:oinstall /home/oracle

  • Change the permissions on the directory that you created to 775:

    # chmod -R 775 /home/oracle

    ORACLE LOCATION - /home/oracle/oracle/product/10.2.0/db_1

    Execute the following command so that the installation setup is forwarded to the PC running X-Windows server.
    DISPLAY=< IP Address >:0 ; export DISPLAY

    XMing Server Installation:

    Install XMing (alternative to XWINDOWS - freeware) in Windows PC

    1) Run the XMing setup.exe, after installation two icons(xlaunch, xming) will be displayed in desktop.

    2) Click on the xlaunch icon, In the displayed window select "Multiple windows" radio button -> click next -> select
    "Start no client" radio button -> click next -> tick "Clipboard" and "No access control" Check Box -> click next -> click finish. Now XMing server will be stared in the local pc or laptop.

  • Download & Install the following rpm's
    a) libXp-1.0.0-8.x86_64(2).rpm
    b) libXp-1.0.0-8.1.el5.i386.rpm
    c) libXp-1.0.0-8.1.el5.x86_64.rpm
    d)xorg-x11-libs-32bit-7.4-15.1.x86_64.rpm
    e)perl-DBI-1.40-1.i386.rpm

    using the command rpm -ivh .rpm

    Note: For Download Reference links, simple Google search of the file name will greatly help.

  • Move to the directory the oracle 10g client is unzipped.
  • cd client
  • ./runInstaller
    Note: If any issues are faced in this step, then make sure all the library rpms are installed properly in step 7.
    If the error shows any library files missed try installing the corresponding rpm by downloading in from internet.
  • The installer will start and oracle client installation window will be displayed in the XMing window in local PC.
  • From now, start navigating the installation window in local PC to install oracle client.
    Note: Skip the step of providing a database name to create it, as we are installing only client.
    You need to specify the oracle home directory and orainventory directory in the installation window.
    The installation type is administrator.
  • After installation is complete, get back to the Linux server, Move to $ORACLE_HOME/network/admin and use the following content in the following files
    a) sqlnet.ora

    ###################################################################
    #
    # Filename......: sqlnet.ora
    # Created.......: 04/12/2001
    #
    ###################################################################
    #
    # Tracing Parameters for client and server
    # TRACE_LEVEL_CLIENT        = ADMIN
    # TRACE_DIRECTORY_CLIENT    = /ora_dump/sqlnet/logs/client/
    # TRACE_FILE_CLIENT         = hostname_client
    # TRACE_UNIQUE_CLIENT       = ON
    # TRACE_LEVEL_SERVER        = ADMIN
    # TRACE_DIRECTORY_SERVER    = /ora_dump/sqlnet/logs/server/
    # TRACE_FILE_SERVER         = hostname_server
    #
    # Application Specific Parameters
    # BEQUEATH_DETACH           = YES
    ###################################################################
    DISABLE_OOB               = ON
    AUTOMATIC_IPC               = OFF
    NAMES.DEFAULT_DOMAIN        = cisco.com
    NAMES.DEFAULT_ZONE          = cisco.com
    NAMES.REQUEST_RETRIES       = 3
    NAMES.INITIAL_RETRY_TIMEOUT = 30
    SQLNET.EXPIRE_TIME          = 10
    NAMES.DIRECTORY_PATH = (TNSNAMES,LDAP,ONAMES)
    NAMES.PREFERRED_SERVERS =
          (ADDRESS_LIST =
            (ADDRESS =
              (PROTOCOL = TCP)
              (Host = ons-rtp.cisco.com)
              (Port = 1526)
            )
            (ADDRESS =
              (PROTOCOL = TCP)
              (Host = ons-sj.cisco.com)
              (Port = 1526)
            )
            (ADDRESS =
              (PROTOCOL = TCP)
              (Host = ons-ams.cisco.com)
              (Port = 1526)
            )
          )

    b.) tnsnames.ora

    # tnsnames.ora Network Configuration File: /home/oracle/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    <DBNAME> =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = <HOSTNAME OR IP ADDRESS>)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = <SERVICE_NAME>)
        )
      )

  • Set the environmental variables as follows in /home/oracle ".profile.env" file.
    ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1/
    ORACLE_SID=ORCL
    PATH=$ORACLE_HOME/bin:$PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local:/usr/local/lib
    export ORACLE_HOME ORACLE_SID PATH NP_HOME LD_LIBRARY_PATH

    Note: Do the same environmental variables set up for other users in root"/" directory.

  • check whether tnsping command is working.

Note: If “tnsping command doesn’t work, mostly the problem will be with setting up Environmental Variables.

Technology: 

Search