Install oracle free edition with IDE on Linux machine? – User friendly Tech help

Problem:- How to install the latest free edition of oracle database with IDE?
nSolution:-
nA) First we’ll install oracle database and then install the sql developer ide.

n

Steps:-Follow the below steps to install the 11g database(latest when this post was written)

n

Download the latest oracle version for ubuntu

n

    n

  1. Unzip using the command:n
    unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip 
  2. n

  3. Install required packages using the command:n
    sudo apt-get install alien libaio1 unixodbc
  4. n

  5. Convert RPM package format to DEB package format (that is used by Ubuntu) using the command:n
    sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
  6. n

  7. Create the required chkconfig script using the command::n
    sudo pico /sbin/chkconfig

    n

    The pico text editor is started and the commands are shown at the bottom of the screen. Now copy and paste the following into the file and save:

    n

    #!/bin/bash# Oracle 11gR2 XE installer chkconfig hack for Ubuntufile=/etc/init.d/oracle-xeif [[ ! `tail -n1 $file | grep INIT` ]]; thenecho >> $fileecho '### BEGIN INIT INFO' >> $fileecho '# Provides: OracleXE' >> $fileecho '# Required-Start: $remote_fs $syslog' >> $fileecho '# Required-Stop: $remote_fs $syslog' >> $fileecho '# Default-Start: 2 3 4 5' >> $fileecho '# Default-Stop: 0 1 6' >> $fileecho '# Short-Description: Oracle 11g Express Edition' >> $fileecho '### END INIT INFO' >> $filefiupdate-rc.d oracle-xe defaults 80 01
  8. n

  9. Change the permission of the chkconfig file using the command:n
    sudo chmod 755 /sbin/chkconfig  
  10. n

  11. Set kernel parameters. Oracle 11gR2 XE requires additional kernel parameters which you need to set using the command:n
    sudo pico /etc/sysctl.d/60-oracle.conf

    n

    Copy the following into the file and save:

    n

    # Oracle 11g XE kernel parameters  fs.file-max=6815744  net.ipv4.ip_local_port_range=9000 65000  kernel.sem=250 32000 100 128 kernel.shmmax=536870912 

    n

    Verify the change using the command:

    n

    sudo cat /etc/sysctl.d/60-oracle.conf 

    n

    You should see what you entered earlier. Now load the kernel parameters:

    n

    sudo service procps start

    n

    Verify the new parameters are loaded using:

    n

    sudo sysctl -q fs.file-max

    n

    You should see the file-max value that you entered earlier.

    n

  12. n

  13. Set up /dev/shm mount point for Oracle. Create the following file using the command:n
    sudo pico /etc/rc2.d/S01shm_load

    n

    Copy the following into the file and save.

    n

    #!/bin/shcase "$1" instart) mkdir /var/lock/subsys 2>/dev/null       touch /var/lock/subsys/listener       rm /dev/shm 2>/dev/null       mkdir /dev/shm 2>/dev/null       mount -t tmpfs shmfs -o size=2048m /dev/shm ;;*) echo error   exit 1 ;;esac 

    n

    Change the permissions of the file using the command:

    n

    sudo chmod 755 /etc/rc2.d/S01shm_load
  14. n

  15. [This step was not included in the screencast, but you should do it.] Execute the following commands:n
    sudo ln -s /usr/bin/awk /bin/awk sudo mkdir /var/lock/subsys sudo touch /var/lock/subsys/listener 
  16. n

  17. REBOOT your Ubuntu VM.
  18. n

  19. Install the oracle DBMS using the command:n
    sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
  20. n

  21. Configure Oracle using the command:n
    sudo /etc/init.d/oracle-xe configure 

    n

    Enter the following information:

    n

      n

    • A valid HTTP port for the Oracle Application Express (the default is 8080)
    • n

    • A valid port for the Oracle database listener (the default is 1521)
    • n

    • A password for the SYS and SYSTEM administrative user accounts
    • n

    • Confirm password for SYS and SYSTEM administrative user accounts
    • n

    • Whether you want the database to start automatically when the computer starts (next reboot).
    • n

    n

  22. n

  23. Setup environment variables by editting your .bashrc file:n
    pico ~/.bashrc

    n

    Add the following lines to the end of the file:

    n

    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xeexport ORACLE_SID=XEexport NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`export ORACLE_BASE=/u01/app/oracleexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHexport PATH=$ORACLE_HOME/bin:$PATH

    n

    Load the changes by executing your profile:

    n

    . ~/.profile
  24. n

  25. Start the Oracle 11gR2 XE:n
    sudo service oracle-xe start
  26. n

  27. Add user YOURUSERNAME to group dba using the commandn
    sudo usermod -a -G dba YOURUSERNAME
  28. n

  29. Start the Oracle XE 11gR2 server using the command:n
    sudo service oracle-xe start

    n

    This step is most likely not necessary, but I am documenting the command here anyway.

    n

  30. n

  31. Start command line shell as the system admin using the command:n
    sqlplus sys as sysdba

    n

    Enter the password that you gave while configuring Oracle earlier. You will now be placed in a SQL environment that only understands SQL commands.

    n

  32. n

  33. Create a regular user account in Oracle using the SQL command:n
    create user USERNAME identified by PASSWORD;

    n

    Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.

    n


  34. n

  35. Grant privileges to the user account using the SQL command:n
    grant connect, resource to USERNAME;

    n

    Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.

    n

  36. n

  37. Exit the sys admin shell using the SQL command:n
    exit;
  38. n

  39. Start the commandline shell as a regular user using the command:n
    sqlplus

    n

    You will be prompted for a username and password. Once authenticated, you will be able to type in the standard SQL commands learned in class.

    n

  40. n

n

B) After our successfull installation of oracle, we are going to configure sql developer IDE.

n

Download the latest sql developer edition
n1.sudo alien –scripts -d sqldeveloper-version.noarch.rpm
nA file named sqldeveloper_version_all.deb will be generated. To run this file, execute the following statement:

n

2.sudo dpkg –install sqldeveloper_version_all.deb
nCreate a .sqldeveloper directory in your home folder:

n

3.sudo mkdir /home/.sqldeveloper/
nRun SQL Developer from the terminal.

n

4.sudo /opt/sqldeveloper/sqldeveloper.sh
n5.Enter the path for java installed on your system
nHow to find path by using the command whereis jvm
ngenerally its installed inside /usr/lib/jvm/java-version

n

$ sudo alien --scripts -d sqldeveloper-4.2.0.17.089.1709-1.noarch.rpm
[sudo] password for user:
sqldeveloper_4.2.0.17.089.1709-2_all.deb generated
user@test:~/Documents/Northstar/oracle$ sudo dpkg --install sqldeveloper_4.2.0.17.089.1709-2_all.deb
Selecting previously unselected package sqldeveloper.
(Reading database ... 277479 files and directories currently installed.)
Preparing to unpack sqldeveloper_4.2.0.17.089.1709-2_all.deb ...
Unpacking sqldeveloper (4.2.0.17.089.1709-2) ...
Setting up sqldeveloper (4.2.0.17.089.1709-2) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
user@test:~/Documents/test/oracle$ sudo mkdir /home/.sqldeveloper/ms@test:~/Documents/test/oracle$ sudo /opt/sqldeveloper/sqldeveloper.sh
Oracle SQL Developer
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/mandeep/.sqldeveloper/4.2.0/product.conf
/usr/lib/jvm/java-1.8.0-openjdk-amd64

n

6.Accept the default settings for any window pop ups

nn

7. All done, check the first look of SQL developer to work with oracle.

n

Note:-Login as sys user using terminal:-

n

 sqlplus / as sysdba , enter username and password > execute the queries

n

Reference documents:-
nhttp://www2.hawaii.edu/~lipyeow/ics321/2014fall/installoracle11g.html

Was this article helpful?
YesNo

Similar Posts