Installing the Oracle server software is really a simple affair. Installing all the software will probably not take you more than a couple of hours. All the real effort goes into the proper planning of such things as the operating system configuration and physical space you need for your Oracle databases to function optimally.
1.0 Choice of Operating System
All operating systems have good and bad points: none are suitable for all applications. In general, Oracle Corporation supports all the mainstream platforms, including:
- Linux on Intel and AMD
- Microsoft Windows on Intel and AMD
- Solaris on SPARC (Scalable Processor Architecture) from Sun Microsystems
- HPUX on PA-RISC (Precision Architecture- Reduced Instruction Set Computer) from HP
- AIX on POWER from IBM
- Open the VMware and Select File --> New --> Virtual Machine.
- Select typical configuration from the Welcome screen and click Next.
- Select Red Hat Enterprise Linux 5 from the drop down list and click Next.
- Enter virtual machine Name, Location and click Next button.
- On next screen enter the value for disk size and click Finish on next screen.
- On the RedHat5 tab select Edit Virtual Machine Settings.
- Click the Add button at the bottom of list. Select Hard Disk from the hardware list and click Next.
- Select Create a new virtual disk option and click next button.
- Here select the SCSI option.
- Provide 10 GB size and on next screen accept the default name and clcik Finish.
- Similarly add three more hard disks each one has a size of 10GB.
- Your Virtual Machine Setting should be identical to the one as shown below.
- Insert the RHEL media in the DVD player and Power On the Virtual Machine, you will be welcomed by the RHEL installer.
- Click the Next button on the next screen.
- On next screens select Language, Keyboard and enter Installation Number.
- Select yes on next screen to create partitions on our virtual drives.
- Select Custom Layout from the drop down list on next screen and click Next.
- Set the partition on first drive (sda) as shown below. For oracle the swap size should be 1.5 times of the RAM size.
- Partition the next drives as shown below.
- Provide root user password and click Next. On package selection screen select Customize Now.
- Select the all packages for development section of customization to fulfill the oracle installation requirements.
Oracle recommends that you tune the following values to optimize the performance of the system.
Semaphore Parameters: semmsl, semmns, semopm, semmni
Shared Memory Segments: shmall, shmmax, shmmni
File Handles: file-max
Port Numbers: ip_local_port_range
Socket Receive Buffer Size: rmem_default, rmem_max
Socket Send Buffer Size: wmem_default, wmem_max
- If the value of any kernel parameter is different from the recommended value, then using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:
Restart the system to persist the changes.
1.0.3 Configure RHEL Shell for Oracle
To improve the performance of the software on Linux systems, you must increase the following shell limits for the oracle user:
nofile Maximum number of open file descriptorsnproc Maximum number of processes available to a single user
- Add the following lines to the /etc/security/limits.conf file:
- Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
1.0.4 Check Network Configuration
- Verify that the /etc/hosts file is used for name resolution. You can do this by checking the hosts file entry in the nsswitch.conf file.
The output of the command should contain an entry for files.
- Check hostname.
The output should be similar to the output shown above.
- Create the following groups;
- OSDBA group (dba); identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege)
- OSOPER group (oper); optional group, create this group if you want a separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege)
- Oracle Inventory group (oinstall); create this group the first time you install Oracle software on the system
- Create an Oracle software owner user (oracle).
In the preceding command,
- g denotes the primary group of the oracle user, which is the oinstall group
- G is the secondary group, which is the dba group
- d denotes the home directory for the new user
- p is the password for the oracle user
1.1 Directory Structure & File Naming Conventions
The Oracle needs a file system into which it can be installed. Oracle strongly recommends a disk layout methodology formally called the Optimal Flexible Architecture (OFA).
The OFA is a set of recommendations from Oracle Corporation aimed at simplifying management of complex software and databases often running under multiple versions of software. The OFA essentially imposes a standardized way of naming the different physical components of Oracle and places them on the file system according to a logical plan.
OFA was designed to achieve minimize disk contention, to provide for operating more than one database without administrative confusion, and to improve database performance. You can consider the OFA guidelines a set of best practices regarding two important issues—disk layout and naming conventions—based on extensive field experience by Oracle professionals.
1.1.1 Mount Points
Mounting refers to attach a directory with a file system. This directory is the top-level directory of a file system. Oracle recommends that all your Oracle mount points be named according to the convention /pm, where p is a string constant to distinguish itself from other mount points, and m is a two-digit number. This means you can name your mount points /u01, /u02, /u03, and so on.
Oracle recommends that you have four mount points to fully comply with the OFA guidelines. The first of these is for locating the Oracle Database server binaries, and the other three are for holding the database files. Let’s say you’re creating mount points for a database named “orcl”. In this case, the three mount points designated for the data files can be clearly named as follows: /u02/oradata/orcl, /u03/oradata/orcl, and /u04/oradata/orcl. This nomenclature makes it clear that these file systems are meant for Oracle databases and that the data for different databases is stored on separate mount points.
In Linux and UNIX systems, a home directory is the directory that a user lands in when he or she first logs in. All home directories should follow the naming convention /pm/h/u, where pm is the mount point name, h is a standard directory name, and u refers to the directory owner. For example, the /u01/app/oracle directory could be the home directory for the user named oracle.
1.1.2 Oracle Base Directory
At the root of the Oracle directory structure is the directory called Oracle base, denoted by the environment variable ORACLE_BASE. The Oracle base directory is the top directory for all Oracle software installations. Oracle recommends that you use the form /pm/h/u. Where:
- pm is the mount point name (e.g. u01)
- h is the name of a standard directory (e.g. app)
- u is the directory’s owner’s name (e.g. oracle)
The following commands create the Oracle Base Directory.
Change the owner of base directory to oracle and group to oinstall.
Change permission on the base directory.
In the numeric 775 permission, 7 means rwx and 5 means r-x.
The Oracle home directory is denoted by the ORACLE_HOME environment variable, the Oracle server software executable files and other configuration files are located under this directory. For example, the $ORACLE_HOME/bin directory holds the executables for the Oracle products.
In order to comply with the OFA requirement of enabling the simultaneous running of multiple versions of Oracle software, you need to install Oracle software in a directory with the following path: /pm/h/u/product/v/type_n, where:
- pm: The mount point name (e.g. u01)
- h: The standard directory name (e.g. app)
- u: The owner of the directory (e.g. oracle)
- v: The version of the software (e.g. 10.2.0)
- type: The type of installation, such as database (db), client (client) or companion (companion)
- n: An optional counter, which enables you to install the same product multiple times under the same Oracle base directory
In the preceding syntax for the Oracle home, /pm/h/u/product/v_type_n, the first part, /pm/h/u, is nothing but the Oracle base directory. Thus the Oracle home directory is always located underneath the Oracle base directory, and it can also be specified as $ORACLE_BASE/product/v/type_n.
Oracle supports multiple Oracle homes, but you can’t install products from one release of Oracle into an Oracle home directory of a different release. You must install the Oracle Database 10.2 software into a new Oracle home directory. For example, you can’t install release 10.2 software into an existing Oracle9i Oracle home directory.
Oracle Home Directory (e.g. /u01/app/oracle/product/10.2.0/db_1), is automatically created by OUI.
1.1.4 Oracle Inventory Directory
The Oracle Inventory Directory, also known as OraInventory, is used to store an inventory of all the Oracle software on a server. Multiple Oracle installations can share the same Oracle Inventory Directory. You need to specify the path for this directory only the first time you install an Oracle product on a server. The usual format of this directory is as follows: $ORACLE_BASE/ora_inventory.
Again the OUI will prompt for its location and no need to create manually.
1.1.5 Flash Recovery Area Directory
Flash recovery area is a disk area (a directory or ASM disk group but not a raw file system) set apart for storing all the recovery-related files. It’s a good idea to create it on entirely different storage devices from where you have your data files. The usual format is as follows: $ORACLE_BASE/flash_recovery_area.
The following commands create the flash recovery area, change owner and permissions.
1.1.6 Administrative Files
Every Oracle database has several administrative files associated with it. Among these files are con-figuration files, core dump files, trace files, export files, and other related log files. You need to store these files under separate directories for ease of maintenance.
Oracle recommends the following directory structure for clarity: /h/admin/d/a, where:
- h is the Oracle base directory (e.g. /u01/app/oracle)
- admin indicates that this directory holds administration-related files
- d refers to the specific database, and
- a refers to the sub directories for each specific type of administrative files
- adhoc; Contains ad hoc SQL files
- arch; Contains archived redo log files
- adump; Contains any audit files
- bdump; Contains background process trace files
- create; Contains SQL scripts that you can use for creating your databases
- cdump; Contains core dump files
- dpdump; Contains the Data Pump Export files
- pfile; Contains instance parameter files (such as init.ora)
- udump; Contains SQL trace files for user processes
1.1.7 Product Files
Oracle recommends that you keep each version of the software in a separate directory distinguished by the naming convention /h/product/v, where h is the home directory, product indicates that the software versions are under this directory, and v is the version of the product. For example, I have a directory on my system called /u01/app/oracle/product/10.2.0 under which I save all the Oracle server software subdirectories during installation. If I decide to install the 10.2.1 version, I’ll do so under the directory /u01/app/oracle/product/10.2.1. You can see that this type of naming convention makes it very easy to install and manage multiple versions of the Oracle software.
1.1.8 Database Files
These include the data files that contain the table and index data and certain operational files called control files and redo log files.
Oracle recommends that all tablespaces be named with no more than eight characters, with the format tn, where t is a descriptive name for the tablespace and n is a two-digit number. For data files, the recommended notation is /pm/q/d/tn.dbf, where pm is the mount point; q is an indicator, usually “oradata”, d is the database name, t is the descriptive name for the tablespace that contains this data file, and n is a two-digit number. Thus, a typical data file under the OFA guidelines would have a name like /u02/oradata/prod/system01.dbf, which refers to a data file in the System table-space.
The recommendation for control and redo files is to follow the naming conventions /pm/q/d/controln.ctl and /pm/q/d/redon.log, respectively. In this notation, pm is the mount point; q is an indicator, such as “oradata”, denoting that the files contain Oracle-related data; d is the data-base name, and n is a two-digit number.
The following commands create the directories for database files.
1.2 Configure Oracle User’s Environment
Login as the oracle user and set the following environment variables.
Login as the oracle user and set the following environment variables.
- Open the oracle user’s shell startup file in any text editor, on bourne shell , bash shell, or korn shell it will be .bash_profile while on c shell it will be .login and enter the following lines
- Depending on the oracle user's default shell, make the following changes to the default shell start-up file: For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE systems) /etc/profile.local:
- Run the shell script
Oracle Universal Installer (OUI) is a Java application that performs component-based installations. OUI provides the following capabilities for addressing software management and distribution:
- Automatic dependency resolution and complex logic handling
- Installation from the Web
- Component and suite installations
- Implicit deinstallation
- Support for multiple Oracle homes
- NLS or globalization support
- Support for distributed installations
- Unattended “silent” installations that use response files
- Create a staging directory, such as /staging, and copy the contents of the CD to this directory as shown: $ cp -r /mnt/cdrom /u01/staging
- Login as an oracle user, start the installation, go to the /staging directory and run the following command
- Here we are going to install oracle software only so uncheck the “Create Starter Database” option and click Next.
- On next screen accept the suggested location for oracle inventory.
- Click Install button on summary page to start the installation.
- After installation login as root user and execute the following scripts to complete the installation.
































Very good site you have created. The methodology is to install the Oracle binaries and to create the Oracle database on shared disks during the first installation. Mount the Oracle binaries directory and verify that the database can be started from all nodes. Thanks a lot.
ReplyDeleteOracle Inventory Software