Installing Oracle Database 11g Release 2 Enterprise Edition in Ubuntu 10.

10(Maverick Meerkat)
By : Anil Dev Date : 27 Nov 2010 Why Ubuntu is the Choice? Ubuntu is very much user friendly, as good as a Windows Xp system(lacks only the gaming part ;-) ) and above all it is an OSS (Open Source Software). As there is no Ubuntu Specific Orale Installer available, we need to download the Linux version of installer software for Redhat Enterprise Linux from OTN(Oracle Technology Network). The files that I had downloded were named as follows : linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip Before we start installing Oracle in Ubuntu we must ensure that Oracle has to consider Ubuntu as a Redhat Enterprise Linux. There are a few basics need to be understood first. Redhat/Fedora like linux systems are rpm(redhat package manger) based systems. Whereas Ubuntu (derived from Debian linux) is a APTITUDE based system. And the beauty of it is that the aptitude repositories mentained in remote sites and can be fetched anytime we rquire any software from the repository when the internet is avaialable. [e.g. Using command “ sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc “ will install the VLC Player in the system.] So we need to make Ubuntu behave as Redhat by installing rpm executives( will see that in the just below steps) and some other executables that will be needed by the installer(OUI). Installing Pre-requisite Packages -----------------------------------------First nstalled these software packages on Ubuntu 10.04 $ sudo apt-get install unzip build-essential x11-utils rpm ksh lsb-rpm libaio1 Ubuntu 10.04 comes with libstdc++6 installed. But, Oracle 11gR2 requires libstdc++5. If you do not install libstdc++5, The fix is to download the libstdc++5 library files onto Ubuntu 10.04: $ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb $ dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs $ sudo cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64/ $ cd /usr/lib64/ $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5 $ wget http://security.ubuntu.com/ubuntu/pool/universe/i/ia32libs/ia32-libs_2.7ubuntu6.1_amd64.deb

$ sudo dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs $ sudo cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/ $ cd /usr/lib32 $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5 Create oracle User and related Groups First create the oinstall and dba groups: ------switch to root $ sudo su [sudo] password for anil: # addgroup oinstall # addgroup dba Then create the oracle user and assign it to those groups: # useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle # mkdir /home/oracle # chown -R oracle:dba /home/oracle Set the password for user Oracle : # passwd oracle Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Now we create some symbolic links to give the Ubuntu system a more “Redhat-ish layout” # ln -s /usr/bin/awk /bin/awk # ln -s /usr/bin/rpm /bin/rpm # ln -s /usr/bin/basename /bin/basename # mkdir /etc/rc.d # 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 # mkdir -p /u01/app/oracle

# chown -R oracle:dba /u01 Then we update some sysctl parameters by editing /etc/sysctl.conf. First backup the file. anil@anil-desktop:~$ cp /etc/sysctl.conf /etc/sysctl.conf.bkp anil@anil-desktop:~$ vi /etc/sysctl.conf Got end of the file and add these below entries. 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 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: Backup first : anil@anil-desktop:~$ cp /etc/security/limits.conf /etc/security/limits.conf.bkp anil@anil-desktop:~$ vi /etc/security/limits.conf Go to end of the file and add the entries below : oracle oracle oracle oracle soft hard soft hard nproc 2047 nproc 16383 nofile 1023 nofile 65535

Now we activate the new settings from /etc/sysctl.conf with this command: # sysctl -p Unpack and Install the Software From here we go into the directory containing our two 11gR2 database zip files. $ unzip linux_11gR2_database_1of2.zip.zip $ unzip linux_11gR2_database_2of2.zip.zip Unzipping at the same location would ensure that everything unpacked from these two zip files would go to the database folder. Now you simply cd into the database directory and run the runInstaller program:

$ cd database $ ./runInstaller Once Oracle Universal Installer and DBCA complete the installations it will ask for two scripts two be run from root prompt. Then the installation is complete. Once installation is done I set these variables in my bash environment: New Oracle user we created didn't yet have a .profile file. So I copied from my user's directory to oracle user's directory. # cp /home/anil/.profile /home/oracle/ Now edit the oracle user's .profile # vi /home/oracle/.profile and at the end the add followings: 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:
oracle@anil-desktop:~$ /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-11-27_1527-53PM.log Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2010 -11-27_15-27-53PM.txt -------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Database 11g There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. -------------------------------------------------------------------------------OPatch succeeded. 11.2.0.1.0

====================================================================== Details thet I had to record after the installation: sid = orcl EM url : https://anil-desktop:1158/em export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_home1 export PATH=$PATH:/u01/app/oracle/product/11.2.0/db_home1/bin =======================================================================

While starting the system next time :

anil@anil-desktop:~$ su - oracle Password: oracle@anil-desktop:~$ env| grep ORA ORACLE_SID=orcl ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 oracle@anil-desktop:~$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Sat Nov 27 15:46:47 2010 Copyright (c) 1982, 2009, Oracle. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 836976640 bytes Fixed Size 1339740 bytes Variable Size 536874660 bytes All rights reserved.

Database Buffers 293601280 bytes Redo Buffers 5160960 bytes Database mounted. Database opened. SQL> select name from v$database; NAME --------ORCL

Now to Use the Oracle Eneterprise Manager : ----------------------------------------------------Check if Enterprise Manage Console is running oracle@anil-desktop:~$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://anil-desktop:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is not running. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/anildesktop_orcl/sysman/log

Start the Enterprise Manager console oracle@anil-desktop:~$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://anil-desktop:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ....... started. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/anildesktop_orcl/sysman/log

The 11g R2 background processes that should be available oracle@anil-desktop:~$ ps -ef oracle 6654 1 0 15:46 oracle 6656 1 0 15:46 oracle 6660 1 0 15:46 oracle 6662 1 0 15:46 oracle 6664 1 0 15:46 oracle 6666 1 0 15:46 oracle 6668 1 0 15:46 oracle 6670 1 0 15:46 oracle 6672 1 0 15:46 oracle 6674 1 0 15:46 oracle 6676 1 0 15:46 oracle 6678 1 0 15:46 oracle 6680 1 0 15:46 oracle 6682 1 0 15:46 oracle 6684 1 0 15:46 oracle 6686 1 0 15:46 oracle 6688 1 0 15:46 oracle 6828 1 0 15:47 oracle 6842 1 0 15:47 oracle 6844 1 0 15:47 oracle 6852 1 0 15:47 oracle 6854 1 0 15:47 oracle 6915 1 0 15:52 oracle 6917 1 0 15:52 | grep -v grep|grep ora_ ? 00:00:00 ora_pmon_orcl ? 00:00:00 ora_vktm_orcl ? 00:00:00 ora_gen0_orcl ? 00:00:00 ora_diag_orcl ? 00:00:00 ora_dbrm_orcl ? 00:00:00 ora_psp0_orcl ? 00:00:00 ora_dia0_orcl ? 00:00:00 ora_mman_orcl ? 00:00:00 ora_dbw0_orcl ? 00:00:00 ora_lgwr_orcl ? 00:00:00 ora_ckpt_orcl ? 00:00:00 ora_smon_orcl ? 00:00:00 ora_reco_orcl ? 00:00:00 ora_mmon_orcl ? 00:00:00 ora_mmnl_orcl ? 00:00:00 ora_d000_orcl ? 00:00:00 ora_s000_orcl ? 00:00:00 ora_qmnc_orcl ? 00:00:00 ora_cjq0_orcl ? 00:00:00 ora_vkrm_orcl ? 00:00:00 ora_q000_orcl ? 00:00:00 ora_q001_orcl ? 00:00:00 ora_smco_orcl ? 00:00:00 ora_w000_orcl

The below is the screen shot of the Enterprise Manager Console being accessed using Google Chrome browser :

Before shutting down the system shutdown database and EM console.
oracle@anil-desktop:~$ emctl stop dbconsole

Sign up to vote on this title
UsefulNot useful