Follow Us on Twitter

Installing Java, Oracle 11g R2 Express Edition and SQL Developer on Ubuntu 64-bit

by Mike Heeren on March 18, 2014 · 228 comments

A while ago I tried to install Oracle 11g R2 Express Edition on a 64-bit Ubuntu machine. This proved to be not as easy as you would expect. There are many blogs and articles about this subject and I tried a number of them. Unfortunately neither of the instructions seemed to work completely on my machine. With the combined information from the authors, I finally got it to work and I’ll gladly share my recipe in this blog. I have also included the installation steps for SQL Developer en Java (which is needed to install SQL Developer) in this blog. The installation was performed on a Ubuntu 12.04 VM with the following software.

This cookbook works with exacty the herefore mentioned versions… be aware that if you try to install a different version of one component, the steps below may not work. For example newer version of SQL Developer may require a more recent version of Java.

Installing Java

We start with installing Java on the machine. My personal preference is to use Oracle Java JDK. Installing this JDK could be done easily by performing the following statements.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

The screen in figure 1 will appear in the terminal, hit enter to proceed. After this, the screen in figure 2 will be shown. Navigate to <Yes> using the left arrow on your keyboard and hit enter. Oracle JDK 7 will be installed.

Binary Code license

Figure 1: Binary Code license

JDK License Agreement

Figure 2: JDK License Agreement

To validate the Java installation, execute the following command:

java -version

This should result in the following (or something similar).

java version “1.7.0_51”
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

The next next step is to set the JAVA_HOME environment variable. To do this, open the /etc/bash.bashrc file by executing the following statement.

sudo gedit /etc/bash.bashrc

Scroll to the bottom of the file and add the following lines.

export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export PATH=$JAVA_HOME/bin:$PATH

Save the file and close the editor. To load the changes, execute the following statement.

source /etc/bash.bashrc

To validate the changes you can execute the following statement.

echo $JAVA_HOME

The result of this statement should be the following.

/usr/lib/jvm/java-7-oracle

Installing Oracle 11g R2 Express Edition

For the installation of Oracle 11g R2 Express Edition (XE), a couple of additional Linux packages are required. These packages can be installed by executing the following statement.

sudo apt-get install alien libaio1 unixodbc

The next step is to download the Oracle 11g R2 Express Edition from the Oracle website. Make sure you select the Linux x64 version from http://www.oracle.com/technetwork/products/express-edition/downloads/index.html. After the download is completed, open the terminal and navigate to the download directory. In my case this can be done by executing the following statement.

cd Downloads

The next step step is to unzip the downloaded file. To do this, execute the following command.

unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

A new directory (Disk1) is added to the Download directory. Navigate to this directory:

cd Disk1

Now we have to convert the Red Hat package (rpm) to a Debian package. This may be done using the alien command. The -d parameter is used to inform alien that a Debian package should be generated. When the -scripts parameter is toggled, alien will try to convert the scripts that are meant to be run when the package is installed and removed.

sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

This step may take a while, while this statement is executing we can do the following steps. Open a new terminal window for these steps.

The Red Hat package, relies on the /sbin/chkconfig file, which is not used in Ubuntu. To successfully install Oracle XE we use a simple trick. Start by creating a custom /sbin/chkconfig file by executing the following statement.

sudo gedit /sbin/chkconfig

Copy and paste the following into the editor:

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

Save the file and close the editor. Now we have to provide the file with the appropriate execution privileges.

sudo chmod 755 /sbin/chkconfig

After this, we have to create the file /etc/sysctl.d/60-oracle.conf to set the additional kernel parameters. Open the file by executing the following statement.

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

Copy and paste the following into the file. Kernel.shmmax is the maximum possible value of physical RAM in bytes. 536870912 / 1024 /1024 = 512 MB.

# 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

Save the file. The changes in this file may be verified by executing:

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

Load the kernel parameters:

sudo service procps start

The changes may be verified again by executing:

sudo sysctl -q fs.file-max

This method should return the following:

fs.file-max = 6815744

After this, execute the following statements to make some more required changes:

sudo ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener

Close the second terminal window and return to the first terminal window. The rpm package should be converted and a new file called oracle-xe-11.2.0-2_amd64.deb have been generated. To run this file, execute the following command:

sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb

Execute the following to avoid getting a ORA-00845: MEMORY_TARGET error. Note: replace “size=4096m” with the size of your (virtual) machine’s RAM in MBs.

