4.1.1.1.0 How do I Install a Standalone Oracle Database?
How do I Install a Standalone Oracle Database?
Applies to:
RHEL 6.x, OEL6.x
Contents
| |
4 Installing Oracle 11g R2 Grid Infrastructure for standalone server | |
This document applies to Oracle Database 11g R2 running on Red Hat Enterprise Linux 6.x AS x86_64 or Oracle Enterprise Linux 6.x AS x86_64.
Software and Hardware Requirements
- Oracle requires 1.5 gigabytes (GB) of physical memory.
- Swap space must be equal to the amount of RAM allocated to the system.
- Oracle's temporary space (/tmp) must be at least 1 GB in size.
- A monitor that supports resolution of 1024 x 768 to correctly display the Oracle Universal Installer (OUI)
- For Dell supported hardware configurations, see the Software Deliverable List (SDL) for each Dell Validated Component at dell.com/oracle.
The following table describes the disk space required for an Oracle installation:
Table 1-1 | Minimum Disk Space Requirements |
Software Installation Location | Size Required |
Grid Infrastructure home | 4.5 GB Space |
Shared storage disk space | Sizes of database and Flashback Recovery Area |
- It is recommended that you ensure each node contains at least one network interface cards for public network.
- The hostname of each node must follow the RFC 952 standard (www.ietf.org/rfc/rfc952.txt). Hostnames that include an underscore ("_") are not permitted.
[top]
Operating System Requirements
- Red Hat Enterprise Linux 6.x AS x86_64
- Oracle Linux 6.x AS x86_64
Preparing for Oracle Installation
Attaching to RHN/ULN Repository
NOTE: The documentation provided below discusses how to setup a local yum repository using your operating system installation media. If you would like to connect to the RHN/ULN channels, see the appropriate documentation. For Red Hat see, redhat.com/red_hat_network. For information relating to ULN network see, linux.oracle.com.
This section discusses hosting the repository files from a local filesystem storage. While other options to host repository files exist, they are outside of the scope of this document. It is highly recommended to use local filesystem storage for speed and simplicity of maintenance.
- One of the requirements is to have the DVD image mounted either by physical media or by ISO image.
- To mount the DVD, insert the DVD into the server and it should auto-mount into the /media directory.
- To mount an ISO image we will need to run the following command as root, substituting the path name of your ISO image for the field myISO.iso:
mkdir /media/myISO
mount -o loop myISO.iso /media/myISO
- To install and configure the http daemon, configure the machine that will host the repository for all other machines to use the DVD image locally. Create the file /etc/yum.repos.d/local.repo and enter the following:
[local]
name=Local Repository
baseurl=file:///media/myISO/Server
gpgcheck=0
enabled=0
Installing the Dell Validated RPM
Once the Database node is attached to the appropriate yum repository, we will need to install the Dell Validated RPM package. The Dell Validated RPM package automates certain pieces of the installation process required for the installation of Oracle.
The process to install the Dell Validated RPM package is as follows:
- Download the latest Dell Oracle Deployment tar file from
http://en.community.dell.com/dell-groups/enterprise_solutions/m/default.aspx
NOTE: The filename will follow the convention: Dell-Oracle-Deployment-OS version-year-month.tar, for example: Dell-Oracle-Deployment-Lin-2011-07.tar - Copy the Dell Oracle Deployment tar file to a working directory.
- To go to your working directory, enter the following command:
# cd </working/directory/path> - Untar the Dell-Oracle-Deployment release using the command:
# tar zxvf Dell-Oracle-Deployment-o-y-m.tar.gz
NOTE: Where, o is the operating system version, y is the year, and m is the month of the tar release. - Change directory to Dell-Oracle-Deployment-o-y-m
- Install the Dell Validated RPM package using the following command:
# yum localinstall dell-validated* --nogpgcheck
[top]
Installing the Dell Oracle Utilities RPM
The Dell Oracle utilities RPM is designed to do the following Dell and Oracle recommended settings:
- Create Grid Infrastructure directories, set ownership, and permissions.
- Create grid user.
- Create Oracle Database (RDBMS) directories, set ownership, and permissions.
- Create the Oracle base directories, set ownership, and permissions.
- Set pam limits within (/etc/pam.d/login).
- Setup /etc/profile.
- Set SELinux to Disabled.
- Install the Dell PowerEdge system component drivers if applicable.
- Set kernel parameters.
- Set nproc for grid user within (/etc/security/limits.conf)
The process to install the Dell Oracle utilities RPM is as follows:
- Install the Dell oracle utilities RPM package from the Dell-Oracle-Deployment=0-y-m directory the by typing:
# yum localinstall dell-oracle-utilities* --nogpgcheck - Once the rpm is installed, run the dodeploy script to setup the environment as follows: # dodeploy -g -r 11gR2
For more information about the Dell oracle utilities RPM and its options, check the man pages using the command: # man 8 dodeploy
NOTE: The Dell-Oracle-Deplyoment tar contains the latest supported drivers provided from our Software Deliverable List (SDL). Consult the README file found within the Dell-Oracle-Deployment tar for installation instructions of the latest drivers.
[top]
Oracle Software Binary Location
The Oracle software binaries should be located on the database node. It is important to note that starting with Oracle 11g R2 (11.2.0.3), Oracle Database patch sets are full installation of the Oracle software. For more information on how this impacts future Oracle deployments, see My Oracle Support note: 1189783.1 Important Changes to Oracle Database Patch Sets Starting with 11.2.0.2.
[top]
NOTE: Ensure that the public IP address is a valid and routable IP address.
To configure the public network :
- Log in as root.
- Edit the network device file /etc/sysconfig/network-scripts/ifcfg-eth#
where # is the number of the network device:
NOTE: Ensure that the Gateway address is configured for the public network interface. If the Gateway address is not configured, the Oracle Grid installation may fail.
DEVICE=eth0
ONBOOT=yes
IPADDR=<Public IP Address>
NETMASK=<Subnet mask>
BOOTPROTO=static
HWADDR=<MAC Address>
SLAVE=no
GATEWAY=<Gateway Address> - Edit the /etc/sysconfig/network file, and, if necessary, replace localhost.localdomain with the qualified public node name. For example, the command for node :hostname=node.domain.com
- Type service network restart to restart the network service.
- Type ifconfig to verify that the IP addresses are set correctly.
- To check your network configuration, ping the public IP address from a
client on the LAN.
Preparing Shared Storage for Oracle RAC Installation
NOTE: In this section, the terms disk(s), volume(s), virtual disk(s), LUN(s) mean the same and are used interchangeably, unless specified otherwise. Similarly, the terms Stripe Element Size and Segment Size both can be used interchangeably.
Oracle Standalone using Oracle ASM requires LUNs for storing Oracle Database files, and Flash Recovery Area (FRA). To ensure high availability it is recommended that you have:
- At least two shared disks to store your database. Each shared disk should be the same disk speed and size.
- At least two shared volumes/LUNs or volumes to store your FRA. Ideally, the FRA space should be large enough to copy all of your Oracle datafiles and incremental backups. For more information on optimally sizing your FRA, see My Oracle Support ID 305648.1 section "What should be the size of Flash Recovery Area?"
NOTE: The use of device mapper multipath is recommended for optimal performance and persistent name binding.
NOTE: For more information on attaching shared LUNs/volumes, see the Wiki documentation found at: http://en.community.dell.com/dell-groups/enterprise_solutions/w/oracle_solutions/3-storage.aspx
[top]
This section describes how to use Linux’s native partition utility fdisk to create and align a single partition on a volume/virtual disk that spans the entire disk.
CAUTION: In a system running the Linux operating system, align the disk prior to being written to the Volume/Virtual Disk (VD). Failure to do so will cause all data on the disk to be destroyed.
To use the fdisk utility to create a partition and set the alignment:
- At the command prompt, type one of the following:
- #> fdisk –u /dev/<block_device>
- #> fdisk –u /dev/mapper/<multipath_disk>
Where, <block_device> is the name of the block device that you are
creating and aligning a partition on. For example, if the block device is /dev/sdb, type:fdisk –u /dev/sdb If multiple paths to a shared disk are being used and device mapper is the multipath software.The system displays the following message:
The number of cylinders for this disk is set to 8782.
NOTE: The number of cylinder is larger than 1024, and could in certain setups cause problems with:
- Software that runs at boot time (old versions of LILO)
- Booting the Partitioning software from other operating systems(For example, DOS FDISK, OS/2 FDISK)
NOTE: The value of the number of cylinders in your display message may be different depending on the size of your disk.
- Command (m for help): n # To create a new partition
- Command actione extendedp primary partition (1-4):
P # To create a primary partition - Partition number (1-4): 1
- First sector (63-xxxxxx, default 63): <Stripe Element Size or Segment Size in terms of Sectors>
Where the Stripe Element Size(SES) or the Segment size (SS) is the
amount of disk space that is consumed on a single physical disk by a Stripe Element as part of Stripe. For example, a stripe that contains 256KB of disk space and has 64KB of data residing on each disk in the stripe. Here the stripe element size is 64KB and the stripe size is 256KB.
Use the following formula to set the value above:
Stripe Element Size in Sectors = Stripe Element Size in KB * 2First Sector = Stripe Element Size in Sectors
NOTE: The above formula assumes that 1 Sector = 512 Bytes or 0.5 KB
Set the above value to the following, if the SES/SS was left at the Storage Controller’s default value:
- For Dell PowerVault MD30xx/MD30xxi, set First sector to: 128 (default 64KB * 2)
- For Dell PowerVault MD32xx/MD32xxi, set First sector to: 256 (default 128KB * 2)
- For Dell EqualLogic PS-Series, set First sector to: 128 (default 64KB *
2)
If the SES/SS for the disk/Volume/VD is set to a non-default value of the storage array, for example 512KB in case of MD32xx, then set the First sector value to 1024 in that case.
Last sector or +size or +sizeM or +sizeK (1024-xxxxx, default xxxxxx): <Enter default value or return key> # Default Value so the single partition spans the entire disk
Command (m for help): wq # write and quit
The system displays the following message:
The partition table has been altered!Calling ioctl() to re-read partition table. Syncing disks. If you get a warning message instead saying the kernel still reads the old partition table then follow step 3 below for the kernel to be able to re-read the new partition table. - Repeat step 1 for all the disks that need to be aligned.
- Type the following to re-read the partition table and to be able to see the newly created partition(s)
#> partprobe
Or
#> service multipathd restart
Or
#> kpartx –a /dev/mapper/<multipath_disk> - Verify that the partition has been aligned by running the one of the
following command:
- #> fdisk –ul /dev/<block_device>
- #> fdisk –ul /dev/mapper/<multipath_device>
Where, <block_device> or <multipath_device> is the name of the disk
that we aligned the partition of.
The following example is of a sample output of the above command on a block device that has been aligned. If you partition is properly aligned then you will see the desired starting sector that you set in step 1 under the Start column against your partition.
Disk /dev/mapper/mpath70: 53.6 GB, 53697576960
bytes
255 heads, 63 sectors/track, 6528 cylinders, total 104878080 sectors
Units = sectors of 1 * 512 = 512 bytes
DeviceBoot Start End Blocks Id System
/dev/mapper/mpat1024 104872319 52436096 83 Linux h70p1
- Reboot the system if your newly created and aligned partition is not
displayed properly.
[top]
Adjusting the Stripe Element Size on a Primary Partition
To use the fdisk utility to adjust a disk partition, do the following steps:
NOTE: This article assumes that the disk to be aligned already contains a single primary partition. If you want to create a partitioning, follow the steps in "Partitioning the Shared Disk".
CAUTION: In a system running the Linux operating system, align the partition table before the data is written to the Volume. Failure to follow the precaution could lead to all the data on the Volume to be destroyed.
At the command prompt, type:
- #> fdisk -u /dev/<block_device>
where <block_device> is the name of the block device that you are adjusting. For example, if the block device is /dev/mapper/db, type:
fdisk /dev/mapper/db
The system displays the following message:
The number of cylinders for this disk is set to 8782. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:
1)software that runs at boot time (e.g., old
versions of LILO)
2)booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
a. Command (m for help): x # To enter the expert Mode
b. Expert command (m for help): b # To move beginning of data in a partition
c. Partition number (1-4): 1 # The partition number to be aligned
d. New beginning of data (128-xxxxx, default 128): 128
1 block = 512 bytes;
128 blocks * 512 bytes = 64KB
e. Expert command (m for help): w # write
NOTE: 128 blocks/64KB is the default Stripe Element Size of EqualLogic PS Series and 256 blocks/256 KB is the default Stripe Element Size of the PowerVault MD 32xx/32xxi Line of storage arrays. - Repeat step 1 for all the disks that need to be aligned
- Run the following command to re-scan all the partitions on the node when using device mapper:
#> kpartx -a /dev/mapper/<devicename>
NOTE: If your device name does not end in "p1", reboot your system. Proper name convention would append a "p1" and display as /dev/mapper/datap1. - Verify that the partition has been aligned by running the following command:
#> fdisk -ul /dev/<block_device>
Where, <block_device> is the name of the block device.
The following example of a sample output of the command executed on a block device that has been aligned. If your partition is properly aligned then 128 is displayed under the Start column against your partition.
Disk /dev/mapper/mpath70: 53.6 GB, 53697576960 bytes
255 heads, 63 sectors/track, 6528 cylinders, total
h70p1
104878080 sectors
Units = sectors of 1 * 512 = 512 bytes
DeviceBoot Start End Blocks Id System
/dev/mapper/mpat 128 104872319 52436096 83 Linux - Reboot the system if your newly created and aligned partition is not displayed.
[top]
Before you install the Oracle 11g R2 Grid Infrastructure software for a Standalone Server on your system:
- Ensure that you have already configured your operating system, network, and storage based on the steps from the previous sections within this document.
- Locate your Oracle 11g R2 media kit.
- Log in as root
- If you are not in a graphical environment, start the X Window System by typing: startx
- Open a terminal window and type: xhost +
- Mount the Oracle Grid Infrastructure media.
- Log in as grid user, for example: su - grid.
- Type the following command to start the Oracle Universal Installer:<CD_mountpoint>/runInstaller
- In the Download Software Updates window, enter your My Oracle Support credentials to download the latest patch updates. If you choose not to download the latest patches, select Skip software updates.
In the Select Installation Option window, select Install and Configure Grid Infrastructure for a Standalone Server and click Next.
In the Create ASM Disk Group window, enter the following information:
- ASM diskgroup— Enter a name, for example: DATA
- Redundancy— For your ASM disks, select High if five ASM disks are available, select Normal if three ASM disks are available, or select External if one ASM disk is available (not recommended).
NOTE:
- For OEL5 /RHEL5 / OEL6 If no candidate disks are displayed, click Change Discovery Path and enter ORCL:*or /dev/oracleasm/disks/*. Ensure that you have marked your Oracle ASM disks, for more informations see,"Using ASMLib to Mark the Shared Disks as Candidate Disks".
- For RHEL6 set grid:asmadmin permissions for all oracle disks using the udev rules and change Discovery Path to /dev/*.
Click on Use Same Passwords for these accounts & Click Next
Leave the Operating System Groups to be default, Ignore the Warning and Click Next
Choose the Oracle Base and Software Location, and Click Next.
The Prerequisite Checks are performed& the summary screen is presented. Click Next on the summary screen.
The Installation proceeds. And the Progress is seen in the setup screen.
After the installation is complete, the Execute Configuration Scripts wizard is displayed. Complete the instructions in the wizard and click Ok.
Now that the Grid Infrastructure is installed, let’s now install the Database.
Installing Oracle 11g R2 Database (RDBMS) Software
The following steps are for node 1 of your cluster environment, unless otherwise specified.
- Log in as root and type: xhost +.
- Mount the Oracle Database 11gR2 media.
- Log out as root user and log in as Oracle user by typing:
su - oracle - Run the installer script from your Oracle database media:
<CD_mount>/runInstaller - In the Configure Security Updates window, enter your My Oracle
Support credentials to receive security updates, else click Next. - In the Download Software Updates window, enter your My Oracle Support credentials to download patch updates available after the initial release. If you choose not to update at this time, select Skip software updates and click Next.
- In the Select Installation Option window, select Install database software only.
- In the Grid Installation Options window: Select Single Instance database installation and Click Next.
- In the Select Product Lanaguages window, select English as the Language Option and click Next.
- In the Select Database Edition window, select Enterprise Edition and click Next.
- In the Installation Location window,
- In the Privileged Operating System Groups window, select dba for Database Administrator (OSDBA) Group and oinstall for Database Operator (OSOPER) Group and click Next.
- In the Perform Prerequisite Checks window, check the overall status of all the prerequisites.
- If any prerequisites fail and have the status as Fixable, click the Fix & Check Again button.
- Execute the runfixup.sh script provided by the Oracle OUI.
NOTE: If there are other prerequisites that display status Error, repeat step 13, If the Error status still persists after all changes have been fixed, select Ignore All.
- In the Summary window, select Install.
- On completion of the installation process, the Execute Configuration scripts wizard is displayed. Follow the instructions in the wizard and click Ok.
- In the Finish window, click Close.
- Login as oracle user.
- From $<ORACLE_HOME>, run the DBCA utility by typing:
$<ORACLE_HOME>/bin/dbca & - In the Welcome window, select Oracle Single Instance Database and click Next.
In the operations window, select Create Database, and Click Next
Select Custom Database Option the Database Templates Screen
In the Database Identification window:
- Provide the Global Database Name
- Provide the SID
In the Management Options window, select the default values and click Next.
In the Database Credentials window, enter the appropriate credentials for your Database.
In the Database File Location window, select:
- Automatic Storage Management (ASM) for Storage Type.
- Use Oracle-Managed Files for Storage Location.
- Browse to select the ASM disk group that you created to store the database files (DBDG)for Database Area.
In the Select Disk Group sub window, Select the Disk Group
In the Recovery Configuration window,
a) Specify Fast Recovery Area
b) Enable Archiving
Choose these options according to your environment and click Next
In the Database Content Window, Click Next
In the Initialization Parameters window:
- Select Custom.
- For the Memory Management section, select Automatic Shared Memory Management.
- Specify appropriate values for the SGA Size and PGA Size.
- Click Next.
In the Database Storage window, click Next
In the Creation Options Window, click Next
In the Summary window, click Ok to create Database.
Click Exit on the Database Configuration Assistant window after the database creation is complete.