by ed0t - Published: October 28th, 2008

Oracle and CentosIn the past few days i’ve spent my time at work setting up a Linux server with Oracle database. Since i have had some problems i have decided to write how to install it without any trouble.

In our company we have bought two Dell servers QuadCore with 4Gb of Ram and 2Tb of hard disk. We have decided to use one of them as a powerful machine to execute some automatic tests on a complex project that requires a lot of computation.

Since the project uses Oracle database, Oracle Warehouse Builder and Oracle Data Integrator, available for Linux and Windows both, i have decided to setup a Linux machine instead of a Windows one to get the more benefits i could.

I admit, i like Ubuntu too much, so my first try has been an Ubuntu Server 8.04 installation, but i’ve had lots of problem during the installation of the database.

So i’ve decided to switch to a more supported Linux version and the solution has been Centos 5.2 AMD64.

I will not explain how to install Centos neitherĀ  Java, there are already a lot of complete tutorial.

Attention, i assume you are root, otherwise use sudo before each command. When some operations must be executed by another user it will be written.

First of all you have to edit a file to let Centos appear like a RedHat system. To do this edit the file /etc/redhat-release, delete the only line inside the file and write: redhat-4.

vim /etc/redhat-release

Then add the following lines to the file /etc/security/limits.conf :

*               soft      nproc    2047
*               hard      nproc    16384
*               soft      nofile   1024
*               hard      nofile   65536

and add the following line (if it is not already there) to the file : /etc/pam.d/login:

session    required     /lib/security/pam_limits.so

Now it’s time to install some packages needed for the installation. So using the Add/Remove Application Tool or simply the yum command install the following packages:

setarch-2.0-1.1x86_64
make-3.81-3.el5.x86_64
glibc-2.5-24.x86_64
glibc-devel-2.5-24.x86_64
glibc-headers-2.5-24.x86_64
glibc-2.5-24.i686
glibc-devel-2.5-24.i386
libaio-0.3.105-3.2.i386
libaio-0.3.105-3.2.x86_64
compat-db-4.2.52-5.1.i386
compat-db-4.2.52-5.1.x86_64
compat-libstdc++-33-3.2.3-61.i386
compat-libstdc++-33-3.2.3-61.x86_64
compat-gcc-34-3.4.6-4.x86_64
compat-gcc-34-c++-3.4.6-4.x86_64
gcc-4.1.2-42.el5.x86_64
gcc-c++-4.1.2-42.el5.x86_64
libXp-1.0.0-8.1.el5.x86_64
libXp-1.0.0-8.1.el5.i386
openmotif-2.3.0-0.5.el5.i386
openmotif-2.3.0-0.5.el5.x86_64
libstdc++-4.1.2-42.el5.x86_64
libstdc++-devel-4.1.2-42.el5.x86_64
libstdc++-4.1.2-42.el5.i386
kernel-headers-2.6.18-92.1.6.el5.x86_64
gtk+-1.2.10-56.el5.x86_64
libpng-1.2.10-7.1.el5_0.1-x86_64
gdk-pixbuf-0.22.0-25.el5.x86_64
giflib-4.1.3-7.1.el5.1.x86_64

Now it’s time to add some configuration lines in /etc/sysctl.conf file:

kernel.shmmni = 4096
#semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Then reload all parameters using this command:

/sbin/sysctl -p

Now we have to create some groups and a user, the owner of the Oracle database:

groupadd oinstallgroupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01
mkdir -p /u02/oradata
chown -R oracle.oinstall /u02

Well, now we have to add some environment variables for the user just created: oracle.

su - oracle
vim ~/.bashrc

And add the following lines:

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH; export PATH
export DISPLAY=:0.0
JAVA_HOME=/opt/jdk1.6.0_10/; export JAVA_HOME

We are almost at the end. Extract the archive, if you have not already do this:

gunzip 10201_database_linux_x86_64.cpio.gzip
cpio -idmv < 10201_database_linux_x86_64.cpio

Now turn back to root user to execute this last command:

su - root
xhost +

At the end switch to oracle user and run the installer:

su - oracle
cd pathToYourOracleInstallationDirectory
./runInstaller

Follow instructions provided with the GUI installer and enjoy Oracle 10.2.0 x64 on your Centos 5.2 AMD64!

To perform a correct installation i have followed these amazing guides:

http://bderzhavets.blogspot.com/2007/04/installing-oracle-10.html

http://www.puschitz.com/InstallingOracle10g.shtml

For the second one especially the section titled : 10g R2 on RHEL AS 4 (x86_64).

Comments: 1 Comment - Category: howto

Rss Comments

1 Comment

  1. Thak you for the news

    1. STENFUSYNEUSE

Leave a Comment