sudo rm -rf /dev/shm
sudo mkdir /dev/shm
sudo mount -t tmpfs shmfs -o size=4096m /dev/shm

Create the file /etc/rc2.d/S01shm_load.

sudo gedit /etc/rc2.d/S01shm_load

Copy and paste the following in the file. Note: replace “size=4096m” with the size of your machine’s RAM in MBs.

#!/bin/sh
case "$1" in
start) 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=4096m /dev/shm ;;
*) echo error
exit 1 ;;
esac

Save the file, close the editor and provide the appropriate execution privileges.

sudo chmod 755 /etc/rc2.d/S01shm_load

Configuring Oracle 11g R2 Express Edition

If you have successfully installed to Oracle 11g R2 Express Edition server, it’s time to configure the server. To start the configuration of the server, execute the following command and follow the “wizard” in the terminal. Default values are shown between brackets for each question.

sudo /etc/init.d/oracle-xe configure

Now it is time to set-up some environmental variables. Open the /etc/bash.bashrc file by executing the following statement:

sudo gedit /etc/bash.bashrc

Scroll to the bottom of the file and add the following lines.

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

Save the file and close the editor. To load the changes, execute the following statement:

source /etc/bash.bashrc

To validate the changes you can execute the following statement.

echo $ORACLE_HOME

This statement should result in the following output.

/u01/app/oracle/product/11.2.0/xe

After this step it is recommended to reboot the machine. After the reboot is completed, you should be able to start the Oracle server using the following command:

sudo service oracle-xe start

A file named oraclexe-gettingstarted.desktop is placed on your desktop. To make this file executable, navigate to you desktop.

cd ~/Desktop

To make the file executable, execute the following statement.

sudo chmod a+x oraclexe-gettingstarted.desktop

Installing SQL Developer

Finally, after the installation of Oracle 11g R2 Express Edition and Java, SQL Developer could be installed. This is done by performing the following steps.

Download Oracle SQL Developer from the Oracle site. Select the Linux RPM package: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html. Open a terminal window and navigate to the Download directory:

cd Downloads

Convert the Red Hat package to a Ubuntu package. Note: this may take a while.

sudo alien --scripts -d sqldeveloper-4.0.0.13.80-1.noarch.rpm

A file named sqldeveloper_4.0.0.13.80-2_all.deb will be generated. To run this file, execute the following statement:

sudo dpkg --install sqldeveloper_4.0.0.13.80-2_all.deb

Create a .sqldeveloper directory in your home folder:

sudo mkdir /home/.sqldeveloper/

Run SQL Developer from the terminal.

sudo /opt/sqldeveloper/sqldeveloper.sh

Now enter the full Java path. In my case this is done as follows:

/usr/lib/jvm/java-7-oracle

These steps worked for me to install Oracle XE and SQL Developer on Ubuntu 64-bit, and have been validated by one of my colleagues. I am curious to know if it worked for you. Please also let me know if you find any mistakes or have any additions to make this script better.

Good luck!

References:

http://sysadminnotebook.blogspot.nl/2012/10/installing-oracle-11g-r2-express.html

http://manpages.ubuntu.com/manpages/gutsy/man1/alien.1p.html

http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/436584/installing-sql-developer-on-ubuntu-12.04

Installing Java, Oracle 11g R2 Express Edition and SQL Developer on Ubuntu 64-bit, 4.9 out of 5 based on 51 ratings
Ratings:
VN:D [1.9.22_1171]
Rating: 4.9/5 (51 votes cast)

{ 107 comments… read them below or add one }

sachin July 31, 2015 at 8:30 am

thanks buddy

Reply

leonardushutabarat August 9, 2015 at 1:54 pm

Hi Mike,

Thank you for the article. It is very useful and every step that mentioned in it is correct with 1 additional minor step which is from cd ~/Desktop to cd Downloads, you need to add a step to move out from Desktop directory.

Another thing, Mike, is that with those steps in your article, after finishing them, I notice that I have Oracle user when starting up Ubuntu. I don’t know what is the password for this new Oracle user.

Perhaps you can help?

Thank you,
Leo

Reply

Scott August 14, 2015 at 10:57 pm

I had a few errors as I went along, as follows:

1) Starting Oracle Net Listener…touch: cannot touch ‘/var/lock/subsys/listener’: No such file or directory

2) Starting Oracle Database 11g Express Edition instance…touch: cannot touch ‘/var/lock/subsys/oracle-xe’: No such file or directory

