jeudi 6 décembre 2012

Oracle XE On Ubuntu

ORACLE XE 10g for Linux


Hello Everyone :)

In this tutorial, I'm going to show you guys how to install Oracle XE (Express Edition) 10g on a Linux system.

for this tutorial, we will use as a Linux system Ubuntu on it's latest version 12.0. you can guys download it from here.

Oracle Express Edition Database is lightweight Database made for the development environment. Oracle XE is a great tool for developing POC (proof of concept) kind of applications. it comes with some dummy data that can be used by developers and save for them a lot of time setting the Db Environment.

This tutorial will guide you through the installation and the configuration steps so you can have a set and ready to use environment.


I #  INSTALLATION

First, we need to download and install the following packages. 
                                 1 -> oracle-xe-universal_10.2.0.1-1.1_i386.deb  
                                 2 -> oracle-xe-client_10.2.0.1-1.2_i386.deb

use the command dpkg  to install the packages.

                                   dpkg -i "name_of_package" 
                                
once done we are going to install some additional tools
                           
                                    aptitude install libaio1 bc

those dependencies (libaio1, bc) are needed to be installed with Oracle xe10g
and then we install rlwrap tool to make our life easier with sqlplus client

                                    apt-get install rlwrap  //(it will help us with sqlplus )

II # CONFIGURATION

once the installation is done we configure the environment, we will configure some parameters and some Linux system variables


           1) excute this cmd  " /etc/init.d/oracle-xe configure " (as root) and follow the steps that gives you

              2) add the following lignes in a terminal and in your user file profile  " ~/.profile "   (or /etc/profile 
                  for everyone )

                           export ORACLE_SID=XE
                           export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                           export PATH=$PATH:$ORACLE_HOME/bin
                           export ORACLE_BASE=/usr/lib/oracle/xe

              3) add the following ligne in this file -> "$ORACLE_HOME/sqlplus/admin/glogin.sql" 

                           DEFINE _EDITOR = "/usr/bin/gedit" (or an other text editor that you want ) 

              4)type in a terminal the following alias and  add it  to your list of aliases , here(~/.bashrc)

                           alias sqlplus='rlwrap sqlplus'



III # GET STARTED !

               1) open your browser and type this (http://localhost:8080/apex) 
                         Login : system
                         pass : you already configured it when you did the 1st step in configuration
             
               2) enable the user HR ( in administration  )

               3) to connect from sqlplus run this cmd in the terminal

                        $ sqlplus hr/hr@xe
           
               4) enjoy ! :)


               i hope that tutorial allowed you to install and configure Oracle on your UBUNTU ,


thank you for reading :)

3 commentaires:

  1. salamo3aykom wa rahmato lah wa barakatoh,je vous remercie beaucoup pour ce tuto.J'ai suivi vos instructions .mais lorsque je tape sqlplus sous terminal ,le résultat c'était :sqlplus command not found .Quest-ce que je peux faire ??

    RépondreSupprimer
  2. wa3alikom salam wa rahmato lah wa barakatoh , pouvez vous me montrer ce que vous avez taper comme commande (depuis le debut)

    RépondreSupprimer
  3. Salamo3alaykom wa rahmato lah wa barakatoh,je vous remercie ,j'ai résolu le problème en retapant ces lignes sous terminal : export ORACLE_SID=XE
    exportORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    export PATH=$PATH:$ORACLE_HOME/bin
    export ORACLE_BASE=/usr/lib/oracle/xe
    et ça marche bien :).

    RépondreSupprimer