Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Installing Oracle 11g R2 on Ubuntu 10 Howto

Dude!Aug 16 2010 — edited Feb 7 2012
This is a of follow-up of my previous post: Installing Oracle 11g R2 on Ubuntu 10.04 (solved)
1079139

Revisited.

Installing Oracle 11gR2 11.2.0.1 x86_64-bit in Ubuntu Linux 10.04 Intel x86_64-bit.
(Please see the previous thread regarding feedback for 32-bit installations)


Note: Tips and troubleshooting info are the end of this document



h2. Oracle Installation:

h3. Oracle Software Prerequisites

h4. Install required packages

sudo su -

apt-get install build-essential
apt-get install libaio1
apt-get install libaio-dev
apt-get install unixODBC
apt-get install unixODBC-dev
apt-get install pdksh
apt-get install expat
apt-get install sysstat
apt-get install libelf-dev
apt-get install elfutils
apt-get install lsb-cxx


To avoid error "linking ctx/lib/ins_ctx.mk...":
cd /tmp
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs
cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64/
cd /usr/lib64/
ln -s libstdc++.so.5.0.7 libstdc++.so.5

cd /tmp
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.7ubuntu6.1_amd64.deb
dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/
cd /usr/lib32
ln -s libstdc++.so.5.0.7 libstdc++.so.5

cd /tmp
rm *.deb
rm -r ia64-libs
rm -r ia32-libs


To avoid error invoking target 'idg4odbc' of makefile:
ln -s /usr/bin/basename /bin/basename


To avoid errors when executing the post-install root.sh script:
ln -s /usr/bin/awk /bin/awk


h3. Kernel Parameters

sudo su -

Make a backup of the original kernel configuration file:
cp /etc/sysctl.conf /etc/sysctl.original


h4. Modify the kernel parameter file

echo "#">> /etc/sysctl.conf
echo "# Oracle 11gR2 entries">> /etc/sysctl.conf
echo "fs.aio-max-nr=1048576" >> /etc/sysctl.conf
echo "fs.file-max=6815744" >> /etc/sysctl.conf
echo "kernel.shmall=2097152" >> /etc/sysctl.conf
echo "kernel.shmmni=4096" >> /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=9000 65500" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=1048586" >> /etc/sysctl.conf
echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf

Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes


Load new kernel parameters
sysctl -p



h3. Oracle Groups and Accounts

sudo su -

groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
usermod -s /bin/bash oracle

passwd oracle

groupadd nobody
usermod -g nobody nobody

id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)


Make a backup of the original file:
cp /etc/security/limits.conf /etc/security/limits.conf.original

echo "#Oracle 11gR2 shell limits:">>/etc/security/limits.conf
echo "oracle soft nproc 2048">>/etc/security/limits.conf
echo "oracle hard nproc 16384">>/etc/security/limits.conf
echo "oracle soft nofile 1024">>/etc/security/limits.conf
echo "oracle hard nofile 65536">>/etc/security/limits.conf



h3. Oracle Directories

i.e. /u01/app for Oracle software and /u02/oradata for database files

mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u02/oradata

chown oracle:oinstall /u01/app/oracle
chown oracle:oinstall /u01/app/oraInventory
chown oracle:oinstall /u02/oradata

chmod 750 /u01/app/oracle
chmod 750 /u01/app/oraInventory
chmod 750 /u02/oradata



h3. Oracle Universal Installer

+Login as the Oracle user - do not use 'su' command+
ssh -Y oracle@server_address

See Tips below for mounting the Oracle installation source
/path_to_installer/runInstaller

Note: Select the "Ignore All" button at the Prerequisite Checks dialog.



h2. Tips:

Fix backspace and arrow keys in the vi-editor:
sudo apt-get install vim


Allow the Oracle user to gain root access:
Edit /etc/sudoers and add the following:
# Members of the oinstall group may gain root privileges
%oinstall ALL=(ALL) ALL


Enable remote SSH connectivity:
sudo apt-get install ssh
Note: New accounts requires a password: passwd oracle


Connect from a X-Windows enabled terminal with trusted X11 forwarding:
Using 'su - oracle' will break X screen forwarding or proper display when using Oracle runInstaller

You should either log out root and log in as user "oracle", or use SSH with X forwarding from a remote system or local terminal screen: e.g.
# ssh -X oracle@localhost
# ssh -X oracle@server_hostname_or_ip