3) /home$ sudo /opt/sqldeveloper/sqldeveloper.sh
sudo: /opt/sqldeveloper/sqldeveloper.sh: command not found

Most everything worked well but these 3 problems were encountered.

Any help would be appreciated.

Reply

Andre August 25, 2015 at 3:05 pm

Hi Mike,

I have the same problem, please help.. Thank you..

Reply

Shivam November 24, 2015 at 11:19 pm

Scott,

You wouldn’t have noticed during executing the steps mentioned, that out of the below mentioned commands advised to run in the article

sudo ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener

The last one wont execute without root privileges. I suggest you to execute the same with “sudo”

Reply

van cuong October 3, 2016 at 10:28 am

after run command “touch /var/lock/subsys/listener”
type in terminal ” sudo chmod 755 /var/lock/subsys/listener” if you get error 1) Starting Oracle Net Listener…touch: cannot touch ‘/var/lock/subsys/listener’: No such file or directory

Reply

Dan August 21, 2015 at 2:16 pm

Hello sir,
I followed all your procedures carefully and everything appears to be installed. However, oracle database and SQL require a user-name and password? I tried my computers regular password as well as oracles website login information… I really need help. I also have a new USER account on my computer called ‘oracle’. And I don’t have the password for that either. I could really use some help as this is very stressful. 🙁

Reply

Dan August 21, 2015 at 2:31 pm

My mistake I have figured out my password for the SQL and database programs. However, I am still stumped on the ‘Oracle’ user account on my computer?

Reply

Sohum June 22, 2016 at 8:45 am

Hi Dan,

Can you please elaborate what would be the username password for setting up the connection?

Reply

Siddharth July 14, 2016 at 4:47 pm

I don’t know what my username is? Do you know how to find the username? All forums deal with resetting passwords!!

Reply

Mary Clough November 5, 2015 at 9:12 pm

At some point it asks you to create the password during installation at the terminal prompt. The user name might be system if you are doing this from sqlplus.

Reply

Andrés Reyes Romero August 27, 2015 at 7:11 am

Error: /usr/lib/jvm/java-7-oracle/jre/bin/java/bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/arromero/.sqldeveloper/4.1.0/product.conf

please, help me!

Reply

Ghobashi September 12, 2015 at 12:17 pm

Hi,

I have same error too, any one can help in that issue ?

Reply

Mary Clough November 5, 2015 at 9:10 pm

I am getting the jdk path error as well.

see below:

Error: /bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/mary/.sqldeveloper/4.1.0/product.conf
^Cmary@mary-VirtualBox:~/Downloads$ ex

Reply

Adam January 16, 2016 at 5:28 am

Check your release levels. I just followed these instructions, and got java-8-oracle. The same thing happens with some of the other steps.

Reply

Mariusz August 27, 2015 at 1:22 pm

It is very nice tutorial – and most importent it works perfect
Tell me it it possible to change directory u01 into directory whitch i asign my own ?

Reply

HIMANSHU August 30, 2015 at 7:16 pm

i am new to oracle and u r post is very helpful to me but
when i am try to run sudo chmod a+x oraclexe-gettingstarted.desktop
i got following error
./oraclexe-gettingstarted.desktop: line 1: [Desktop: command not found
./oraclexe-gettingstarted.desktop: line 9: Started: command not found
./oraclexe-gettingstarted.desktop: line 10: Básicos: command not found
./oraclexe-gettingstarted.desktop: line 11: Database: command not found
./oraclexe-gettingstarted.desktop: line 12: Database: command not found
and my listner status is
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hero)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused

my tnsping status
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hero)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
TNS-12541: TNS:no listener

Reply

Shady Wattay September 7, 2015 at 3:36 am

worked perfect, even though I’m using Java 8.
thank you so much @Mike

Reply

Art K September 10, 2015 at 8:42 am

Great step by step instructions, thanks!

One suggestion. After installing SQL Developer, instructions say to run the following:

sudo /opt/sqldeveloper/sqldeveloper.sh

This locks sql developer to Sudo and Sql developer wouldn’t start from a desktop shortcut. I finally got the shortcut to work by running the following command:

sudo chown -R $USER:$USER ~/.sqldeveloper

Reply

Sérgio Arimura October 27, 2015 at 11:22 pm

Thanks, it worked for me

Reply

Mark November 19, 2015 at 11:15 pm

This works for me too
Thanks

Reply

Jose Magcalas May 26, 2016 at 10:21 pm

