Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx)
Posted by Don Seiler on Jun 11, 2010 I recently reformatted my laptop with the latest Ubuntu LTS release, 10.04, aka Lucid Lynx. Since I like to have a native client installation as well as a portable sandbox server, I decided to install the latest version of Oracle EE, 11.2.0.1.
Rather than re-invent the wheel, I’m going to direct you to the previous Oracle-on-Ubuntu post by my colleague Augusto Bott. Many of the directions there hold true here (even with 32-bit vs 64-bit), with a few exceptions.
Download the Software
First and foremost, download the 32-or-64-bit installer files (there are 2 of them) from OTN.
Installing Pre-requisite Packages
Install these software packages on your Ubuntu 10.04 system:
Ubuntu 10.04 comes with libstdc++6 installed. However, Oracle 11gR2 requires libstdc++5. If you do not install libstdc++5, you will see errors as described in this OTN thread. The fix, as described in that thread, is to download and manually shoehorn the libstdc++5 library files onto Ubuntu 10.04:
Now we’re ready to move on.
Create User and Groups
First create the oinstall and dba groups:
Then create the oracle user and assign it to those groups:
Now we create some symbolic links to give the Ubuntu system a more “Red Hat-ish layout,” as Augusto put it:
Then we update some sysctl parameters by editing /etc/sysctl.conf. It is wisest to backup this file first and then add these lines to the end of /etc/sysctl.conf:
Note that these values are different from what was needed in 11gR1.
Now we update some limits for the oracle software owner by adding these lines to the end of /etc/security/limits.conf:
Again, it is best to backup the file first.
Now we activate the new settings from /etc/sysctl.conf with this command:
You should see the new settings in the output of that command.
Unpack and Install the Software
From here we go into the directory containing our two 11gR2 database zip files. I’m using the 64-bit edition, so my files are named linux.x64_11gR2_databaseXof2.zip, where X is 1 or 2. I unzip both of these files, which creates a “database” subdirectory:
Each of these commands will produce a large volume of output to the terminal as it lists each file being unpacked. Once this is done, your directory should look something like this:
Now you simply cd into the database directory and run the runInstaller program:
This will launch the Oracle Universal Installer, or OUI, program. The rest is pretty straight forward. Since this is just a sandbox, I chose not to provide any email info and declined to receive updates. I chose to first install the software only, which went perfectly well. OUI will complain about missing packages, since it is checking for RPMs. We can safely ignore these and proceed with installation.
Once installation is done I set these variables in my bash environment:
Then some quick tests to verify installation:
Everything looks hunky-dory. Let’s create an instance.
I launched dbca to create an Oracle 11gR2 instance. The one problem I encountered here was that, at the end of dbca prompts, the “Confirmation” dialog window was blank. Other blog posts on the internet suggested blindly clicking around until you magically hit the “OK” button, but more often than not I would hit the “Cancel” button. Turns out this is a not-so-uncommon problem with Java Swing and Gnome’s visual effects. The solution for Gnome users is to disable Visual Effects in the Appearance preferences before launching dbca. If you are using a lightweight desktop environment such as LXDE, you shouldn’t have this problem.
And that’s that. The rest is nothing new to those who have done installations before. You can optionally configure TNS names or Listener with the netca tool, or log into your new instance and enjoy.
Special thanks to Augusto Bott for not only authoring the previous Oracle-on-Ubuntu articles but also for suggesting the Gnome Visual Effects conflict!
Category: Group Blog Posts, OracleRather than re-invent the wheel, I’m going to direct you to the previous Oracle-on-Ubuntu post by my colleague Augusto Bott. Many of the directions there hold true here (even with 32-bit vs 64-bit), with a few exceptions.
Download the Software
First and foremost, download the 32-or-64-bit installer files (there are 2 of them) from OTN.
Installing Pre-requisite Packages
Install these software packages on your Ubuntu 10.04 system:
1 | $ sudo apt-get install unzip build-essential x11-utils rpm ksh lsb-rpm libaio1 |
01 | $ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb |
02 | $ dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs |
03 | $ sudo cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64/ |
04 | $ cd /usr/lib64/ |
05 | $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5 |
06 |
07 | $ wget http://security.ubuntu.com/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.7ubuntu6.1_amd64.deb |
08 | $ dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs |
09 | $ sudo cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/ |
10 | $ cd /usr/lib32 |
11 | $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5 |
Create User and Groups
First create the oinstall and dba groups:
1 | $ sudo su - |
2 | # addgroup oinstall |
3 | # addgroup dba |
1 | # useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle |
2 | # mkdir /home/oracle |
3 | # chown -R oracle:dba /home/oracle |
1 | # ln -s /usr/bin/awk /bin/awk |
2 | # ln -s /usr/bin/rpm /bin/rpm |
3 | # ln -s /usr/bin/basename /bin/basename |
4 | # mkdir /etc/rc.d |
5 | # for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done |
6 | # mkdir -p /u01/app/oracle |
7 | # chown -R oracle:dba /u01 |
01 | fs.file-max = 6815744 |
02 | fs.aio-max-nr = 1048576 |
03 | kernel.shmall = 2097152 |
04 | kernel.shmmax = 2147483648 |
05 | kernel.shmmni = 4096 |
06 | kernel.sem = 250 32000 100 128 |
07 | net.core.rmem_default = 4194304 |
08 | net.core.rmem_max = 4194304 |
09 | net.core.wmem_default = 1048576 |
10 | net.core.wmem_max = 1048576 |
11 | net.ipv4.ip_local_port_range = 9000 65535 |
Now we update some limits for the oracle software owner by adding these lines to the end of /etc/security/limits.conf:
1 | oracle soft nproc 2047 |
2 | oracle hard nproc 16383 |
3 | oracle soft nofile 1023 |
4 | oracle hard nofile 65535 |
Now we activate the new settings from /etc/sysctl.conf with this command:
1 | # sysctl -p |
Unpack and Install the Software
From here we go into the directory containing our two 11gR2 database zip files. I’m using the 64-bit edition, so my files are named linux.x64_11gR2_databaseXof2.zip, where X is 1 or 2. I unzip both of these files, which creates a “database” subdirectory:
1 | $ unzip linux.x64_11gR2_database_1of2.zip |
2 | $ unzip linux.x64_11gR2_database_2of2.zip |
1 | $ ls -lh |
2 | total 2.2G |
3 | drwxr-xr-x 8 seiler seiler 4.0K 2009-08-20 14:34 database |
4 | -rw-r--r-- 1 seiler seiler 1.2G 2010-03-09 11:33 linux.x64_11gR2_database_1of2.zip |
5 | -rw-r--r-- 1 seiler seiler 1.1G 2010-03-09 12:38 linux.x64_11gR2_database_2of2.zip |
1 | $ cd database |
2 | $ ./runInstaller |
Once installation is done I set these variables in my bash environment:
1 | export ORACLE_BASE=/u01/app/oracle |
2 | export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 |
3 | export ORACLE_SID=orcl |
4 | export LD_LIBRARY_PATH=$ORACLE_HOME/lib |
5 | export PATH=$ORACLE_HOME/bin:$PATH |
6 | export EDITOR=/usr/bin/vi |
01 | $ sqlplus /nolog |
02 |
03 | SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 10 23:46:42 2010 |
04 |
05 | Copyright (c) 1982, 2009, Oracle. All rights reserved. |
06 |
07 | SQL> quit |
08 | $ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory |
09 | Invoking OPatch 11.1.0.6.6 |
10 |
11 | Oracle Interim Patch Installer version 11.1.0.6.6 |
12 | Copyright (c) 2009, Oracle Corporation. All rights reserved. |
13 |
14 | Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 |
15 | Central Inventory : /u01/app/oraInventory |
16 | from : /etc/oraInst.loc |
17 | OPatch version : 11.1.0.6.6 |
18 | OUI version : 11.2.0.1.0 |
19 | OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui |
20 | Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2010-06-10_23-46-53PM.log |
21 |
22 | Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt |
23 |
24 | Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2010-06-10_23-46-53PM.txt |
25 |
26 | -------------------------------------------------------------------------------- |
27 | Installed Top-level Products (1): |
28 |
29 | Oracle Database 11g 11.2.0.1.0 |
30 | There are 1 products installed in this Oracle Home. |
31 |
32 | There are no Interim patches installed in this Oracle Home. |
33 |
34 | -------------------------------------------------------------------------------- |
35 |
36 | OPatch succeeded. |
I launched dbca to create an Oracle 11gR2 instance. The one problem I encountered here was that, at the end of dbca prompts, the “Confirmation” dialog window was blank. Other blog posts on the internet suggested blindly clicking around until you magically hit the “OK” button, but more often than not I would hit the “Cancel” button. Turns out this is a not-so-uncommon problem with Java Swing and Gnome’s visual effects. The solution for Gnome users is to disable Visual Effects in the Appearance preferences before launching dbca. If you are using a lightweight desktop environment such as LXDE, you shouldn’t have this problem.
And that’s that. The rest is nothing new to those who have done installations before. You can optionally configure TNS names or Listener with the netca tool, or log into your new instance and enjoy.
Special thanks to Augusto Bott for not only authoring the previous Oracle-on-Ubuntu articles but also for suggesting the Gnome Visual Effects conflict!
Tags: 11gR2, Linux, Oracle, Ubuntu