Submitted by Musicraft on Sun, 03/07/2005 - 16:34.
( categories: Howtos )

How to install Oracle 10g on Mandrake 10.1 Official

1- Creating Oracle User Accounts

To create the oracle account and groups, execute the following commands:

su - root
groupadd dba # group of users to be granted SYSDBA system privilege
groupadd oinstall # group owner of Oracle files
useradd -c "Oracle software owner" -g oinstall -G dba oracle


2- Unzip the database by running this command:

gunzip ship.db.lnx32.cpio.gz


3- Uncompress the database by running this command:

cpio -idmv < ship.db.lnx32.cpio


In order to install oracle the system must have at least 512MB of RAM and 1GB of swap space or twice the size of RAM. And for systems with more than 2 GB of RAM, the swap space can be between one and two times the size of RAM.

4- To check the size of physical memory, execute:

grep MemTotal /proc/meminfo


5- To check the size of swap space, execute:

grep SwapTotal /proc/meminfo

(OPTIONAL)

You also can add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:

su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap

To disable the temporary swap space execute the following commands:

su - root
swapoff tmpswap
rm tmpswap


6- Check how much space is in the /tmp :

According to Oracle's documentation, the Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. But OUI checks if /tmp is only greater than 80 MB.

To check the space in /tmp, run:

df /tmp

(OPTIONAL)

If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:

su - root
mkdir //tmp
chown root.root //tmp
chmod 1777 //tmp
export TEMP=/ # used by Oracle
export TMPDIR=/ # used by Linux programs like the linker "ld"

When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:

su - root
rmdir //tmp
unset TEMP
unset TMPDIR


7- Check for required RPMs

rpm -q gcc make binutils setarch openmotif mandrakelinux-release

This command queries the RPM database if these RPMs are installed or not (gcc, make, binutils, setarch, openmotif, mandrakelinux-release) If not so execute:

urpmi gcc
urpmi make
urpmi binutils
urpmi setarch
urpmi openmotif
urpmi mandrakelinux-release


8- Make the OUI believe that its installing Oracle 10g on Redhat , because Mandrake is not supported by Oracle.

You have to edit these 2 files ( /etc/redhat-release , /etc/mandrakelinux-release ) file on Mandrake to make Oracle10g believe it is running on RHELAS3. To change the /etc/redhat-release file, you can simply copy/paste the following commands:

su - root
cp /etc/redhat-release /etc/redhat-release.backup
cat > /etc/redhat-release /etc/mandrakelinux-release > /etc/sysctl.conf

To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

Alternatively, you can use sysctl(8) to change it:

sysctl -w kernel.sem="250 32000 100 128"

To see the new updated semaphore settings, run:

ipcs -ls


11- Setting Shell Limits for the Oracle User (steps 12 & 13)

If you just install a small test database, then you might be ok with the current settings (note that the limits very often vary). But for (larger) production databases, you should increase the following shell limits to the following values recommended by Oracle:

nofile = 63536 (To verify, execute: ulimit -n)
nproc = 16384 (To verify, execute: ulimit -u)

The nofile option denotes the maximum number of open file descriptors, and nproc denotes the maximum number of processes available to a single user.

To see all shell limits, execute:

ulimit -a


12- Setting the file handles

The maximum number of file handles can be changed in the proc file system without reboot:

su - root
echo "63536" > /proc/sys/fs/file-max

Alternatively, you can use sysctl(8) to change it:

sysctl -w fs.file-max=63536

To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

echo "fs.file-max=63536" >> /etc/sysctl.conf


13- Setting the shell limits for the Oracle user

Now login to the oracle account again since the changes will become effective for new login sessions only.

$ su - oracle
$ ulimit -n
1024
$

To change this, you have to edit the file /etc/security/limits.conf as root and add the following lines, respectively:

oracle soft nofile 4096
oracle hard nofile 63536

Now login to the oracle account again since the changes will become effective for new login sessions only.

$ su - oracle
$ ulimit -n
4096
$

The default limit for oracle is now 4096 and the oracle user can increase the number of file handles up to 63536:

$ su - oracle
$ ulimit -n
4096

$ ulimit -n 63536
$ ulimit -n
63536
$

To make this change permanent, add "ulimit -n 63536" (for Bash) to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Mandrake Linux (to verify your shell run: echo $SHELL). To do this you could simply copy/paste the following commands for the oracle's Bash shell:

su - oracle
cat >> ~oracle/.bash_profile > ~oracle/.bash_profile > ~oracle/.bash_profile


ramez.hanna's picture
Submitted by ramez.hanna on Sun, 03/07/2005 - 22:41.

i've doing trying to install it and came across these same instructions somewhere on the internet but the problem is oracle doesn't load at start, how do i do that? and how to apply patches too?


the best things in life are free --- so as myself


Submitted by Musicraft on Mon, 04/07/2005 - 11:42.

Hi Ramez , please tell me if you succeeded in installing oracle or not in the first place , if not so please tell me what have you done exactly meaning at which step did you encounter a problem and did you succeed in running the installer or not ?

If your question is to ask about starting the oracle instance at startup automatically then you have to edit /etc/oratab and change the 'N' to 'Y' next to your 'SID'.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.