Installing Oracle 10g On Ubuntu Karmic 64 Bit or Otherwise PDF Print E-mail
Written by Josh B
Thursday, 07 January 2010 18:31
Tags: oracle | ubuntu
Why Oracle 10g on Ubuntu...?
Oracle doesn't officially currently support its database on Ubuntu. However, I think that Ubuntu, especially the current release (09.10 : Karmic) is a great development platform. At my place of work there is a small development dept all busily developing and all using Ubuntu as the development platform of choice. The system we support uses Oracle 10g as its database. It followed that if we are to work productively then we needed some way of installing Oracle on Ubuntu. This guide is the result of lots of trial, error and spending time figuring out the best way to install Oracle 10g on Ubuntu.
Since Oracle doesn't support Ubuntu, installing Oracle in this way on a Production machine is very unwise. Its also even more unwise if you notice that I leave many of the defaults alone and use easily guessable passwords. However, when we deploy onto Production systems these defaults are close enough that we can deliver meaningful work without having to get a Sun server for the office. It also means we can all have our our installation of Oracle on our machines. Since its local the response time is very fast. And since no-one else is using the same Oracle install we can restart as many times as we want to...
Obviously if you think differently and install Oracle based Ubuntu into a production environment and it all goes horribly wrong you have only yourself to blame. I will not accept liability for your company going out of business because of this guide...! NB: If you are running 64-bit Ubuntu then you will need to follow the sections marked out for 64-bit Users.
Disclaimer: This has been adapted from many blogs, forums and other websites. If you see a bit of text that you think has been lifted from your blog entry, forum post or other waffling it probably might of. Please let me know and I will change. However no stealing of copyright is meant...!
This guide will take about two hours to complete, not including the time to download the file from Oracle. To fully install Oracle budget at least a morning or afternoon. The install is usually straight forward, but can throw up unexpected problems...!
Download
You will first need to download the installation file from Oracle. For 32-bit Ubuntu use "10g Release 2 Enteprise Edition for the Linux x86 architecture" and for 64-bit Ubuntu use "Oracle Database 10g Release 2 (10.2.0.1.0) for Linux x86-64". You will then either get 10201_database_linux32.zip or 10201_database_linux_x86_64.cpio.gz depending on your choice. Put this somewhere handy...
Install Libs
sudo apt-get install gcc libaio1 lesstif2 lesstif2-dev make rpm libc6 sun-java6-jre
For 64 Bit Ubuntu...
sudo apt-get install gcc-multilib libc6-dev-i386 libc6-dev-i386 libc6-i386 ia32-libs
(This avoids an compilation error because Oracle has mixed and matched 32-bit and 64-bit libraries. The Exception is "Error in invoking target 'install' of makefile '/oracle/10g/ctx/lib/ins_ctx.mk" and the compiler will have the following error :
/usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
/usr/bin/ld: cannot find /lib/libpthread.so.0
Installing gcc-multilib, etc appears to avoid this)
Install libstdc++5
With Ubuntu 09.10 this is no longer included in the Packages. (If you are not on Karmic, install it via Synaptic.) Install as follows:
wget "http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb"
ar vx libstdc++5_3.3.6-17ubuntu1_i386.deb
tar zxvf data.tar.gz
file usr/lib/libstdc++.so.5.0.7
sudo install usr/lib/libstdc++.so.5.0.7 /usr/lib32/
cd /usr/lib32
sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
cd /usr/lib
sudo ln -s /usr/lib32/libstdc++.so.5
For 64 Bit Users
This is the same apart from using the following first two steps:
wget "http://de.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb"
ar vx libstdc++5_3.3.6-17ubuntu1_amd64.deb
Add user/groups
sudo groupadd oinstall
sudo groupadd dba
sudo groupadd nobody
sudo useradd -m oracle -g oinstall -G dba
sudo passwd oracle
Set the password to oracle... Remember to change this to something else afterwards and never leave it like this on a public facing server. (And why are you letting an Oracle Server be public facing...?). If you will be running this on your own machine don't forget to add yourself to the oinstall group. This will allow you to use sqlldr and sqlplus from the same install for development and debugging...!
Update Kernel Parameters
sudo gedit /etc/sysctl.conf
Add:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
And reload with:
sudo /sbin/sysctl -p
Change Limits
sudo gedit /etc/security/limits.conf
Add the following to the end
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
Suse-ise the Environment
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
sudo ln -s /usr/bin/basename /bin/basename
sudo mkdir /oracle
sudo mkdir /oracle/10g
sudo chown -R oracle:oinstall /oracle
sudo chmod -R 775 /oracle
Update default profile
sudo gedit /etc/profile
Add the following to the end:
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/10g
export ORACLE_SID=orcl10
export PATH=$PATH:$ORACLE_HOME/bin
Double check...
su - oracle
echo $ORACLE_BASE
echo $ORACLE_HOME
exit
Redhat-ise Ubuntu
sudo gedit /etc/redhat-release
Add this :
Red Hat Enterprise Linux AS release 3 (Taroon)
Unpack the Downloaded File
Go to where you put the downloaded file and...
mkdir oracle_install
cp 10201_database_linux32.zip oracle_install/
unzip 10201_database_linux32.zip
For 64 Bit Users
mkdir oracle_install
cp 10201_database_linux_x86_64.cpio.gz oracle_install/
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -id < 10201_database_linux_x86_64.cpio
The unzipping operation creates a subdirectory. Make this available to the Oracle user:
cd ..
sudo chown -R oracle:oinstall oracle_install/
At this point you are ready to start installing Oracle...!
Run the Graphical Installer
To initiate the installation, you'll have to log right out of the system, and log in directly as the oracle user (alternatively, you can fiddle around with DISPLAY environment variables, but logging off and back on again is simpler and less prone to making mistakes!). See also http://excession.org.uk/blog/setting-up-xdmcp-on-karmic-koala-ubuntu-0910.html
To do this try:
gdmflexiserver --xnest
(NB: if you get authority errors then you need to make sure you have a fresh terminal window, and can this can attach application to the local screen. If problems persist, then make sure that the Remote Login for is enabled under System -> Administration -> Login Window )
Log into this window, and then...
cd to the location of the zip file
/home/oracle/database/runInstaller
It may take a while for the install to come up...
Un-tick the "Create Starter Database option", and keep hitting next. The install takes about 10 mins on a typical machine and typical rest-load.
NB: You will get an error regarding the target "collector" of makefile '/oracle/10g/sysman/lib/ins_emdb.mk' . This can be ignored as we will not be using this function. (Its used by Oracle to check data on Oracle. Since Karmic isn't a supported o/s this can be ignored...)
This error is identified by "/usr/bin/ld: i386 architecture of input file `/oracle/10g/sysman/lib/snmccolm.o' is incompatible with i386:x86-64 output" in the make log.
You will then be asked to run at least one (usually two) scripts as root. Do so... These can be run by "sudo" if you prefer.
When all this finished Oracle has been installed. Woo...! Hoo...! But there's still a way to go...!
Creating A Listener For the New DB
It's not a requirement to create a Listener before you create a database, but it's a good idea to do so. A Listener is a process which listens on a well-known port for requests from remote users seeking to connect to the Oracle database. Without one, therefore, you'd only ever be able to connect to the database whilst directly logged onto the server itself, which is obviously a bit of a show-stopper!
To create a Listener, we use the Network Configuration Assistant. To invoke the Assistant, just issue the command netca (should be in path) as the oracle user in a new terminal session. Press "Next" to accept the defaults. After a bit you will get to "Finish" which is where you want to finish.
netca
Creating a Database
First, find out the id of the oinstall group. You can find this from looking in System -> Admin -> Users and Groups -> Manage Groups. Alternatively, use:
cat /etc/group | grep oinstall
NB: The oinstall Group Id should be 1002 or similar. If the User/Group Applet is giving "0" then try double checking the Properties of the group. I've noticed that the Users/Groups Applet can be unreliable...
Then, as root, perform the following command. (NB: This can't be performed by sudo, you must be root)
echo "<dba_group_gid>" > /proc/sys/vm/hugetlb_shm_group
This allows the oinstall group access to hugetlbpages. Without this you will get error "ORA-27125: unable to create shared memory segment" when setting up the database.
Run the Database Configuration Assistant, or DBCA for short. You will need to be the Oracle user you set up earlier.
dbca
This is not a difficult thing to do: mostly, in our case, it involves clicking "Next" to walk through the wizard, accepting all defaults. You will be prompted when you actually need to enter something.
Just be sure to specify the correct database name (it should match what is set as your ORACLE_SID, but with a proper domain extension. By default the ORACLE_SID is orcl10, and can be found out by running the oraenv command in the oracle bin directory...
Use the password "oracle" for the password and write down the values it spits out at the end...!
分享到:
相关推荐
Ubuntu 11.04 安装指南 本文档详细介绍了 Ubuntu 11.04 的安装过程,包括自动分区和手动分区两种方式。通过本文档,用户可以轻松地安装 Ubuntu 11.04 操作系统。 一、安装前的准备 在安装 Ubuntu 11.04 之前,...
### Ubuntu 11.04 安装指南详解 #### 一、Linux基础知识与挂载点概念 在深入了解Ubuntu 11.04的安装之前,我们先来了解一下Linux的基础知识,尤其是关于挂载点的概念。 Linux作为一种强大的开源操作系统,其核心...
### Ubuntu 11.04下Qt开发环境的安装指南 #### 一、引言 在Linux环境下搭建Qt开发环境对于初学者来说可能会遇到不少挑战。本文将详细介绍如何在Ubuntu 11.04上安装Qt开发环境,并分享一些实用的经验技巧。本教程...
Ubuntu 11.04 是 Ubuntu 操作系统的一个版本,发布于2011年,而Wubi是Ubuntu提供的一种简便的安装方式,尤其适合那些希望在不重新分区硬盘的情况下体验Linux的Windows用户。Wubi允许用户将Ubuntu安装为一个Windows内...
### Ubuntu 11.04 下安装 ns-allinone-2.34 的详细步骤及注意事项 #### 一、Ubuntu 11.04 的安装 1. **下载 Ubuntu 11.04** - 访问官方网站 [www.ubuntu.org.cn](http://www.ubuntu.org.cn/) 下载 Ubuntu 11.04。...
Ubuntu 11.04 安装手册是一份详细的指南,旨在帮助用户了解如何在计算机上安装并配置Ubuntu 11.04,一款面向桌面计算机、笔记本和服务器的Linux操作系统。Ubuntu 11.04代号为"Natty Narwhal",于2011年4月发布,是...
### Ubuntu 11.04 图形安装教程与设置详解 #### 一、Ubuntu 11.04 系统概述 Ubuntu 11.04(Natty Narwhal)是Ubuntu系列的一个重要版本,发布于2011年4月28日。这个版本带来了许多新的特性和改进,包括采用Unity...
这个教程将详细介绍如何在Ubuntu 11.04上安装并优化3D效果,以及如何提升系统的开机速度。 一、3D效果安装与配置 1. **硬件需求**:首先,确保你的电脑硬件满足运行3D效果的基本要求,包括一个支持OpenGL的显卡和...
CSI Tool 集成安装包(适配Ubuntu 11.04系统,Intel 5300 无线网卡) csitools
### 硬盘全新安装Ubuntu 11.04详细指南 #### 一、概述 随着Linux系统的普及和发展,越来越多的用户开始尝试将其作为主要操作系统使用。Ubuntu作为一款基于Debian的发行版,以其易用性和社区支持而受到广泛欢迎。...
Ubuntu11.04 下载
【Ubuntu 11.04 系统安装与设置详解】 Ubuntu 11.04,代号Natty Narwhal,是Ubuntu发行版的一个重要里程碑。它在2011年4月发布,带来了多项技术创新和改进。本文将详细介绍Ubuntu 11.04的图形安装过程、基本设置、...
Ubuntu 11.04 下 Vbox 虚拟机安装Windows 8全教程.doc
Ubuntu 11.04 图形安装教程、基本设置、网络设置、软件源、开启Unity 借鉴 Ubuntu 是一个基于 Debian GNU/Linux 的操作系统,适合笔记本、桌面计算机和服务器使用。它包含了所有您需要的应用程序网页浏览器、幻灯片...
"Ubuntu 11.04 安装后要做的20件事情" Ubuntu 11.04 安装后要做的20件事情是指在安装了 Ubuntu 11.04 之后需要完成的一系列任务,以便快速配置和优化系统。下面是这20件事情的详细解释: 1. 不喜欢 Unity? 切换到...
【Ubuntu 11.04 系统安装与设置】 Ubuntu 11.04,代号Natty Narwhal,是2011年发布的一款Linux操作系统,它基于Debian GNU/Linux并专注于桌面应用。这个版本引入了多项重要更新和改进,包括GCC 4.5编译器、GNOME ...
### Ubuntu 11.04 安装 Wine 1.3 的详细步骤 #### 一、准备工作 在开始安装 Wine 1.3 之前,请确保您的 Ubuntu 11.04 已经更新到了最新状态。这一步非常重要,因为最新的系统更新可能会包含必要的依赖项或者安全...