Thanks for tip.

Reply

Paul September 10, 2015 at 4:58 pm

Worked perfectly!

Thanks.

Reply

Abhinav September 20, 2015 at 11:40 pm

Hi Mike,

Thank you for the very detailed steps.
Followed all the steps and it worked for me. 🙂
I have a small request,
Will you be able to help me with setting up TOAD in ubuntu. I am very new to these.(just graduated from college)
Thanks again.. 🙂
Regards,
Abhi

Reply

doug September 23, 2015 at 7:40 pm

These directions were spot on. Thanks for putting this together. Every step worked, and I’m using Ubuntu 14.04, JDK8 and java-8-oracle. Further, though I’ve used Unix/Linux in the past, I really look upon myself as a newbie, and the steps worked for me. So, I think they should work for just about everybody. Additionally, I’m using VirtualBox on a Windows 8.1 pro machine.

Reply

Anuj September 27, 2015 at 9:41 am

Hi Mike,
I was able to install Oracle 11g Express Edition and SQL Developer 4.1.1.19 on Ubuntu 14.04. Thanks a lot for the elaborate steps.

Regards,
Anuj

Reply

Matt October 5, 2015 at 12:40 am

Thanks! Works perfectly.

Reply

Mehmet October 7, 2015 at 6:14 am

I set up at Ubuntu 14.04 and it is working. Excellent work! Thanks

Reply

Mary Clough November 5, 2015 at 9:16 pm

did you get the jdk error?

see below:

Error: /bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/mary/.sqldeveloper/4.1.0/product.conf
^Cmary@mary-VirtualBox:~/Downloads$ ex

Reply

Erick October 30, 2015 at 7:50 am

Works like a charm. Thank you so much for this tutorial!

Reply

Fadwa Gmiden November 1, 2015 at 8:11 pm

Thanks, you helped me a lot.

Reply

Mary Clough November 5, 2015 at 9:15 pm

Getting this error thoough,

Error: /bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/mary/.sqldeveloper/4.1.0/product.conf
^Cmary@mary-VirtualBox:~/Downloads$ ex

Reply

Frank Dorst November 6, 2015 at 10:45 am

I’m not sure but it looks like your Java install failed. Did you follow all the steps above?

Reply

Enmanuelle Acuña March 31, 2016 at 5:18 am

Hi Mary.

I had the same problem, I solved doing this:
1. I have Oracle Java 8 installed from the WebUpd8 PPA.
2. Once you have installed everything go to the terminal and do gedit .sqldeveloper/4.1.0/product.conf
3. Go to the line that says SetJavaHome and remove the entire line and put this: SetJavaHome /usr/lib/jvm/java-8-oracle
4. I assume that you have installed Java 8 from WebUpd8 PPA, if not, it is very simple to install it, just google it! 🙂
4. Save the file
5. Now you can start sqldeveloper from Unity or another app launcher.

Reply

Duke November 10, 2015 at 4:14 pm

Thanks for the brilliant Tutorial.
It really helped me out in installing Oracle 11g EX on Ubuntu-64 15.10.

Reply

Vishnu November 14, 2015 at 10:06 pm

This article is very much useful.
Worked very well for me.

Now SQL developer requires java 8 or above.
Thats the only change is:
sudo apt-get install oracle-java8-installer.

Thank you very much for the blog, Mike.

Best Regards,
Vishnu

Reply

Lukasz November 15, 2015 at 11:29 am

Hi,

Could you please help me with one issue? I have installed as per your step in this tutorial, however cannot connect to SQL*Plus. I have set up password in terminal after running command ”sudo /etc/init.d/oracle-xe configure”, but now I cannot connect as SYSTEM despite i use the same password. I encountered ORA-01017: invalid username/password; logon denied error when try to connect from SQL*Plus. Moreover when try run ”sqlplus / as sysdba” from terminal i get ORA-01031: insufficient privileges. Could you please advise when could I make mistake?

Regards,
Lukasz

Reply

jnewjnew November 30, 2015 at 3:28 am

I’ve the same problem. Who have an idea? thanks!!!

Reply

Lukasz December 2, 2015 at 6:28 pm

you have to log in as Oracle user through terminal, then connect / as sysdba, unlock system account using and then you can normally log in through sqlplus in system account

Reply

Foo November 17, 2015 at 1:39 pm

Could you add a warning that newer version of sqldeveloper need java 8? I tried to install the 4.1.2 version and got this:

[~/Downloads] sudo /opt/sqldeveloper/sqldeveloper.sh

Oracle SQL Developer
Copyright (c) 1997, 2015, 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/engelhard/.sqldeveloper/4.1.0/product.conf
/usr/lib/jvm/java-7-oracle

Found /usr/lib/jvm/java-7-oracle/bin/java to run this product, and the major version of this Java is 1.7.
The mandatory minimum major version to run this product is 1.8.
This product cannot run with this Java.

Reply

Frank Dorst November 17, 2015 at 5:02 pm

Done. Thanks!

Reply

arpit January 22, 2016 at 8:58 am

i have same problem. if you are able to rectify this problem,please tell me.

Reply

Karan December 2, 2015 at 9:49 am

Thanks a ton for this detailed blog on oracle installation. This helped a lot.

Reply

Sumit Burnwal December 8, 2015 at 8:30 am

Thanks a lot Mike. Oracle installation is successful. In my case the only difference was, the .bashrc file was in /home path.
I am facing 2 problems. Running the desktop shortcut of Oracle-XE file after the oracle installtion is completed. FYI, I have given it the execute permissionn. Whenever I am running this shortcut, is triggering : /u01/app/oracle/product/11.2.0/xe/config/scripts/gettingstarted.sh

$cat gettiingstarted.sh
for i in firefox mozilla konqueror ; do
if test -x “/usr/bin/$i”; then
/usr/bin/$i http://localhost:8080/apex/f?p=4950
exit $?
fi
done
$

-After double-clicking the shortcut its open a webpage with “page cannot be displayed” error. Can you help to fix this ?

2. I am unable to download sql developer package from Oracle site. IS there any other source I can download it from?

Reply

D7 December 8, 2015 at 6:22 pm

I was able to successfully install but i’m not able to login with the password i’ve given during installation.I also tried to login using both SYS and SYSTEM as username but it did not work.
Also i would like to know what is the default password for the oracle account created.
Thanks.

Reply

Ramesh December 17, 2015 at 5:05 am

Hi Mike,

Thank you for so much detailed information and step by step configuration.
I follow same step and it is working perfectly fine for me.

Thanks again for valuable work.

Reply

Abdul Basit January 2, 2016 at 11:21 pm

i am newly moved into ubantu from windows and i not much more about about that enviorment so giided me briefly.
all steps are cleared but when i try that
sudo service oracle-xe start
then the result is
Oracle Database 11g Express Edition is not configured. You must run
‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.
i cant understand it sp please help me.

Reply

Abdul Basit January 3, 2016 at 9:47 am

i am new on ubantu. i follw all instruction that all good but when i run this
sudo service oracle-xe start
then i get
Oracle Database 11g Express Edition is not configured. You must run
‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.
tell me what should i do

Reply

D7 January 3, 2016 at 9:53 am

Open terminal and type sudo su
Enter your password when asked
Then type /etc/init.d/oracle-xe configure then follow the procedure specified

Reply

Abdul Basit January 3, 2016 at 9:59 am

i am new on ubantu. i followed all instruction and all good but when i run
sudo service oracle-xe start
then i get
Oracle Database 11g Express Edition is not configured. You must run
‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.
tell me what should i do?

Reply

anjan January 17, 2016 at 3:45 pm

configuration failed.what could be the reason??????

Reply

Singh January 20, 2016 at 3:25 pm

Hi Mike,

When I first time tried your mentioned steps for installing Oracle11g XE, It worked perfectly. But I mistakenly deleted oracle user from the system and when I am trying to repeat these steps. I am getting below error for command ..

sudo rm -rf /dev/shm
rm: cannot remove ‘/dev/shm’: Device or resource busy

Could you please suggest me how to proceed further ? Thanks in advance.

-Singh

Reply

Joseph Biancalana January 20, 2016 at 9:02 pm

Mike,
Everything worked the first time for me. Thank you for taking the time to detail these instructions.

Ubuntu 14.04.3 LTS
Linux 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Joseph

Reply

bizi January 23, 2016 at 6:46 pm

Hi!
Thanks, works perfectly. but i have a question:
I dont want to start the XE on boot. I run the following: /etc/init.d/oracle-xe disable
But when i restart the Ubuntu 15.10 oracle-xe start too.
How can i disable oracle auto start?
bizi

Reply

Doug January 29, 2016 at 12:14 am