Then simply type "xclock" to see if X forwarding to your local X-server works.
Typing 'xclock' in the terminal window should display a clock on your desktop.

Note: When using SSH you should not manually configure DISPLAY variables and using 'xhost' is also not necessary.
When making a remote connection, the program you use to connect to Linux need to be as an X-server to process the requests from the Linux client application.
There are several free products availabe for windows, e.g. MobaXterm. MacOSX users can use Apple's X11 from optional install.

Mount an iso disk image:
mount -o loop /u02/oradata/oracle11gR2.iso /mnt/
Note: For this to work the iso image needs to be copied to a Linux filesystem.


Avoid Oracle runInstaller ".oui: No such file" / "bad interpreter: Permission denied:
Logout your current X-session and login as user Oracle
Insert the Oracle Installation DVD

Or from a remote terminal session:
Insert the Oracle Installation DVD
sudo umount /dev/sr0
Create a new session as user Oracle
ssh -Y oracle@server_address
sudo mount /dev/sr0 /media
/media/database/runInstaller

If you see "runinstaller" instead of "runInstaller" you can try the following:
sudo mount -o loop,norock /dev/cdrom /media

Note the OUI installer fails if there are spaces in the path to runInstaller

Blank windows in the Oracle Database Creation Assistant (DBCA)
Disable Visual Effects using System -> Preferences -> Appearance, Visual Effects

Regards and best of luck.

Edited by: Dude on Dec 17, 2010 3:56 PM

Comments

user2309906
HI ...you can use connect_by_root to find all the id's IN a hierarchy ...to find the one's NOT IN hirarachy should not be a problem from there ... any sample data ???
BluShadow
user13304081 wrote:
hye all,

my aim is to retrieve all the positions that are not in a hierarchy...please help me ...
i
What is your database version?
How about providing some create table statements and example data (insert statements) for us?
How about showing what output you would expect from that example data?
Frank Kulash
Hi,

Welcome to the forum!

It might be more efficient to do a CONNECT BY query, and find the nodes that are leaves at the top level:
SELECT	*
FROM	table_x
WHERE	CONNECT_BY_ISLEAF	= 1
AND	LEVEL			= 1
START WITH	parent_id	IS NULL
CONNECT BY	parent_id	= PRIOR id
	AND	LEVEL		<= 2	-- For efficiency
;
Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
It helps to mention which version of Oracle you're using, especially when asking about CONNECT BY queries, where every version since Oracle 7 has had significant changes.
BluShadow
Or something like this...
SQL> ed
Wrote file afiedt.buf

  1  with t as (select null as mgr, 1 as emp_id, 'Chairman' as position from dual union all
  2             select 1, 2, 'Vice Chairman' from dual union all
  3             select 2, 3, 'Company Director' from dual union all
  4             select 3, 4, 'Sales Manager' from dual union all
  5             select 3, 5, 'Technology Manager' from dual union all
  6             select 3, 6, 'HR Manager' from dual union all
  7             select 4, 7, 'Sales Rep' from dual union all
  8             select 4, 8, 'Sales Rep' from dual union all
  9             select 4, 9, 'Sales Rep' from dual union all
 10             select 10, 10, 'Dodgy Contractor' from dual union all
 11             select 5, 11, 'Software Developer' from dual union all
 12             select 5, 12, 'Software Developer' from dual union all
 13             select 5, 13, 'Network Specialist' from dual union all
 14             select 5, 14, 'Communications Implementer' from dual union all
 15             select 6, 15, 'Rectruitment Agent' from dual union all
 16             select 6, 16, 'Job Marketing Agent' from dual union all
 17             select 6, 17, 'Job Marketing Assistant' from dual)
 18  --
 19  -- END OF TEST DATA
 20  --
 21  select emp_id from t
 22  minus
 23  select emp_id
 24  from   t
 25  connect by mgr = prior emp_id
 26* start with mgr is null
SQL> /

    EMP_ID
----------
        10

SQL>
... but it does depend what the data looks like and what exactly you are trying to achieve.
Nimish Garg
TRY THIS
SELECT 
	EMPNO 
FROM 
	SCOTT.EMP 
WHERE 
	EMPNO NOT IN 
	(
		SELECT 
			EMPNO 
		FROM 
			SCOTT.EMP 
		CONNECT BY PRIOR 
			EMPNO=MGR 
		START WITH MGR = 7566
	)
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 6 2012
Added on Aug 16 2010
26 comments
49,276 views