Skip to Content

How to install Oracle 10g on Linux

Pronco's picture

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:


2- Unzip the database by running this command:


3- Uncompress the database by running this command:


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:


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

(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:

To disable the temporary swap space execute the following commands:


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:

(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:

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


7- Check for required RPMs

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


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:

After you are done with the Oracle10g installation undo the changes you made to


9- Check the kernel parameters

To see all kernel parameters, execute:

For Oracle10g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:

ip_local_port_range = 1024 65000

I added the following lines to the /etc/sysctl.conf file which is used during the boot process:

Adding these lines to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/rc.d/rc.sysinit script which is invoked by /etc/inittab. But in order that these new added lines or settings in /etc/sysctl.conf become effective immediately, execute the following command:


Explanation for Semaphores:

Semaphores can best be described as counters which are used to provide synchronization between processes or between threads within a process for shared resources like shared memories. System V semaphores support semaphore sets where each one is a counting semaphore. So when an application requests semaphores, the kernel releases them in "sets". The number of semaphores per set can be defined through the kernel parameter SEMMSL.

To see all semaphore settings, run:

The SEMMSL Parameter

This parameter defines the maximum number of semaphores per semaphore set.

Oracle recommends to set SEMMSL to the largest PROCESSES init.ora parameter of any database on the Linux system plus 10. Oracle also recommends to set SEMMSL to a minimum value of 100.

The init.ora parameter PROCESSES specifies the maximum number of operating system processes that can be started by the Oracle instance. In a non MTS environment, Oracle spawns a system user process for each connection. This means that in such an environment the PROCESSES parameter defines the maximum number of simultaneous Oracle connections minus sum of all Oracle background processes. It can also be said that the PROCESSES value should never be greater than SEMMSL.

The SEMMNI Parameter

This parameter defines the maximum number of semaphore sets in the entire Linux system.

Oracle recommends to set SEMMNI to a minimum value of 100.

The SEMMNS Parameter

This parameter defines the total number of semaphores (not semaphore set) in the entire Linux system. A semaphore set can have more than one semaphore, and according to the semget(2) man page, values greater than SEMMSL * SEMMNI makes it irrelevant.

Setting it to a minimum value of 256 is for initial Oracle installation only. Oracle recommends to set SEMMNS to the sum of the PROCESSES parameter for each database on the system, adding the largest PROCESSES twice, and then adding 10 for each DB.

The maximum number of semaphores that can be allocated on a Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI)

Setting SEMMSL and SEMMNI to 100 makes sure that SEMMNS semaphores can be allocated as determined by the above calculation.

The SEMOPM Parameter

This parameter defines the maximum number of semaphore operations that can be performed per semop(2) system call.

The semop(2) function provides the ability to do operations for multiple semaphores with one semop(2) system call. Since a semaphore set can have the maximum number of SEMMSL semaphores per semaphore set, it is often recommended to set SEMOPM equal to SEMMSL.

Oracle recommends to set SEMOPM to a minimum value of 100.


10- Setting semaphores

First of all to avoid wasting your time if you want to undo the following settings take a backup for this file "sysctl.conf" by using this command:

Setting the Semaphore Kernel Parameters

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:

To see the new updated semaphore settings, run:


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:

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:


12- Setting the file handles

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

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

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.


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.

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

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

The default limit for oracle is now 4096 and the oracle user can increase the number of file handles up to 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:

PAM modules are required for performing login

This is the PAM module that will read the /etc/security/limits.conf file. You need to add the following entry to these files: (1) /etc/pam.d/system-auth (2) /etc/pam.d/sshd (3) /etc/pam.d/su (4) /etc/pam.d/login


14- Setting Limits for the Maximum Number of Processes for the Oracle User

To see the current limit of the maximum number of processes for the oracle user, run:

Note that the ulimit options are different for other shells.

To change the "soft" and "hard" limits for the maximum number of processes for the oracle user (as ROOT), add the following lines to the /etc/security/limits.conf file:

To make this change permanent, add "ulimit -u 16384" (for Bash) to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat 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:


15- Creating Oracle Directories

For Oracle10g you only need to create the directory for $ORACLE_BASE:


16- Setting Oracle enviorments

To have these environment variables set automatically each time you login as oracle, you can add these environment variables to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat Linux. To do this you could simply copy/paste the following commands to make these settings permanent for your oracle's Bash shell:

SID = "System Identifier" whicjh is the global databse name


17- Before you execute runInstaller, make sure the Oracle environment variables are set. You can verify the settings by running the set command:


Comments

ramez.hanna's picture

i've doing trying to install

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

ramez.hanna's picture

ok i did it

i followed the instructions and everything went fine, now how do i check if it is running or no?


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

Mandrake x86_64

I tried the steps above on Mandrake 10.2 Limited Edition x86_64 and oracle still complained that it was not redhat.

Install isue

Hi,

I have successfully installed 10g on my Linux Mandriva 10.2, however every time I try to create a new instance, I get the following problem:

SQL> startup nomount pfile=init.ora
ORA-27103: internal error
Linux Error: 13: Permission denied
Additional information: 101
Additional information: -1208009368

Did you also have this issue ? Have you got any suggestions to help me get aroung this.

Thanks in advance.

Regards Alex

ramez.hanna's picture

thanks

thanks for the tip, i found something close that helped me but you've put it nicely


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

Ahmed Hashim's picture

[A good how to with screensho

Comment viewing options

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


Dr. Radut | book