Thanks so much for putting this together. This is one of the most complete procedures I’ve ever followed (if it didn’t work for you, you did something wrong). EVERYTHING worked. And I’ve used it twice. Ubuntu 14.0.4 on Virtualbox, on both Windows 8.1 pro and Windows 10 pro. Frankly, I don’t know how Oracle expects one to stumble through the installation process with success. They really need to do a better job in the *nix environment.

Again, thanks much.

Doug

Reply

Julio Diaz February 4, 2016 at 1:51 am

It works perfectly, thank you very much !!!

Reply

Max February 8, 2016 at 3:02 am

Hi Mike,

Let me tell you, I’m studying computer science in Costa Rica and this class is about database application, I’ve been trying to install Oracle 11g for over a day and until today and your very specific steps I was able to do it.
There are some things in your blog that could be updated like the version of the software that you use, however I am very new using Linux terminal and I manage to get the installation done. I would like to translate your instructions to Spanish so any one can have access to this brilliant installation.
Greetings,
Lic. Max Mena

Reply

Frank Dorst February 8, 2016 at 10:11 am

Hi Max,
Thanks for your great comment. Feel free to translate this post to Spanish (but please include a link to the original).
Regards,
Frank Dorst

Reply

Bhathiya Supun February 8, 2016 at 1:23 pm

Thank you very much for the article. This simply worked!

Reply

Timothy Mann February 15, 2016 at 9:07 pm

I have Ubuntu 15.10. I followed your procedure very carefullyl, and every step appeared to work perfectly; however, attempting to log in as either sys, sysdba , sysoper, or sysasm using the password I gave in the ‘configure’ step produced ORA-12547: TNS:lost contact . In addition, entering ‘sqlplus connect / as sysdba’ produced a lot of help text that was not helpful to me.
Can you help? Thank you very much

Reply

Timothy Mann February 15, 2016 at 9:21 pm

Mke,
I am running Ubuntu 15.10. I followed your procedure very carefully, and every step appeared to work correctly. However, when I attempted to connect as either sys, system, sysdba, sysoper or sysasm, I received the error ‘ORA-12547: TNS:lost contact’. In addition, when I entered ‘sqlplus connect / as sysdba’, i received a lot of help text that was not helpful to me.
Can you help? Thank you very much.
Tim

Reply

Timothy Mann February 15, 2016 at 9:39 pm

Mike,
In addition to my comment above, when I enter ‘sqlplus / as sysdba’, I receive the error ‘ORA-01031: insufficient privileges’.
Tim

Reply

Timothy Mann February 15, 2016 at 10:47 pm

Mike,
After all my complaining I reran ‘sqlplus system’ with the password I had previously entered in the ‘configure’ step, and it worked! Thank you very, very much for a wonderful procedure!
Tim

Reply

masood February 16, 2016 at 11:58 am

It worked Buddy. Thanks

Reply

Timothy Mann February 18, 2016 at 8:05 pm

Mike,
After installing Oracle Express 11g in accordance with the procedure described and starting and using Oracle quite successfully, I had occasion to shut down my computer for about an hour. Now Oracle does not run and ‘service oracle-xe start’ after a reboot will not start it.
I should also mention that, when Oracle was running, I was not able to compile some Pro*C programs I had previously written, because, when the makefile called ‘proc’, it failed with the message “PCC-F-NOERRFILE, unable to open error message file, facility PR2”.
Can you help? Thank you very much/

Reply

Timothy Mann February 19, 2016 at 7:38 pm

In my several attempts to install Oracle I have not been able to perform the step:
sudo rm -rf /dev/shm
sudo mkdir /dev/shm
sudo mount -t tmpfs shmfs -o size=4096m /dev/shm
because /dev/shm is busy, (I did perform ‘sudo mount -t tmpfs shmfs -o size=4096m /dev/shm’ without first removing /dev/shm.) According to command ‘lsof’ three unrelated processes, which reappear immediately after they have been killed, are using /dev/shm)
Could this be the reason I have been having so much trouble?

Reply

JC June 2, 2016 at 10:32 pm

umount /dev/shm

Reply

Daita February 21, 2016 at 7:53 pm

Thanks alot bro. It worked perfect!

Reply

hasan February 24, 2016 at 8:53 am

This is so called great help. showed everything but stupid guy did not mention how to create user name for the first time login from sqlplus. total waste of time

Reply

Frank February 29, 2016 at 1:55 pm

Hi Hasan,
Thanks for your constructive feedback.
Regards,
Frank

Reply

