Installation of Oracle Database 11g Release 2 (11.2) x86_64 on Oracle Enterprise Linux 5 Update 5 on the file system (ie without ASM) or GRID.
If your installation files are in the Windows directory, you can mount it : Linux - Samba - How to mount/map a Windows Share on Linux
- login as root
- RAM: At least 4 GB
[[email protected] ~]# grep MemTotal /proc/meminfo MemTotal: 4344304 kB
- swap space
The following table describes the relationship between installed RAM and the configured swap space requirement:
|Between 4 GB and 8 GB||2 times the size of RAM|
|Between 8 GB and 32 GB||1.5 times the size of RAM|
|More than 32 GB||32 GB|
To determine the size of the configured swap space, enter the following command:
[[email protected] ~]# grep SwapTotal /proc/meminfo SwapTotal: 10860752 kB
- To determine the available RAM and swap space, enter the following command:
[[email protected] ~]# free total used free shared buffers cached Mem: 4344304 4215960 128344 0 13892 3913024 -/+ buffers/cache: 289044 4055260 Swap: 10860752 0 10860752
Add Swap space if needed.
Verify that the processor architecture matches the Oracle software release that you want to install.
[[email protected] ~]# uname -m x86_64
Disk space requirements
The following tables describe the disk space requirements on Linux x86:
|Installation Type||Software (GB)||Data (GB)|
Operating System (Distribution) and kernel
Check that you have the minimal operating system and kernel.
|Minimal Distribution||Minimal Kernel|
|Oracle Linux 4 Update 7||2.6.9 or later|
|Oracle Linux 5 Update 2||2.6.18 or later (compatible with Red Hat Enterprise kernel)|
|Oracle Linux 5 Update 5 (only if using Oracle Unbreakable Enterprise Kernel)||2.6.32-100.0.19 or later|
[[email protected] ~]# cat /etc/enterprise-release Enterprise Linux Enterprise Linux Server release 5.5 (Carthage) [[email protected] ~]# uname -r 2.6.18-194.el5
Package - RPM
Oracle recommends that you install your Linux operating system with the default software packages (RPMs), unless you specifically intend to perform a minimal installation.
The following packages (or later versions) must be installed:
- compat-libstdc++-33-3.2.3 (32 bit)
- glibc-2.5-24 (32 bit)
- glibc-devel-2.5 (32 bit)
- libaio-0.3.106 (32 bit)
- libaio-devel-0.3.106 (32 bit)
- libgcc-4.1.2 (32 bit)
- libstdc++-4.1.2 (32 bit)
- libstdc++-devel 4.1.2
The numa package link for Linux x86 is /usr/lib and Linux x86-64 is /usr/lib64/
To determine whether the required packages are installed, enter commands similar to the following:
rpm -qa | grep beginning_of_the_package_name
[[email protected] Server]# rpm -qa | grep elfutils elfutils-libelf-devel-static-0.137-3.el5 elfutils-libelf-devel-0.137-3.el5 elfutils-libelf-0.137-3.el5
If a package is not installed, then install it from the Linux distribution media or download the required package version from the Linux vendor's Web site.
rpm -Uvh binutils* rpm -Uvh compat-libstdc++* rpm -Uvh elfutils-libelf* rpm -Uvh gcc* rpm -Uvh glibc* rpm -Uvh ksh* rpm -Uvh libaio* rpm -Uvh libgcc* rpm -Uvh libstdc++* rpm -Uvh make* rpm -Uvh numactl-devel* rpm -Uvh sysstat*
Oracle ODBC Drivers
If you intend to use ODBC, then install the most recent ODBC Driver Manager for Linux. Download and install the Driver Manager from the following URL:
Linux RPMs are also available on this Web site.
To use ODBC, you must also install the following additional ODBC RPMs, depending on your operating system
|Distribution||On Linux x86-64|
|OEL 4|| unixODBC-2.2.11 (32 bit) or later
unixODBC-devel-2.2.11 (64 bit) or later
unixODBC-2.2.11 (64 bit ) or later
|OEL 5|| unixODBC-2.2.11 (32 bit) or later
unixODBC-devel-2.2.11 (64 bit) or later
unixODBC-2.2.11 (64 bit) or later
Oracle JDBC/OCI Drivers
You can use JDK 6 Update 10 (Java SE Development Kit 1.6 u10) or JDK 5 (1.5.0_16) with the JNDI extension with the Oracle Java Database Connectivity and Oracle Call Interface drivers. However, these are not mandatory for the database installation. Please note that IBM JDK 1.5 is installed with this release.
Installation Fixup Scripts
During installation, for certain prerequisite check failures, you can click Fix & Check Again to generate a fixup script (runfixup.sh). You can run this script as a root user to complete the required preinstallation steps.
The fixup script does the following:
- Checks and sets kernel parameters to values required for successful installation, including:
- Shared memory parameters
- Semaphore parameters
- Open file descriptor and UDP send/receive parameters
- Sets permissions on the Oracle Inventory directory.
- Reconfigures primary and secondary group memberships for the installation owner, if necessary, for the Oracle Inventory directory, and for the operating system privileges groups.
- Sets up virtual IP and private IP addresses in /etc/hosts.
- Sets shell limits to required values, if necessary.
- Installs the Cluster Verification Utility packages (cvuqdisk rpm).
Using fixup scripts will not ensure that all the prerequisites for installing Oracle Database are satisfied. You must still verify that all the preinstallation requirements are met to ensure a successful installation.
Verify the value of the DNS configuration file /etc/resolv.conf. The nameserver must be not set or set to a valid DNS server and you can add the two time-out parameters.
Disable secure linux
Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:
Alternatively, this alteration can be done using the GUI tool.
Operating System Groups
Log in as root.
Create OS groups.
/usr/sbin/groupadd -g 501 dba /usr/sbin/groupadd -g 505 oper
The ASM group are not needed.
Creating the Oracle Inventory Group
When you install Oracle software on the system for the first time, Oracle Universal Installer creates the oraInst.loc file.
If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following command:
# /usr/sbin/groupadd oinstall
The software owner is used to own and start the installation of an oracle database. You have typically two software owner:
- oracle, for the database software
- and grid for the Oracle Restart owner user.
As we install a single database, we need only the oracle user. To create it, enter a command similar to the following:
[root@@di-rep-db ~]# /usr/sbin/useradd -u 501 -g oinstall -G dba,oper oracle
In the preceding command:
- The -u option specifies the user ID. Using this command flag is optional, as you can allow the system to provide you with an automatically generated user ID number. However, you must make note of the oracle user ID number, as you require it later during preinstallation.
- The -g option specifies the primary group, which must be the Oracle Inventory group–for example, oinstall
- The -G option specifies the secondary groups, which include the OSDBA group, and the OSOPER group.
Verify your user:
[[email protected] /]# id oracle uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba),505(oper)
Set the password of the oracle user:
[[email protected] /]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is WAY too short Retype new UNIX password: passwd: all authentication tokens updated successfully.
For info, password = pwd
To improve the performance of the software, you must increase the following shell limits for the Oracle installation owners:
|Shell Limit||Item in limits.conf||Hard Limit||Soft Limit|
|Maximum number of open file descriptors||nofile||at least 65536||at least 1024|
|Maximum number of processes available to a single user||nproc||at least 16384||at least 2047|
|Maximum size of the stack segment of the process||stack||at least 10240 KB, and at most 32768 KB||at least 10240 KB|
To increase the shell limits:
Depending on your environment, make the following changes for all Oracle installation owners. The steps below only show the user oracle.
- Add the following lines to the /etc/security/limits.conf file: (the following example shows only the software account owner oracle):
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768
- Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so
The kernel parameter values shown in the following section are minimum values only.
|kernel parameter||Minimum Value||Configuration File|
Verification of the semaphore parameters:
[[email protected] ~]# /sbin/sysctl -a | grep sem kernel.sem = 250 32000 100 142
|kernel parameter||Minimum Value||Configuration File|
|shmmax|| Either 4 GB - 1 byte, |
or half the size of physical memory
(in bytes), whichever is lower.
|aio-max-nr|| Maximum: 1048576 |
Note: This value limits concurrent
outstanding requests and
should be set to avoid
I/O subsystem failures.
|ip_local_port_range|| Minimum: 9000 |
If the current value for any parameter is greater than the value listed in this table, then the Fixup scripts do not change the value of that parameter.
To get the value of a parameter:
[[email protected] /]# /sbin/sysctl -a | grep fs.aio-max-nr fs.aio-max-nr = 65536
Using a text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following as it's explain in this article: Linux - Kernel Parameter Management (sysctl.conf)
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 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 = 1048586 net.ipv4.tcp_wmem = 262144 262144 262144 net.ipv4.tcp_rmem = 4194304 4194304 4194304
The minimum value required for shmmax is 0.5 GB. However, Oracle recommends that you set the value of shmmax to 2.0 GB for optimum performance of the system.
Oracle base directory
The Oracle base directory is a top-level directory for Oracle software installations.
To create an appropriate directory:
- Check the free disk space on each mounted file system using the following command:
# df -h
- Create the Oracle Base Directory
mkdir -p /u01/app/oracle chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oracle chmod -R 775 /u01/app
- set the ORACLE_BASE environment variable for the user Oracle to specify the Oracle base directory that you have created.
The Oracle Inventory directory (oraInventory) stores an inventory of all software installed on the system.
mkdir -p /u01/app/oraInventory chown -R oracle:oinstall /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory
Oracle Home Directory
The Oracle home directory is the directory where you choose to install the software for a particular Oracle product.
Oracle Universal Installer creates this directory path that you specify under the Oracle base directory and then you do not need to create this directory.
Configuring the oracle User's Environment
You run Oracle Universal Installer from the oracle account. However, before you start Oracle Universal Installer you must configure the environment of the oracle user.
Login as the oracle user
At least 1 GB of disk space in the /tmp directory
[[email protected] ~]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 77G 13G 61G 18% /
If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:
$ sudo mkdir /mount_point/tmp $ sudo chmod a+wr /mount_point/tmp # exit
Enter commands similar to the following to set the TMP and TMPDIR environment variables for the Bourne, Bash, or Korn shell:
$ TMP=/mount_point/tmp $ TMPDIR=/mount_point/tmp $ export TMP TMPDIR
Hostname on Multi homed/Alias computer
You can install Oracle Database on:
- A multihomed computer. It is associated with multiple IP addresses. This is typically achieved by having multiple network cards on the computer. Each IP address is associated with a host name. In addition, you can set up aliases for the host name.
- A computer with multiple aliases: it is registered with the naming service under a single IP but with multiple aliases. The naming service resolves any of those aliases to the same computer.
Before installing Oracle Database on such a computer, set the ORACLE_HOSTNAME environment variable to the computer whose host name you want to use. Oracle Universal Installer uses the ORACLE_HOSTNAME environment variable setting to find the host name. If ORACLE_HOSTNAME is not set and you are installing on a computer that has multiple network cards, then Oracle Universal Installer determines the host name from the /etc/hosts file.
Example of /etc/hosts file with di-rep-db.hotitem.local as hostname
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 di-rep-db.hotitem.local di-rep-db 127.0.0.1 localhost.localdomain localhost
Clients must be able to access the computer either by using this host name or by using aliases for this host name. To verify this, ping the host name from the client computers using the short name (host name only) and the full name (host name and domain name). Both tests must be successful.
Use the following procedure to set the ORACLE_HOSTNAME environment variable. For example, if the fully qualified host name is somehost.us.example.com, then enter the following commands for the Bourne, Bash, or Korn shell:
$ ORACLE_HOSTNAME=di-rep-db.hotitem.local $ export ORACLE_HOSTNAME
To set the environment variable, we will modify the shell startup script.
Do not install Oracle Database 11g Release 2 (11.2) software into an existing Oracle home.
Verify your shell
[[email protected] ~]# echo $SHELL /bin/bash
Add the following lines at the end of the login configuration file which depend of your shell.
For the Bash shell, add the following environment variables to the /home/oracle/.bash_profile file.
# Umask umask 022 # Tmp Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR # Multiple Alias Home Setting ORACLE_HOSTNAME=di-rep-db.hotitem.local; export ORACLE_HOSTNAME # Installation setting ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_SID=orcl; export ORACLE_SID # Path setting PATH=/usr/sbin:$PATH; export PATH
Some installation changes the default profile but as you have environment variables that can be different from one user to another (such as ORACLE_HOME), the login script is preferred rather than the default profile
Follow this article to know how to show a linux remote windows with X: X11 - How to display remote clients (such as firefox, installation screen) with the X Server CygwinX ?
Login as oracle
Enter the following commands to ensure that the ORACLE_HOME and TNS_ADMIN environment variables are not set:
unset ORACLE_HOME unset TNS_ADMIN
Run the installer
The installation files are on the hard disk, then we change in the directory to the database directory and enter the runInstaller command.
If the installation files are on installation media, enter commands similar to the following, where directory_path is the path of the database directory on the installation media:
Oracle Universal Installer automatically installs the Oracle-supplied version of the JRE. This version is required to run Oracle Universal Installer and several Oracle assistants. Do not modify the Java Runtime Environment (JRE) except by using a patch provided by Oracle Support Services.
[[email protected] ~]$ cd /mnt/kiosque/database [[email protected] database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 64696 MB Passed Checking swap space: must be greater than 150 MB. Actual 7659 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-15_09-27-30PM. Please wait ...
Configure Security Updates
You can choose one of this options:
- Create and Configure a Database: This option creates a new database along with sample schemas.
- Install Database Software Only: This option only installs the database binaries. To configure database, you must run Oracle Database Configuration Assistant after the software installation.
- Upgrade an Existing Database: This option installs the software binaries in a new Oracle home. At the end of the installation, you can upgrade the existing database.
Choose “Create and configure an database”. Click Next
You can choose one of the following options:
- Desktop Class: Choose this option if you are installing on a laptop or desktop class system. This option includes a starter database and allows minimal configuration. This option is designed for those who want to get up and running with the database quickly.(The ORACLE_HOSTNAME Environment Variable must be set)
- Server Class: Choose this option if you are installing on a server class system, such as what you would use when deploying Oracle in a production data center. This option allows for more advanced configuration options. Advanced configuration options available using this option include Oracle RAC, Automatic Storage Management, backup and recovery configuration, integration with Enterprise Manager Grid Control, and more fine-grained memory tuning, among many others.
Choose “Server Class” and click Next
- Grip Option: Single instance database installation: This option installs the database and the listener.
- Install Type: Choose “Advanced Install”
- Product Language: English
- Database Edition: Enterprise
- Installation Location
- Create Inventory
By default, the Oracle Inventory directory is not installed under the Oracle Base directory. This is because all Oracle software installations share a common Oracle Inventory, so there is only one Oracle Inventory for all users, whereas there is a separate Oracle Base for each user.
- Configuration Type: General Purpose
- Database Identifier
- Configuration Option: Choose Unicode, uncheck the Security and install the Sample Schemas
- Management Options: Database Control
- Database Storage: File System (/u01/app/oracle/oradata)
- Backup and recovery: Don't enable backup
- Schema Password: pwd for all account
- Operating System Group (dba, oper)
- Prerequisite check. If you don't have enough swap space (minimum 1.5 the total amount of physical memory), check in this article on how to increase it : Linux - Swap / Paging
When you run the root.sh script, the script prompts you for the path of the local bin directory and automatically copies the oraenv, coraenv, and dbhome scripts to the directory that you specify. The default local bin directory is /usr/local/bin. If you do not run the root.sh script, then you can manually copy the oraenv or coraenv and dbhome scripts from the ORACLE_HOME/bin directory to the local bin directory.
[[email protected] database]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [[email protected] kiosque]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions.
Try then connect to the database control of the machine using the user name SYSTEM and connect as SYSDBA:
When you install Oracle Database, some options are enabled and others are disabled. If you want to enable or disable a particular database feature for an Oracle home, then shut down the database and use the chopt tool.
For the Bash shell, add the following environment variables to the /home/oracle/.bash_profile file.
# For the path setting, ORACLE_HOME ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Backup of root.sh
Oracle recommends that you back up the root.sh script (ORACLE_HOME/root.sh) after you complete an installation. If you install other products in the same Oracle home directory, then Oracle Universal Installer updates the contents of the existing root.sh script during the installation. If you require information contained in the original root.sh script, then you can recover it from the backed up root.sh file.
Start the script utlrp.sql as sys. This script recompiles all PL/SQL modules that might be in an invalid state, including packages, procedures, and types.
lsnrctl status emctl status dbconsole
lsnrctl start emctl start dbconsole
[[email protected] ~]$ sqlplus /nolog SQL*Plus: Release 18.104.22.168.0 Production on Mon Sep 13 15:35:43 2010 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> startup ORA-01031: insufficient privileges SQL> connect / as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 619360256 bytes Fixed Size 1338280 bytes Variable Size 423625816 bytes Database Buffers 188743680 bytes Redo Buffers 5652480 bytes Database mounted. Database opened.
[[email protected] database]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 22.214.171.124.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://di-rep-db.hotitem.local:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/di-rep-db.hotitem.local_direp/sysman/log
Very slow connection through the listener
Verify the value of the DNS configuration file resolv.conf. The nameserver must be not set or set to a valid DNS server and you can add the two time-out parameters.