Installing Oracle SQL Developer on Ubuntu 16.04 LTS
Oracle SQL Developer is a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud deployments. SQL Developer offers complete end-to-end development of your PL/SQL applications, a worksheet for running queries and scripts, a DBA console for managing the database, a reports interface, a complete data modeling solution, and a migration platform for moving your 3rd party databases to Oracle.
To install Oracle SQL Developer on your Ubuntu 16.04, first you have to download the Oracle SQL Developer from the below link.
To install on RPM supported Linux distributions download the RPM package. Since i am going to install on Ubuntu 16.04, i have downloaded the Other Platforms package (a .zip file).
Installing with RPM package
If you have already downloaded the RPM package. No worries we can convert it to .deb package by the following commands.
Install Alien… Alien converts an RPM package file into a Debian package file or Alien can install an RPM file directly. But, this is not the recommended way to install software packages in Ubuntu.
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install alien
Now you have the alien installed, run the following command to convert the .rpm package as .deb package.
cd <path_to_the_rpm_package>
sudo alien <name_of_package>.rpm
Now you have a .deb file, which you can install by the following command.
sudo dpkg -i <name_of_package>.deb
Installing with the Other Platforms zip file
Extract the zip file to any location, in my case i have extracted the zip file to ~/softwares/ directory.
Let’s go into that directory
cd ~/softwares/sqldeveloper
Here you can see the sqldeveloper.sh file which is the executable for Linux. Let’s give this file executable permissions.
chmod +x sqldeveloper.sh
Now let’s create a soft-link to run the sqldeveloper.sh from any location.
sudo ln -s ~/softwares/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
We have to replace the certain content of the sqldeveloper.sh to avoid permission denied error. So open the sqldeveloper.sh with an editor.
atom sqldeveloper.sh
Comment the following line
cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*
Add these lines below
unset -v GNOME_DESKTOP_SESSION_ID
cd ~/softwares/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*
Now we can run the sqldeveloper any where from the terminal.
Open a new terminal. Make sure you have the Java8 or above installed and the path is set properly (Oracle SQL Developer requires Java8).
Type the following
sqldeveloper
Now let’s create a desktop icon for the sqldeveloper.
Navigate to /usr/share/applications/ location, here you could see all the desktop icons.
cd usr/share/applications/
ls
Now let’s create a new desktop entry for sqldeveloper.
sudo atom sqldeveloper.desktop
Add the following configurations to the sqldeveloper.desktop file and Save.
[Desktop Entry]
Exec=sqldeveloper
Terminal=false
StartupNotify=true
Categories=GNOME;Oracle;
Type=Application
Icon=~/softwares/sqldeveloper/icon.png
Name=Oracle SQL Developer
Still you won’t be able to see the desktop entry. This is because the desktop database is still not updated. So, let’s update it.
sudo update-desktop-database
Log off and log on, now type in sqldeveloper and you could be able to see the icon. Start the sqldeveloper using the icon.
If there is any issue in installing Oracle SQL Developer on Ubuntu 16.04 LTS feel free to comment.