Kasi Subramaniam February 26, 2016 at 7:46 pm

Hi Mike,
All the Steps you have mentioned worked first time straightaway , no issues at all . Only changes I had to do was to change the version number for the sqldeveloper installation . Otherwise all the instructions were spot on . much appreciated. Keep up the good work .

This post alone should have saved me several days of loitering around the internet trying to make stuff work .

for connecting to XE via SQLDeveloper I used system as the user . works from command line as well .

Reply

kewin March 11, 2016 at 7:24 pm

I get an error in the first step of installing oracle(i.e.while installing .deb )
the error message is “cannot access archive”. I have follwed every single step adn was right till here,can’t proceed further,what’s the problem?please help me with it!

Reply

Mont March 12, 2016 at 5:32 am

Hi, I have a problem in my Ubuntu 15.10. After I follow your blog the apex is not accessible. Can you help me how to fix this? I tried it in Ubuntu14 and it is successful.

Reply

noe March 31, 2016 at 3:40 pm

This is great and well explained, thank you m8

Reply

Hernan De León April 2, 2016 at 7:34 am

GREAT! THIS IS IT

WORKED ON LINUX MINT 17.3

Reply

Hernan April 2, 2016 at 7:54 am

great!

It Works !

Linux Mint 17.3

Reply

Hernan April 2, 2016 at 7:54 am

GREAT !

It Works

Linux Mint 17.3

Reply

Stephen April 4, 2016 at 5:31 am

You are fantastic. I followed it and it worked perfectly.
Thank you.

Reply

Juan Carlos April 4, 2016 at 5:58 am

at the end of installing and start to configurate, this happens.

Starting Oracle Net Listener…Done
Configuring database…
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

why? can someone help me?

Reply

Frank Dorst April 4, 2016 at 9:25 am

Hi Juan,
It’s hard for us to help you with this. There are many steps and combinations. A number of things could be wrong. Have you checked the log file for details? That may help you figure out what went wrong. I would start there and see if that gives you a clue.
Good luck,
Frank

Reply

Juan Carlos April 5, 2016 at 4:36 pm

this is the log

Create controlfile reuse set database “XE”
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

BEGIN dbms_backup_restore.zerodbid(0); END;

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
LRM-00116: syntax error at ‘sessions’ following ‘=’
ORA-01078: failure in processing system parameters
Create controlfile reuse set database “XE”
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

alter system enable restricted session
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

Reply

Ali April 5, 2016 at 3:32 pm

Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

Reply

Zain Ul Abideen April 10, 2016 at 2:39 pm

How to install oracle 11g xe in ubuntu. with out making a new user for oracle

Reply

Oscar April 14, 2016 at 2:21 am

Hi,thanks for this tutorial, but when i try sudo service oracle-xe start, i receive:

Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.

any idea?

Thanks in advance…

Reply

Robert Adi May 19, 2016 at 11:01 am

Try to install libaio1.
sudo apt-get install libaio1
should solve the problem.

Reply

Lorenzo April 25, 2016 at 9:51 pm

It works for me. Thanks 🙂

Reply

rdangelojp7 May 27, 2016 at 6:05 am

Hello Mike, thank you for the perfect installing instructions. I also tried a few other sites and none of them worked.
I noticed a few people here had trouble logging in on sqlplus, and I was actually one of them (I normally don’t use SQL Developer too much, not even at work, so didn’t install it on my PC). After we carefully follow your instructions and finish installing oracle, there’s actually more to do! Let me share my experience:
At some point during installation, a new user by the name of “oracle” is (mysteriously) created on the Ubuntu OS. After successfully installing oracle-xe according to the instructions, I started the server:
sudo service oracle-xe start
This is where the instructions leave off.
After much fiddling around and searching the internet, I was able to log into sqlplus using the following commands:
su –login oracle (here’s where the mysterious oracle user became useful!)
sqlplus / as sysdba (to actually login to sqlplus)
Finally, once I got into sqlplus I executed the following:
SQL> select * from all_users;
and found out that oracle had not yet created me as a user! which is why I couldn’t log in using sqlplus myusername/mypassword in the first place. So I did some more searching around and executed the following:
SQL> create user identified by ;
SQL> grant all privileges to myusername; (there’s also: SQL> grant create session, grant any privilege to myusername;)
And verified I was created as a user by:
SQL> select * from dba_sys_privs where grantee = ‘user_name’;
After that, I exited SQL, logged out of user ‘oracle’ and back to my user, and logged into sqlplus again using:
sqlplus myusername/mypassword
And that’s my story. I guess you could say I got into sqlplus through a back door! Also I updated my sqlplus to gqlplus which has command line history and convenient command editing abilities just like the OS command line.
best of luck!

