Sie sind auf Seite 1von 7

THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

Search

Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx)


Posted by Don Seiler on Jun 11, 2010

Contact
Email Us About Our Blog

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, Im 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 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: 01 $ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.617ubuntu1_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/ia32libs_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 Now were ready to move on. Create User and Groups First create the oinstall and dba groups: 1 $ sudo su 2 # addgroup oinstall 3 # addgroup dba Then create the oracle user and assign it to those groups: 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 Now we create some symbolic links to give the Ubuntu system a more Red Hat-ish layout, as Augusto put it: 1 2 3 4 5 6 7 # # # # # # # ln -s ln -s ln -s mkdir for i mkdir chown /usr/bin/awk /bin/awk /usr/bin/rpm /bin/rpm /usr/bin/basename /bin/basename /etc/rc.d in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done -p /u01/app/oracle -R oracle:dba /u01

Network with Pythian The Pythian Group


Like 346 people like The Pythian Group on Faceb

Renjith

Rakesh

John

Ramesh

Suh

Pythian on Facebook

Participar en este sitio


Google Friend Connect

Miembros (128) Ms

Ya eres miembro? Acceder

Pythian on LinkedIn

Log Buffer
Log Buffer Archives About Log Buffer

Special Projects
MySQL Plug-in for Oracle Grid Control DBD::Oracle

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: 01 02 03 04 05 06 07 08 09 10 11 fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 1048576 net.core.wmem_max = 1048576 net.ipv4.ip_local_port_range = 9000 65535

Recent Posts
Show/Hide

Recent Comments
Show/Hide

Tag Cloud
Show/Hide

Authors
Show/Hide

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

Now we update some limits for the oracle software owner by adding these lines to the end of /etc/security/limits.conf: 1 2 3 4 oracle oracle oracle oracle soft hard soft hard nproc 2047 nproc 16383 nofile 1023 nofile 65535

Again, it is best to backup the file first. Now we activate the new settings from /etc/sysctl.conf with this command: 1 # sysctl -p 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. Im 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 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: 1 2 3 4 5 $ ls -lh total 2.2G drwxr-xr-x 8 seiler seiler 4.0K 2009-08-20 14:34 database -rw-r--r-- 1 seiler seiler 1.2G 2010-03-09 11:33 linux.x64_11gR2_database_1of2.zip -rw-r--r-- 1 seiler seiler 1.1G 2010-03-09 12:38 linux.x64_11gR2_database_2of2.zip

Now you simply cd into the database directory and run the runInstaller program: 1 $ cd database 2 $ ./runInstaller 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: 1 2 3 4 5 6 export export export export export export ORACLE_BASE=/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 ORACLE_SID=orcl LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$ORACLE_HOME/bin:$PATH EDITOR=/usr/bin/vi

Then some quick tests to verify installation: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 $ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 10 23:46:42 2010 Copyright (c) 1982, 2009, Oracle. All rights reserved.

SQL> quit $ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory Invoking OPatch 11.1.0.6.6 Oracle Interim Patch Installer version 11.1.0.6.6 Copyright (c) 2009, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.1.0.6.6 OUI version : 11.2.0.1.0 OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2010-06-10_23-4653PM.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/lsinventory201006-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 --------------------------------------------------------------------------------

34 -------------------------------------------------------------------------------35 36 OPatch succeeded. Everything looks hunky-dory. Lets 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 Gnomes 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 shouldnt have this problem. And thats 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, Oracle Tags: 11gR2, Linux, Oracle, Ubuntu

23 Responses
1. coskan says: June 11, 2010 at 4:29 pm I did not reinstall oracle when I install the OS (tried to upgrade first then gave up and installed again) but relinked ORacle and it worked fine so far apart from some strange i/o caused by ext4 and memory issues (free buffer) for ext4 issue I followed this and suggest everybody who wants to use ext4 with oracle http://oracleandy.wordpress.com/2010/05/19/oracle-on-ext4-warning/ still having interesting free buffer problem though. (maybe I should send you a mail for you to test if you will see the same issue on your system) By the way thanks both of you again for disabling visual effect trick. Reply 2. Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx) | Ubuntu-News - Your one stop for news about Ubuntu says: June 13, 2010 at 9:13 am [...] 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. More here [...] Reply

3.

mbongeni says: June 15, 2010 at 1:59 pm Could even install Oracle Applications 12.1.1 on Ubuntu 10.04 using these instructions (little adjustments here and there, and a little additional stuff). Much appreciated Reply

4.

Alex says: June 27, 2010 at 12:38 pm Error in invoking target install of makefile /oracle/10g/ctx/lib/ins_ctx.mk. am a newbie in ubuntuany recommendation? Reply

Don Seiler says: June 28, 2010 at 8:36 am Alex, seems like you missed the section about libstdc++5 libs. Reply 5. Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx) die Seilerwerks says: June 30, 2010 at 3:38 pm [...] leave a comment Note: This post originally appeared on The Pythian Group blog. [...] Reply

6.

Per says: July 5, 2010 at 4:50 am Thanks for an excellent description which worked wonderfully. Being a novice I ran across these two issues which may be evident to a more experienced user/related to

Being a novice I ran across these two issues which may be evident to a more experienced user/related to some mistake on my part: 1) The password in the useradd statement used to create the oracle user must be in _encrypted_ format. I found it easier to use the passwd command to set the password. 2) From Unpack and Install the Software on I had to run as user oracle and because I failed to provide oracle with sudo capabilities I had to switch to a sudo-capable user when the installation required root privilege. Everything else went just as described :-) Reply

7.

tubbyasstoo says: July 12, 2010 at 9:35 am has anyone tried compiling c++ code after installing using this tutorial ? I get the error `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/sysliblist` -ldl -lm /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so: undefined reference to `__stack_chk_fail@GLIBC_2.4 collect2: ld returned 1 exit status and when checking /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so, I find it is a symb link pointing to libstdc++.so.6 presumably it need needs to be referencing libstdc++.so.5 ? Reply

8.

Tushar says: July 20, 2010 at 1:17 pm I ran runInstaller as oracle user but it is giving me following error: oracle@Blackpearl:~/database$ ./runInstaller Starting Oracle Universal Installer Checking Temp space: must be greater than 80 MB. Actual 4817 MB Passed Checking swap space: must be greater than 150 MB. Actual 1951 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] n User Selected: No Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2010-07-20_11-4355PM/installActions2010-07-20_11-43-55PM.log Can someone help?? Thanks in advance Reply

9.

Tushar says: July 20, 2010 at 1:23 pm When I tried ignoring the errors I got these errors: oracle@Blackpearl:~/database$ ./runInstaller Starting Oracle Universal Installer Checking Temp space: must be greater than 80 MB. Actual 4523 MB Passed Checking swap space: must be greater than 150 MB. Actual 1951 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<>> Ignoring required pre-requisite failures. Continuing Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-07-20_11-52-03PM. Please wait oracle@Blackpearl:~/database$ No protocol specified Exception in thread main java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at java.awt.Toolkit$2.run(Toolkit.java:821) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source) at com.jgoodies.looks.LookUtils.(Unknown Source) at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783) at javax.swing.UIManager.setLookAndFeel(UIManager.java:480) at oracle.install.commons.util.Application.startup(Application.java:758) at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)

at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181) at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265) at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114) at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132) oracle@Blackpearl:~/database$ Reply

10.

Michiel Weggen says: July 23, 2010 at 4:51 am do a xhost + before you su oracle, to allow the oracle use to connect to the x server Reply

11.

Javier Alcala says: July 24, 2010 at 9:40 am Great post!!! Thank you very much. With your information I have installed oracle in my lucid lynx. Reply

12.

Robert says: July 26, 2010 at 10:26 pm This was a great post, thank you very much. One question; I havent wanted to install a starter database in a long time, but this time I did. However, I didnt select the option when I first installed. How can I create the starter DB after the fact? Do the scripts reside on the installation media somewhere? Googling isnt helping much here. Reply

Robert says: July 26, 2010 at 10:41 pm Ahnevermind. Forgot about the sample schema option in DBCA. Feel like a n00b now. Reply

13.

Robert says: July 26, 2010 at 10:29 pm Oh, and @Tushar, as I found elsewhere earlier today: you can also install sux and use that in place of su. It passes the user permission to use the X session when it switches. Reply

14.

Maleeq says: July 27, 2010 at 7:48 am Thanks for the great write up. I installed 11gR2 on Lucid without any hitch. Pardon me though, I am a bit of a newbie to both oracle and Linux. After the whole installation (I installed the sample schema during installation process), how do I achieve the following: 1. Start the listener and register the database, orcl, against it. 2. Do I have to manually start the DB everytime I boot up? Thanks. Reply

15.

Shirley says: July 27, 2010 at 12:10 pm Hi all, I am new to Ubuntu and I just installed 10.04 and tried to install oracle 11g in this PC by following instructions on this page. Everything works fine until I got to the step Prerequisite Checks I got Run Level check failed. Current it is 2 but it need to be 3,5. Could somebody help me on this? I searched on the web and tried to use command telinit to change it to 3 and reboot. But when I ran the oracle install again it still says Run Level 2. Thank you very much for your help! Reply

16.

mhmd says: July 28, 2010 at 12:24 pm Wonderful Explanation But with me at the end of installing The Oracle net configuration Assistant Failed

Reply

17.

bureku says: August 1, 2010 at 10:07 am Just finished my installation Ubuntu 10.04 64bit, Oracle 11gR2 in a VirtualBox vm on a Mac OSX host. Excellent write up! thx! Reply

18.

Steve says: August 6, 2010 at 9:37 pm I spend a lot of time with this and could not get it to work in Ubuntu, problems all over the place. Tried it with CentOS and worked first time with no problems. I guess the story is that Ubuntu is basically a desktop system. Oh Well. Reply

19.

Patrick says: August 12, 2010 at 3:41 pm Does the OUI cleanly uninstall on Ubuntu 10.04? Reply

20.

Audrey Lee says: August 14, 2010 at 8:55 pm I followed this blog entry and had smooth sailing. That is until I tried dbca: $ dbca # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb785a6f3, pid=5953, tid=3077314240 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_17-b02 mixed mode) # Problematic frame: # C [ld-linux.so.2+0xd6f3] I posted some details here: http://forums.oracle.com/forums/thread.jspa?threadID=1077139 I am searching from clues Reply

21.

Audrey Lee says: August 14, 2010 at 8:59 pm Oops wrong OTN thread. I posted the details here: http://forums.oracle.com/forums/thread.jspa?threadID=1114741 Reply

Leave a Reply

Name (required) Mail (required) Website

Submit Comment

Papers & Books


MySQL Administrator's Bible by Sheeri K. Cabral Oracle RAC Workload Management whitepaper by Alex Gorbachev 8 Rules for Designing More Secure Applications with MySQL by Augusto Bott and Nick Westerlund

Live Updates
pythian: RT @alexgorbachev: Iron Man is taking over Pythian HQ! http://bit.ly/d6goUG more

Testimonials
Serge Racine DBA, Brookfield Energy We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more

Das könnte Ihnen auch gefallen