- Oracle JDK 8 or 11
- Oracle SQL Developer
Downloading Prerequisites
Oracle JDK 8/11
- Go to download Oracle JDK page
- I will use Oracle JDK 11 because it has a .deb installation file which can be easily installed using
dpkg
- Download Oracle JDK 11 for Debian package (at the time of this post, the version is 11.0.8), you will be prompted to sign in using oracle account to download
Oracle SQL Developer
- Go to download Oracle SQL Developer page
- Download Oracle SQL Developer for Other Platforms (at the time of this post, the version is 20.2)
Prerequisite Completed
Installation
Oracle JDK 11
- Open your terminal, go to directory where your prerequisite files are located (in my case it's in
~/Downloads
)
- Install Oracle JDK 11 by using command
sudo dpkg -i [YOUR_ORACLE_JDK_PACKAGE.deb]
, in my case it'ssudo dpkg -i jdk-11.0.8_linux-x64_bin.deb
- Verify your installation by listing the directory of
/usr/lib/jvm
Oracle SQL Developer 20.2
- Open your terminal, go to
/opt
directory. This is where i will store the sqldeveloper application, you can choose other directory, but this my preference (and i read also that/opt
is for 3rd party apps that we cannot install viaapt
package manager)
- Unzip Oracle SQL Developer with command
sudo unzip [YOUR_SQL_DEVELOPER_FILE_WITH_LOCATION].zip
, in my case it'ssudo unzip ~/Downloads/sqldeveloper-20.2.0.175.1842-no-jre.zip
. By default theunzip
program will extract the zip file into the current directory, since we are in/opt
now, we don't need to specify target directory.
- Locate your Oracle JDK installation under
/usr/lib/jvm
, we'll need this location to tell Oracle SQL Developer where our Oracle JDK is located. In my case it's/usr/lib/jvm/jdk-11.0.8
- Go inside the
sqldeveloper
directory
- You can see that
sqldeveloper.sh
has executable permission so that we can run it by doing./sqldeveloper.sh
orsh sqldeveloper.sh
in the current directory. - Run the
sqldeveloper.sh
file, you will be prompted to enter the Oracle JDK location, just paste it in and press enter
- You will see Oracle SQL Developer starting
- Installation done! You can use the application by executing the
sqldeveloper.sh
At this point, the installation process is done and we can use the application. But it's quite troublesome for us to always open the terminal and execute the script to run the application.
Create a Shortcut
Create a link to our sqldeveloper.sh
- Open your terminal and type command
sudo ln -s [YOUR_SQLDEVELOPER.SH_PATH] /usr/local/bin/sqldeveloper
, in my case it'ssudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
- Verify that link has been created.
- Now we can execute our application with command
sqldeveloper
from any directory. The reason why we put our link inside/usr/local/bin
is so that it's available globally. - Go to your
$HOME
directory and execute the commandsqldeveloper
. You will get an error like this.
- The error happened because it's trying to execute a syntax inside
sqldeveloper.sh
that uses relative path to navigate the directory. To fix this problem, what we need to do is edit thesqldeveloper.sh
to execute the sqldeveloper binary - Open
sqldeveloper.sh
with your text editor. In my case, i will usevim
. Remember to usesudo
because this file belongs toroot
. Your file content should look like this now.
- We will tell this script to execute the sqldeveloper binary directly without navigating to other directory by using this command
/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper $*
, your file should look like this now.
- Save the file and try
sqldeveloper
command again, you should be able to start Oracle SQL Developer now.
Create a desktop shortcut
- Desktop shortcuts are stored in
/usr/share/applications
with.desktop
extension. So we will create a new file in that directory with the namesqldeveloper.desktop
.
- Inside your file should look like this.
[Desktop Entry]
Name=Oracle SQL Developer
Comment=SQL Developer from Oracle
GenericName=SQL Tool
Exec=/usr/local/bin/sqldeveloper
Icon=/opt/sqldeveloper/icon.png
Type=Application
StartupNotify=true
Categories=Utility;Oracle;Development;SQL;
- Save your file
- Verify that your shortcut is available to use by searching in application menu.
And that's it. You have completed the installation and created shortcut for Oracle SQL Developer.