Reply

rdangelojp7 May 27, 2016 at 6:19 am

ERRORS !!!:
instead of:
SQL> create user identified by ;
it should say:
SQL> create user myusername identified by mypassword;

And instead of:
SQL> select * from dba_sys_privs where grantee = ‘user_name’;
it should say:
SQL> select * from dba_sys_privs where grantee = ‘myusername’;

Sorry about lack of tabs to clarify commands. I found out too late this forum doesn’t display them

Reply

Geis Garcia June 16, 2016 at 4:42 pm

Hello, how to install oracle developer suite en Ubuntu?

Thank you.

Reply

Prince July 9, 2016 at 6:40 pm

the file oraclexe-gettingstarted.desktop don’t appear on my desktop. Is it wrong?

Reply

Agustí Sánchez August 16, 2016 at 8:32 pm

Excellent!!

Reply

hatice basak yildirim September 4, 2016 at 6:26 pm

Thanks a lot for this guidance.It very useful.

Reply

Cesar Rodriguez September 6, 2016 at 10:01 pm

Increible tutorial.
Funcionó perfecto!

Reply

Drago September 13, 2016 at 11:31 am

Thanks for the tutorial. I was having a lot of trouble accessing Apex after install, I was able to access Apex when I’ve entered different port (1080) for http when configuring oracle-xe ( sudo /etc/init.d/oracle-xe configure ).

Reply

Abhishek November 5, 2016 at 10:01 am

Very nice and helpfull……

Reply

mahmoud November 6, 2016 at 11:01 pm

hello please can you help me with this proble

sudo cat /etc/sysctl.d/60-oracle.conf
# 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
mahmoud@mahmoud:~$ sudo service procps start
mahmoud@mahmoud:~$ sudo sysctl -q fs.file-max
fs.file-max = 295782

Reply

Juan Guillermo January 16, 2017 at 3:29 pm

Restart your system to get the right value for fs.file-max

Reply

Neeraj December 17, 2016 at 3:23 pm

Hello sir,
I followed all your procedures carefully. I have Ubuntu 14.04 LTS (64 bit) machine and I’m installing Oracle 11g (XE) but at the time run this command “sudo dpkg –install oracle-xe_11.2.0-2_amd64.deb” then it is taking to much time and after one hour also no action has been performed(Its Stuck). So just clarify me where I’m doing mistake. Please reply me asap.

Reply

breno December 18, 2016 at 4:45 pm

Thank.
Successfully installed on Mint Sarah 64bit.

Reply

Pritam January 8, 2017 at 11:38 am

I got an ERROR
Copyright (c) 1982, 2011, Oracle. All rights reserved.

Enter password:
ERROR:
ORA-12705: Cannot access NLS data files or invalid environment specified

Reply

Pritam January 8, 2017 at 11:42 am

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Enter password:
ERROR:
ORA-12705: Cannot access NLS data files or invalid environment specified
Enter user-name: SYS
Enter password:
ERROR:
ORA-12705: Cannot access NLS data files or invalid environment specified

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Reply

Alok January 15, 2017 at 9:02 pm

Perfect instructions!! I am able to install Oracle properly. First when I referred Ubuntu ask me site then I damaged my OS. Installed OS again used this site.
Thank you soooo much …. 🙂

Reply

Paul March 10, 2017 at 5:46 pm

Your instructions worked perfectly. Thanks!

Reply

Oriana March 25, 2017 at 11:59 pm

Great!Thank’s!

Reply

arjun April 5, 2017 at 8:14 pm

i fallow all step properly but in final when i run sudo service oracle-xe start
i get this error.

Oracle Database 11g Express Edition is not configured. You must run
‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.

Reply

Jhon Velez July 19, 2017 at 6:53 am

Muchas Gracias,

funcionó Todo

Reply

ashish bijlwan August 8, 2017 at 7:13 pm

Hi,

I have installed oracle in my ubuntu and it worked fine. After restart of my computer I tried to login in sqlplus but I forgot my password. I tried several times to login but no luck. Now I tried with different password to login as SYSTEM it showing me that account is locked. Also while trying conn / as sysdba gives me insufficient privilege error.

Kindly help asap.

Reply

Leave a Comment

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter