In this video we will demonstrate Oracle 11g installation on Linux.
When installing Oracle on Linux, there are several prerequisites steps that needs to be completed before the installation process ifself.
The installation GUI is identical to other operating systems, but the steps we need to complete before starting the installation are different.
This video will show you how to install Oracle 11gR1, step by step.
This video shows Oracle 11gR1 installation on Linux Cent OS 5 (which is similar to RedHat 5), but can be used to understand the general Oracle installation on Linux.
You can download the Oracle Database software from OTN:
We will start by checking the requirements for Oracle installation.
1) Checking the memory, SWAP, Kernel version and free space requirements.
Memory – Oracle 11g requires at least 1GB RAM.
You’ll be able to check the server’s memory by executing the command:
[root ~]grep MemTotal /proc/meminfo
Swap requirements are specified in the documentation and based on the RAM.
Check the server’s SWAP by executing the command:
[root ~]grep SwapTotal /proc/meminfo
At least 400Mb are needed in /tmp directory. In addition, Oracle 11g software requires about 3.5GB.
Check the /tmp available space by executing the command:
[root ~]df -k /tmp
Check the server’s available space by executing the command:
[root ~]df -k
The available column will display the free space in kilobytes.
The OS kernel version should be 2.6.18 or higher.
Check the kernel version by executing the command:
[root ~] cat /proc/version OR [root ~] uname –r
2) Required Packages
Oracle 11g software needs several rpm packages to be installed on the server.
You can find the full list of packages in the installation guide:
The command “rpm -qa” prints the list of all installed packages. With “grep” command we will look for specific packages.
Example: to verify that the gcc package is install, use:
[root ~]rpm –qa | grep gcc
3) Creating users and groups.
We will create two new groups: ‘dba’ and ‘oinstall’ and the ‘oracle’ user.
[root ~] groupadd oinstall [root ~] groupadd dba [root ~] useradd -g oinstall -G dba oracle [root ~] passwd oracle
4) Setting Kernel parameters.
Open the /etc/sysctl.conf file and configure the following kernel parameters:
fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576
Additional information about the kernel parameter can be found in the Documentation:
After editing the file, execute the following command to apply the changes.
[root ~] sysctl -p
5) Add the following lines to the /etc/security/limits.conf file:
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
6) Add the following line to the /etc/pam.d/login file:
session required pam_limits.so
7) Add the following lines to the /etc/profile file:
This section sets the soft limit for user ‘oracle’ upon login:
if [ $USER = "oracle" ]; then if [ $SHELL="/bin/ksh" ] ; then ulimit -p 16384 ulimit -n 65536 else ulimit -p 16384 -n 65536 fi fi
8) Creating directories for the Oracle installation:
We need to create the directory for Oracle installation. This directory should be owned by user ‘oracle’
[root ~]mkdir -p /u01/app/oracle/product/11.1.0/db_1 [root ~]chown -R oracle:oinstall /u01 [root ~]chmod -R 775 /u01
9) Disable access control:
Access control does not allow opening X-Windows from any server. We will use xhost command to disable this access control.
[root ~] xhost +
10) Edit the /etc/profile file:
We will now connect as user ‘oracle’ and configure the environment in the bash_profile file.
[root ~]su – oracle [oracle ~]vi .bash_profile
We will set the ORACLE_BASE for oracle base directory and ORACLE_SID environment variables. Add the following lines to bash_profile file:
export ORACLE_HOSTNAME=<SERVER_NAME> export ORACLE_BASE=/u01/app/oracle; export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_SID=orcl;
Apply the changes so that the new variables will be set:
[oracle ~] . .bash_profile
The pre-requirement part is completed. All we have to do now is to start the installation.
11) Navigate to the installation directory and start the installation:
[oracle ~] cd /install/database [oracle ~] ./runInstaller
We will skip the installation part as it is quite straightforward, and go to the end of the installation part.
12) Execute configuration scripts as root user:
At the end of the installation, you’ll see the “execute configuration scripts” wizard window. We should run these scripts as root. Open a Terminal as root and execute the below scripts”
[root ~] /u01/app/oracle/oraInventory/orainstRoot.sh [root ~] /u01/app/oracle/product/11.1.0/db_1/root.sh
The installation is now complete.
13) Updating the .bash_profile file with more environment variables:
The last thing we need to do is updating the .bash_profile file:
[oracle ~] vi .bash_profile
We will set the ORACLE_HOME for oracle home directory and the path environment variables. Add the following lines to bash_profile file:
export ORACLE_HOSTNAME=<SERVER_NAME> export ORACLE_BASE=/u01/app/oracle; export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1; export ORACLE_SID=orcl; export PATH=/usr/sbin:$PATH; export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
Apply the changes so that the new variables will be set:
[oracle ~]. .bash_profile
14) Verify that everything is configured correctly.
[oracle ~] sqlplus / as sysdba SQL*Plus: Release 126.96.36.199.0 Production on Mon Oct 25 12:26:26 2010 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 188.8.131.52.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>exit