0% found this document useful (0 votes)
31 views

Oracle 9.i Deployment On Linux

Uploaded by

events
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Oracle 9.i Deployment On Linux

Uploaded by

events
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Deploying Oracle9i on TM

Red Hat Enterprise Linux AS 2.1


® ®

Jennifer E. Lamb, Chris Runge, and Nathan Thomas


August 2003

Abstract
This document examines how enterprise-class databases may be deployed
using Red Hat Enterprise Linux AS 2.1 and Oracle9i. Detailed information is
presented on the status of Red Hat Enterprise Linux AS as a platform for Oracle
database technology. In addition, price/performance information is provided for
those considering the migration of their database servers to Red Hat Enterprise
Linux AS, as well as a tutorial outlining the steps required to install Red Hat
Enterprise Linux AS 2.1 and Oracle9i. The document concludes with an
overview of Red Hat Enterprise Linux technical roadmap features related to
Oracle deployments.

Copyright © 2003 Red Hat, Inc. All rights reserved. "Red Hat," Red Hat Linux, the Red Hat "Shadow Man" logo and the products listed are trademarks or registered trademarks of Red
Hat, Inc. in the US and other countries. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners.
Table of Contents
Introduction...............................................................................................................3
Red Hat Enterprise Linux AS: Optimizing Oracle on Linux..............................3
The State of Oracle on Linux..................................................................................8
Oracle Database Server Performance and Scalability on Red Hat Enterprise
Linux AS.....................................................................................................................9
Deploying an Oracle Database on Red Hat Enterprise Linux AS - A Tutorial.
11
Resources................................................................................................................25

Introduction
Red Hat Enterprise Linux has been making considerable inroads into mission-
critical computing and has become a core component of many enterprise IT
infrastructures. Firms such as AOL, VeriSign, and Amazon.com have found that
Red Hat Enterprise Linux systems prove themselves, both in the data center,
with stellar performance, reliability, and security, and on the balance sheet, with
impressive Total Cost of Ownership advantages.

The most sophisticated product in the Red Hat Enterprise Linux product line,
Red Hat Enterprise Linux AS, has been growing in the Oracle database space
and has demonstrated much success. The platform combines the power of
Oracle database technology with the advantages of a Unix-like environment
running on x86-compatible hardware.

By working closely with Oracle to perfect the technology underlying Red Hat
Enterprise Linux AS, Red Hat has elevated Linux to an enterprise-ready
workhorse. Red Hat's ongoing relationship with Oracle also means that Red Hat
Enterprise Linux customers will have both Oracle and Red Hat available for
assistance should the need arise.

Red Hat Enterprise Linux AS: Optimizing


Oracle on Linux
Prior to the release of Red Hat Enterprise Linux AS 2.1, the Linux marketplace
was a very difficult one for Independent Software Vendors (ISVs) in general and
database vendors in particular.

The open source development model has historically been driven at an


extremely rapid pace. For example, in just 18 months Red Hat released Red Hat
Linux 7.2, 7.3, and 8.0. This model was vastly different from the much longer

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


release cycles prevalent in the proprietary operating system space and was not
in line with the development models many enterprise application vendors were
accustomed to.

Red Hat developed Red Hat Enterprise Linux as the single target platform for all
major ISVs and their enterprise-level server applications to alleviate the burden
the previous development cycle was putting on software development
companies. With Red Hat Enterprise Linux, Red Hat provides a platform both
ISVs and system administrators can support. Red Hat Enterprise Linux AS 2.1
(originally called Advanced Server) first became available in May 2002. Red Hat
also released Red Hat Enterprise ES 2.1 and Red Hat Enterprise Linux WS 2.1
in May 2003 for mid-range application servers and technical workstations. Red
Hat Enterprise Linux is released every 12-18 months, giving ISVs more time to
certify and deliver their products. The next version of the Red Hat Enterprise
Linux product line will become available in October 2003 (please see the Red
Hat Enterprise Linux 3 Technical Roadmap at the end of this document). All
versions of Red Hat Enterprise Linux will be maintained by Red Hat for five
years after the initial creation date.

Red Hat Enterprise Linux is also a more focused environment than retail Red
Hat Linux products. The retail products are now transitioning to what will be the
community-driven Red Hat Linux Project. Red Hat Linux retail releases were
appropriate for smaller businesses, open source developers, and hobbyists. The
Red Hat Linux Project is an endeavor through which Red Hat works with the
open source development community to build, test, and integrate software into
Red Hat Enterprise Linux releases. Both Red Hat Linux retail products and the
Red Hat Linux Project contain technologies and applications that are either not
business related, or are still in the process of development. In contrast, the
packages that comprise Red Hat Enterprise Linux have been included for their
stability and applicability to a production enterprise environment.

A longer release cycle does not mean system administrators must sacrifice the
timely release of security and bug fix updates they have come to expect from
Red Hat. Bug fixes and security updates will be released on an as-needed basis
to ensure customers have the most reliable, stable, and secure systems
possible. These updates will be made available through Red Hat Network, which
enables easy deployment of updated software to a large number of systems.
Red Hat Network is designed to reduce administrative overhead for corporate
system administrators by simplifying and centralizing package management and
system maintenance at an affordable cost.

While a longer release cycle made life easier for numerous ISVs, something
more was needed to bring world-class Oracle database performance to Red Hat
Enterprise Linux AS. Working closely together, Oracle and Red Hat have
addressed the four main concerns associated with the deployment of any
enterprise database solution:

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Reliability
Availability
Scalability
Manageability

Reliability
Red Hat Enterprise Linux AS 2.1 is built upon the demonstrated capabilities of
Red Hat Enterprise Linux 7.2 and is proven reliable. Red Hat, Oracle, and OEMs
such as Dell and HP have formed the Unbreakable Linux initiative to deliver
complete Oracle9i solutions on Red Hat Enterprise Linux AS and x86-
compatible hardware. These solutions are backed by worldwide, 24x7 support
offerings to ensure the highest levels of system uptime in mission-critical
environments.

Availability
To keep enterprise services highly available, Red Hat Enterprise Linux AS 2.1
includes Red Hat Cluster Manager. Red Hat's failover solution provides the
ability to cluster two systems in a configuration for maximum uptime and service
availability. Red Hat Cluster Manager is a data-centric solution that employs two
systems connected to a shared Storage Area Network (SAN) via SCSI or Fibre
Channel. The shared RAID array serves as the redundant storage for the Oracle
database files. It also provides cluster-level synchronization via a quorum-style
mechanism. As part of the cluster configuration process, policies are instituted to
determine when a system is considered unavailable. Additionally, actions are
specified that will be performed to move the unavailable system's services to the
other cluster member. When combined with the use of optional power switches,
the surviving system can be configured to remove power from the failed system.
This method ensures the highest levels of data integrity.

Red Hat Enterprise Linux AS 2.1 also includes a Java-enabled GUI and
traditional console-based tools for managing and monitoring the status of Oracle
databases (and any other data-centric application) being managed by Red Hat
Cluster Manager.

To further emphasize availability, Oracle has also introduced Real Application


Clusters (RAC), which is a new methodology for scaling Oracle databases.
Previously, as the size of an Oracle database grew it became necessary to
either partition the data into separate databases on separate servers, or
purchase larger and larger multiprocessor systems. Oracle9i RAC makes
horizontal scalability possible by leveraging a cluster of computers to act as if
they were a single large-scale, high-performance system. With Real Application
Clusters, systems can be added to the cluster as needed, rather than being
entirely replaced. Red Hat recommends running Oracle 9i RAC on Red Hat
Enterprise Linux AS platform as it is an extremely flexible and effective way to
ensure data integrity for Oracle databases.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Scalability
The scalability of Red Hat Enterprise Linux AS as a platform for enterprise
computing has also been greatly enhanced to deliver higher performance on
larger SMP systems with multiple SCSI or Fibre Channel host bus adapters, and
greater amounts of physical RAM. Significant work was done by both Red Hat
and Oracle to ensure that all possible performance limitations were removed.
The changes involved to Red Hat Enterprise Linux AS 2.1 include:

A new scheduler known as O(1) - This scheduler provides process-to-


CPU affinity, which improves cache hit-rates, thereby increasing the
performance of 2-, 4-, and 8-way SMP systems.


Tuning of the kernel's virtual memory (VM) subsystem - This allows larger
Oracle database SGA sizes on systems with greater than 4GB of RAM.


SCSI adapter spin locks - These spin locks enable multi-threaded I/O
operations on SMP systems.


Asynchronous I/O - This makes higher I/O throughput possible, and aids
in the prevention of application stalls, a key feature for database
performance.


Bounce-buffer elimination - Traditionally, systems containing more than


1GB of RAM had to use a two-step process involving an intermediate
buffer to move data to and from I/O devices. By eliminating these bounce-
buffers, greater I/O performance is possible on systems with large
amounts of RAM.

Manageability
Manageability is a key concern for anyone deploying a mission-critical,
enterprise solution. All Red Hat Enterprise Linux products include numerous
manageability components to ensure systems can be deployed and maintained
as efficiently as possible. Red Hat has developed RPM, a package management
tool that allows system administrators to easily install, upgrade, remove, and
verify the integrity of system software. All Red Hat software ships in the form of
RPM packages, which contain dependency-related information. This information
helps ensure that as software is installed, updated, and removed, other software
packages are not adversely affected in any way. RPM is used by Kickstart--a
facility (similar to Jumpstart for Sun's Solaris™) that allows system architects to
script a configuration that can be used to perform completely unattended Red
Hat Enterprise Linux installations. Because the same Kickstart script can be
used to automate the installation of multiple systems, system administration
costs can be dramatically reduced due to the limited manual intervention
required. In addition, the standardized system configurations that result can
reduce system support costs, as the operating environment will be identical from
system to system.

Red Hat Network (RHN) can be used in conjunction with Kickstart or


independently to update network systems. RHN is a service that enables system

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


administrators to centrally manage software maintenance for multiple tasks
using a secure Web browser. RHEN makes managing multiple systems as easy
as managing a single system through grouping. Systems can be grouped
according to policies set by the RHEN organization administrator, enabling
software to be managed at the group level by other authorized administrators
instead of on a system-by-system basis. The software to be managed includes
bug fixes and security updates released by Red Hat for Red Hat products.
These updates can be downloaded for quality assurance purposes, scheduled
network-wide during selected downtimes or applied via the central web interface
for each independently registered system.

RHEN Proxy or Satellite provides even more efficient, secure and flexible ways
to manage systems in larger corporate environments. For example, third-party
and in-house developed RPM packages can be distributed to clients via custom
channels where RHEN Satellite or Proxy server is used. RHEN also contains
detailed information about each registered system's hardware configuration
including CPU type and clock speed, disk type, memory, network, and peripheral
information, as well as BIOS and asset tag information (if provided by the
hardware vendor). Free-form notes may also be added to each system, allowing
organization-specific information tracking. The RHEN Monitoring Module can
also be used to check the availability of network devices, configured services for
several OSs, CPU usage, memory usage, network bottlenecks, and more.

Other manageability tools that have been integrated into the Red Hat Enterprise
Linux product line include:

The netconsole facility - This facility makes it possible to send console


output (kernel-level messages, including crash signature messages) to a
central syslog server.


The netdump facility - This facility provides a method of centrally


managing system failures by capturing system crash dumps on a crash
dump server.


Red Hat Cluster Manager management and monitoring tools - A variety of


utility programs to make it easy to keep track of a Red Hat Cluster
Manager-based cluster.

The information provided by these facilities can be used to monitor the status of
production systems as well as to reduce resolution times for any system
problems that might occur.

For additional information about Red Hat Network for the retail releases:
http://rhn.redhat.com/

For more information about netconsole and netdump:


http://www.redhat.com/support/wpapers/redhat/netdump/index.html

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


For additional information about Red Hat Enterprise Linux products:
http://www.redhat.com/software/linux/advanced/

The state of Oracle on Linux


As of August 2003, Oracle has released two versions of its database for Red Hat
Enterprise Linux. In addition, Oracle has released a select set of additional
application components, as illustrated below:

Product Release
Oracle9i and Oracle9i RAC Database Oracle9i Database Release 2 Enterprise Edition (9.2.0.1.0)
Oracle8i Database Oracle8i Enterprise Edition Release 3 (8.1.7.0.1)
Oracle9i AS Application Server Oracle9i AS Release 2 v9.0.2
Oracle11i eBusiness Suite Oracle11i (eBusiness Suite 11.5.7)
Oracle Collaboration Suite with Oracle
Server Enterprise Edition 9i

Table 1. Oracle Products Supporting Red Hat Enterprise Linux

Given that these products represent the versions most commonly used by
enterprises deploying Oracle, Red Hat Enterprise Linux is ready when you are.

Oracle Database Server performance and


scalability on Red Hat Enterprise Linux
AS 2.1

Red Hat Enterprise Linux AS 2.1 with Oracle is demonstrating world-record


performance on several architectures. TPC-C is an online transaction
processing benchmark and is a citable measurement for comparing
performance on various hardware and software configurations.

As the benchmark results listed below indicate, an Oracle9i RAC solution


running on Red Hat Enterprise Linux AS 2.1 demonstrates greater
price/performance over a comparable x86 configuration running Oracle9i RAC
on Windows 2000 Advanced Server. In other words, Red Hat Enterprise Linux
AS 2.1 delivered a greater transaction rate (tpmC) at a lower cost than Windows
2000 Advanced Server.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Company System tpmC Price/ Availability Database Operating
tpmC System
HP ProLiant 138,362 $17.21 March 5, Oracle 9i Enterprise Red Hat
CL580 – 2003 Edition (with RAC and Enterprise
0200032P partitioning options) Linux AS 2.1
c/s
HP ProLiant 137,260 $18.46 June 2, Oracle 9i Enterprise Microsoft
CL580 – 2002 Edition (with RAC and Windows
0200032P partitioning options) 2000
c/s Advanced
Server

Table 2. TPC-C Results

For complete results:


http://www.tpc.org/tpcc/results/tpcc_result_detail.asp?id=102091601

TPC-C benchmarking results for a combination Pentium III with Itanium


configuration further reduce the price/tpmC for customers deploying Red Hat
Enterprise Linux AS 2.1 with Oracle on mixed architectures.

Company System tpmC Price/ Availability Database Operating


tpmC System
HP ProLiant 80,494 $5.30 May 11, Oracle 10i Enterprise Red Hat
DL360G2 2003 Edition (with RAC and Enterprise
and partitioning options) Linux AS 2.1
HP Server
rx5670 c/s

Table 3. TPC-C Mixed Intel Itanium 2 and PIII Results

For complete results:


http://www.tpc.org/results/individual_results/HP/rx5670C-es.pdf

Red Hat Enterprise Linux AS 2.1 is able to achieve these results due in part to a
number of technical advantages introduced in Red Hat Enterprise Linux. Until
the introduction of Red Hat Enterprise Linux AS 2.1, Linux lacked the ability to
perform asynchronous I/O--considered to be a critical feature for enterprise
database servers. Without asynchronous I/O, database performance can be
impacted significantly, as processes submitting I/O requests must wait for those
I/O requests to be completed before continuing. With asynchronous I/O that is
no longer the case. Processes can now submit I/O requests and continue other
processing tasks without waiting for the I/O requests to complete. The net result
is greater database performance and scalability.

The virtual memory (VM) subsystem in the Red Hat Enterprise Linux AS 2.1
kernel has also been optimized to ensure the levels of scalability and reliability
required for enterprise database deployments. The generic 2.4.x Linux kernel
only supports a maximum Oracle Shared Global Area (SGA) size of 1.7GB--
regardless of the amount of physical RAM installed on a system. This limits the

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


scalability of an Oracle database server using the Linux OS. The Red Hat
Enterprise Linux AS 2.1 kernel includes a VM subsystem that supports an SGA
significantly beyond this size, up to a theoretical maximum of 62GB (when using
Red Hat Enterprise Linux AS 2.1 enterprise kernel). In addition to the changes
that were made to support these larger SGA sizes, the kernel has been tuned to
ensure that the system degrades gracefully and does not become unresponsive
or crash as the number of concurrent users accessing the database increases.

For more details, see the Oracle white papers Linux Virtual Memory in Red Hat
Enterprise Linux AS 2.1 and Oracle's Memory Usage Characteristics and
Oracle9i Database Release 2 on Linux: Performance, Reliability and
Manageability Enhancements on Red Hat Enterprise Linux AS 2.1, both listed in
the final section of this paper.

Deploying an Oracle Database on Red Hat


Enterprise Linux AS 2.1 - A Tutorial
The Database
For the purposes of this document, we have chosen Oracle9i Database Release
2 (9.2.0.1.0). This latest release of the Oracle Database Server software on
Linux was developed to support the greater SGA sizes and higher database
throughput provided by the new VM and asynchronous I/O features available in
Red Hat Enterprise Linux AS 2.1. In the interest of simplifying the installation
process outlined in this tutorial, we will install a single instance database without
the RAC or Red Hat Cluster Manager clustering capabilities. In addition,
standard sample Oracle tables are used for all data sources rather than custom
tables and records.

The Database Version


Oracle9i Database Release 2 (9.2.0.1.0)
Oracle9i is available for free download under a special developer license from:
http://otn.oracle.com

The Operating System


Red Hat Enterprise Linux AS is the operating system we will be using for this
tutorial.

The Operating System Version


Red Hat Enterprise Linux AS 2.1

The Hardware
One of the advantages of the three-tier architecture is the ease of scaling
horizontally by adding additional servers to the middle tier as demand increases.
Systems deployed in this tier should demonstrate acceptable performance with

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


standard components. A typical Sun system for this purpose would be the
SunFire 280R. If we were migrating from this platform to a Red Hat Enterprise
Linux AS-centric solution, we would choose an x86-compatible system that
would provide similar performance at significantly lower cost.

Sun Configuration x86 Configuration


System Name SunFire 280R DL360
Manufacturer Sun Compaq
List Price $17,995 $5,943
CPU type 900Mhz UltraSparc III 1000Mhz Pentium III
CPU count 2 2
RAM 2GB 2GB
Local Disk 2 @ 36GB 2 @ 36GB
System Size 4U 1U

Table 3. Hardware Configurations

The Installation Plan


Installation and configuration will occur in this order:

1. Install Red Hat Enterprise Linux AS 2.1


2. Configure and update the operating system
3. Install the Oracle9i Database Server
4. Configure and test the Oracle9i Database Server

Install Red Hat Enterprise Linux AS


If this is your first Red Hat Enterprise Linux installation, refer to the following
page for more detailed installation instructions:
http://www.redhat.com/docs/manuals/advserver/RHLAS-2.1-Manual/install-guide

Most system administrators will find the graphical installation program for Red
Hat Enterprise Linux AS to be straight-forward and intuitive. During this tutorial,
we primarily will be using the default installation values; we will note any
instances where this is not the case.

Start by placing CD #1 in the system's CD-ROM drive, and rebooting. Select the
default graphical installation program by pressing [Enter] at the boot: prompt.

The graphical installation program will guide you through the installation; follow
along below, clicking the NEXT button after the fields on each screen have been
properly filled in. Wherever it says "Accept the defaults" below, it is in most
circumstances safe to accept the defaults, as the installer will try to select the
best values for you. However, in your specific environment the default values
may not be appropriate. In these cases, change your selection as required.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Language Selection - Accept the defaults.

Keyboard Configuration - Accept the defaults.

Mouse Configuration - Accept the defaults.

Installation Type - Select Advanced Server.


Note: Experienced users can select the Custom installation type to apply
specific package sets.

Disk Partitioning Setup - Select Manually partition with Disk Druid. Create
the following partitions:

Partition Type Size


/boot ext3 64MB
swap swap 2x physical RAM, minimum of 1024MB
/ ext3 1024MB
/tmp ext3 1024MB
/usr ext3 3072MB
/var ext3 512MB
/home ext3 3072MB (this should be large enough to hold the
three Oracle9i installation CDs)
/opt ext3 6144MB (fill to maximum allowable size)

Table 4. Recommended Partitions

Boot Loader Configuration - Accept the defaults.

Boot Loader Password Configuration - Accept the defaults.

Network Configuration - Accept the defaults.

Firewall Configuration - Select No firewall.

Additional Language Support - Accept the defaults.

Time Zone Selection - Choose the time zone that is appropriate for the location
of the system. If your system's clock is set to UTC time, select System clock
uses UTC.

Account Configuration - Enter a root password. Do not add any other users at
this point in time as we will create the users and groups required for the
installation of Oracle9i later.

Authentication Configuration - Accept the defaults.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Package Group Selection -The GNOME group should already be checked.
Also add the Software Development group, as this is necessary for the
successful installation of Oracle9i.

Graphical Interface (X) Configuration - Accept the defaults.

Installing Packages - At this point, the installation program will start installing
the packages that have been selected. A screen will display the status of each
package as it is installed, along with a tally of total packages, installed packages,
and packages to be installed.

Boot Disk Creation - It is wise to create a boot disk. To do this, you will need to
insert a blank, formatted 1.44MB floppy

Monitor Configuration - Accept the defaults.

Customize Graphics Configuration - Change the login type to Text.

The installation of Red Hat Enterprise Linux AS 2.1 is now complete. You
should boot the latest enterprise kernel (kernel-enterprise-2.4.9-e.x), which is
used on SMP systems with more than 4GB of RAM.

Configure and update the operating system


Because an Oracle9i database server is a networked service, it is critical that the
network configuration for the operating system is correct. In addition, we will use
RHEN to update the system with the latest errata released by Red Hat. These
errata releases contain important bug fixes and security updates that should be
applied to all production systems. The actions we will perform here must all be
performed while logged into the operating system as the root user.

Begin by changing, if necessary, the hostname in /etc/sysconfig/network. For


the purposes of this document the hostname we will be using is
oracle1.example.com.

NETWORKING=yes
HOSTNAME=oracle1.example.com

If you decide to change the hostname, edit /etc/hosts and add the system's
hostname to the 127.0.0.1 line before the localhost.localdomain and localhost
entries:

127.0.0.1 oracle1.example.com oracle1 localhost.localdomain localhost

Finally, if you did change the hostname, be sure to inform the system of the
change by using the following command (from the root shell):

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


hostname oracle1.example.com

Oracle recommends that you add these entries to /etc/resolv.conf to add more
time for name resolution to succeed (otherwise on busy systems, Oracle
SQL*Net connections may fail):

options attempts:5
options timeout:15

When you've finished the network configuration, you are ready to register the
system with Red Hat Network and run up2date to update the system. Begin by
running (as root) rhn_register to register your system:

rhn_register

Note: Activation keys can also be used so that all of this can be done non-
interactively (see http://rhn.redhat.com for more details).

After the system is registered, it should automatically be entitled to receive RHN


updates. Verify that the system has been entitled at the RHN Web interface
http://rhn.redhat.com (or at the address of the RHN Satellite Server, if you are
using this option).

The kernel errata updates are disabled by default to give system administrators
complete control over the kernel update process for production systems. You
will need to configure the RHN entitled database server to receive kernel
updates. To do this, edit /etc/sysconfig/rhn/up2date and find the line that
reads:

pkgSkipList=kernel*;

and change it to:

pkgSkipList=;

Next, find the line that reads:

removeSkipList=kernel*;

and change it to:

removeSkipList=;

At this point, you can now use RHN to update your system with the latest errata
available from Red Hat. To do this, you can either use the RHN Web interface or
issue the following command on the system to be updated:

up2date -u

After the system has been successfully updated, take a look at


/boot/grub/grub.conf and verify the default kernel is the latest kernel update.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Reboot to use the new kernel.

For more information on using Red Hat Network: http://rhn.redhat.com.

Install the Oracle9i Database Server


For the purposes of this document, we will be doing an installation of the
Oracle9i database server under /opt/oracle, and using the General Purpose
starter database provided with the Oracle9i installation media. The Oracle
database System ID (SID) we will use is orcl. Some database administrators
may choose to install Oracle9i using a different configuration. That said, nearly
all of the steps below will still apply--merely use different values as appropriate
for your installation.

The installation of Oracle9i under Unix or Linux can be a complicated process. It


involves multiple configuration steps, with some commands issued as root, and
some issued as the oracle user. It is critical that the kernel and system
parameters are configured properly; otherwise, the creation of the database may
fail. Accordingly, we will begin as the root user to configure the system, then we
will move on to the installation of Oracle9i itself.

As root, amend they file /etc/sysctl.cf to include the following:

# Disables packet forwarding


net.ipv4.ip_forward = 0
# Enables source route verification
net.ipv4.conf.default.rp_filter = 1
# Disables the magic-sysrq key
kernel.sysrq = 0
# Parameters for Oracle9i Release 2 (9.2.0)
kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483647
kernel.shmmni = 4096
kernel.shmall = 2097152
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Note: The SHMMAX parameter in /etc/sysctl.cf should be able to accommodate


the entire SGA. Note that Oracle9i on Red Hat Enterprise Linux AS supports the
creation of an SGA above these sizes for systems with more than 4GB of RAM;
for more information, please see the Oracle whitepaper Tips and Techniques:
Install and Configure Oracle9i on Red Hat Enterprise Linux Advanced Server,
Aug 2002 in the final section of this paper.

After editing the /etc/sysctl.cf file, as root run the command

sysctl -p

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


to make the changes take effect. Alternatively, you can reboot your system.

Now we are ready to add the appropriate groups and users required for the
Oracle9i installation. Issue the following commands (while logged in as root):

groupadd dba
groupadd oper
groupadd oinstall
useradd -g oinstall -G dba,oper oracle
passwd oracle

This will create a new user account (named oracle) whose primary group is
oinstall and whose secondary groups are dba and oper.

You will need to increase the number of files the oracle user can open. Make sure
PAM can read the /etc/security/limits.conf file by ensuring that the following lines
are in /etc/pam.d/system-auth:

session required /lib/security/pam_limits.so


session required /lib/security/pam_unix.so

Add the following lines to /etc/security/limits.conf:

oracle soft nofile 4096


oracle hard nofile 8192

The above changes will go into effect the next time the oracle user logs into the
system.

Now that the oracle user has been created and the file handles have been
increased, create and change the ownership of the Oracle9i installation directory
to that user. This is necessary because we will be using /opt/oracle as our
$ORACLE_BASE directory. Issue the following commands while logged in as
root:

mkdir /opt/oracle
chown -R oracle /opt/oracle

Just as it is important to configure the system to support Oracle9i, it is also


important to configure the environment for each user that will access the Oracle
database. This can be done by editing each user's ~/.bash_profile configuration
file (assuming our users are using the bash shell), or, as we do here, by creating
a system-wide bash configuration script that will be executed whenever each
user logs into the system. To do this, create a file named
/etc/profile.d/oracle.sh with the following contents:

# Configures the user's environment for Oracle9i R2

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.0
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


export ORACLE_BASE ORACLE_HOME ORA_NLS33 ORACLE_SID LD_LIBRARY_PATH PATH

After creating this script, make the file executable by issuing the following
command (as root):

chmod 755 /etc/profile.d/oracle.sh

Next, log out of the root account, and log in as the oracle user to perform the
following actions (note that Oracle9i must be installed as the oracle user that
was just created - not as the root user).

Download or copy the Oracle9i installation files to the oracle user's home
directory. For the purposes of this document we've placed the files under
1
/home/oracle/MEDIA . You should have the following files:

lnx_920_disk1.cpio
lnx_920_disk2.cpio
lnx_920_disk3.cpio

Run the following commands (as oracle) to extract the files:

cd ~/MEDIA
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio

Start the X Window System.

startx

Once X has started, open two terminal windows. In one of the windows, issue
the following command to obtain a shell with root privileges:

su -

We will use this root shell to execute some commands that must be done by
root during the course of the installation.

As the oracle user, run the run Installer script. It is located in the Disk1
directory that was created when you extracted the Oracle9i files from the .cpio
files. This will start the Oracle Universal Installer.

cd MEDIA/Disk1
./runInstaller

Oracle Universal Installer - The Oracle Universal Installer will begin. Click Next
to continue.

Inventory Location - Accept the default Inventory Location and click OK

Unix Group Name - Enter oinstall for the Unix Group Name and click Next.

1 A special developer's license of Oracle9i can be downloaded from http://otn.oracle.com.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


At this point you'll be prompted to run a script named /tmp/orainstRoot.sh as
root. In the root shell that you opened earlier, run this script:

/tmp/orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /opt/oracle/oraInventory to oinstall.

After executing the script, click Continue.

File Locations - Accept the defaults for File Locations and click Next

Available Products - Select the default for Available Products (Oracle9i


Database 9.2.0.1.0) and click Next

Installation Types - Select the default Installation Type (Enterprise Edition) and
click Next

Database Configuration - Select the default Database Configuration (General


Purpose) and click Next.

Database Identification - The default SID (orcl) should already be selected.


For the Global Database Name, enter something like SID.domain (for example,
orcl.example.com), then click Next.

Database File Location - Accept the default Database File Location


(/opt/oracle/oradata) and click Next.

Database Character Set - Accept the default Database Character Set and click
Next.

Summary - The Summary screen will appear. Click Install to begin the
installation of the database software.

Install - During the installation, you will be prompted to run the root.sh script as
the root user. In the root shell that you opened earlier, run the script:

/opt/oracle/product/9.2.0.1.0/root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/9.2.0.1.0

Enter the full pathname of the local bin directory: [/usr/local/bin]:


[Enter]
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

\nCreating /etc/oratab file...


Adding entry to /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.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


After the script has finished executing, click OK to continue.

Configuration Tools - Once the database server installation is complete, the


Configuration Tools screen appears. This will run through the through the
following steps:

Oracle Net Configuration Assistant




Oracle Database Configuration Assistant (DBCA)




Agent Configuration Assistant




Starting HTTP Server

The Database Configuration Assistant (DBCA) takes a while to start, so don't be


concerned by the blank window that initially appears. If you get the error:

ORA-03113: end-of-file on communication channel

during the execution of the DBCA, there is a good possibility you didn't set the
kernel parameters properly. In this case, you should exit the installation, set the
kernel parameters as detailed earlier in this document, and restart the
installation.

When the DBCA is complete, you will be prompted to specify the passwords for
the Oracle database's SYS and SYSTEM users. Do this, then click OK.

End of Installation- You have successfully installed Oracle9i. Click Exit to exit
the Oracle Universal Installer.

The Oracle Enterprise Manager Console, Standalone should now appear.


Exit this tool for now.

Configure and test the Oracle9i Database Server


Assuming the installation went well, the database server and the TNS Listener
should both be up and running. To verify this, as the oracle user issue the
command:

tnsping orcl

You should see an OK at the end of the output. This indicates that the TNS
listener (the service that listens for incoming SQL*Net connections across the
network) is working properly.

Next log in to SQL-Plus2 and issue a sample SQL query:

sqlplus scott/tiger

SQL> select * from emp;


SQL> exit

2 The scott/tiger parameter to the sqlplus command represents the default schema (scott) and password (tiger) for the General Purpose starter database. If
you did not install the starter database, the schema and password required will be different.

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Once you've determined that the database server is up and running, you should
create an init script to start and stop the database services when the system
boots and is shut down. To do this, log in as root and create a script named
/etc/init.d/dbora. While many DBAs choose to customize their init scripts, the
example below will suffice for the purposes of this tutorial:

#!/bin/bash
#
# Startup script for Oracle9i R2
#
# chkconfig: 345 99 10
# description: Oracle9i R2 RDBMS

ORA_HOME=/opt/oracle/product/9.2.0.1.0
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi

case "$1" in
'start')

su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" > /dev/null


2>&1
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" > /dev/null 2>&1
;;

'stop')

su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" > /dev/null 2>&1


su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" > /dev/null 2>&1
;;

*)
echo "Usage: dbora {start|stop}"
exit 1

esac

Next, make the script executable:

chmod 755 /etc/init.d/dbora

Use chkconfig to turn the service on such that it will start in runlevels 3, 4, and 5.

/sbin/chkconfig dbora on

The dbstart and dbshut commands that are called from the init script read the
/etc/oratab file to determine which databases are to started or stopped. By
default, this file is written such that the dbstart and dbshut commands do not
affect the database you created during the installation of Oracle9i. To change
this, edit /etc/oratab and change the entry for your SID (in this case orcl) to
have Y at the end of the line. For example, your file should look like this :

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator. A new line terminates


# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
*:/opt/oracle/product/9.2.0.1.0:N
orcl:/opt/app/oracle/product/9.2.0.1.0:Y

You should now be able to shut down the database server using dbshut. Go
ahead and issue this command as the oracle user:

Dbshut

Next, create the initialization file for the orcl database. As the oracle user we
will create an initSID.ora file (in this case our SID is orcl, so the file should be
called initorcl.ora). If you do not create this file, you will get the following error
when you try to start the database:

Can't find init file for Database "orcl".


Database "orcl" NOT started.

The easiest way to create this file is to issue the following commands as the
oracle user.

cd $ORACLE_HOME/dbs
cp init.ora initorcl.ora

This will give you a basic initialization file template. In a production environment,
it is quite likely that you or your DBA will want to modify this file, as it contains a
number of configuration parameters for your database. For now, however, we
will be fine using the default values contained in this file.

Your system is now configured to automatically start and stop the database
when the system starts and stops. The init script will start and stop both the
listener and the database server itself.

To shut down the database and listener issue the following command:

/etc/init.d/dbora stop

To start the database and the listener issue the following command:

/etc/init.d/dbora start

The last configuration step is to enable asynchronous I/O, a feature that can

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


improve the performance of your Oracle database. Oracle did not enable
asynchronous I/O by default to accommodate other Linux distributions without
this feature. To enable asynchronous I/O, log in as the oracle user and begin by
shutting down the database server.

Dbshut

Once the database has shut down, relink Oracle9i to use asynchronous I/O. This
is done by issuing these commands:

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk async_on
make -f ins_rdbms.mk ioracle

Next, edit your initSID.ora file ($ORACLE_HOME/dbs/initorcl.ora in this example)


and add the following to the end of the file:

# asynch i/o configuration


disk_asynch_io = true
tape_asynch_io = true
filesystemio_options=asynch

Finally, restart the database.

Dbstart

To ensure the database is now configured to start and stop properly, repeat the
tnsping and sqlplus commands described in Section 5.4.4. At this point, the
database is ready for any testing and configuration that you may require.

Red Hat Enterprise Linux 3 Technical


Roadmap

This overview includes a technology preview of Red Hat Enterprise Linux 3, the
next generation of Red Hat's comprehensive suite of Linux operating systems
schedule for release in Fall 2003. Red Hat Enterprise Linux 3 has been
developed in conjunction with Oracle to include numerous enhancements that
will dramatically improve performance for Oracle deployments.

Red Hat Enterprise Linux 3 will be available for these architectures:




x86 (i686/Athlon 32-bit)




IA64 (Intel Itanium2 64-bit)


x86_64 (AMD64 64-bit)
ppc (IBM iSeries and pSeries 64-bit)
s390 (IBM S/390 31-bit)

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


s390x (IBM zSeries 64-bit)
Red Hat Enterprise Linux 3 will ship with a kernel based on 2.4.21, which
contains a wide range of new features, including the following:
Native Posix Threading Library (NPTL)


Thread Local Storage & Futex APIs




Per-device locks for block I/O




Memory management enhancements: RMAP VM & large pages support




O(1) scheduler


Hyperthreading scheduler


Integrated Summit chipset support




NFS performance & stability enhancements




Large Translation Buffer pages - hugetlbfs




Ext3 updates for performance and stability




Semtimedop--semaphores with time limitation




Fine-grain process accounting (x86 only)




ACPI 2.0 (Itanium2 & AMD64 only)




Many driver updates and additions




Support for up to 64GB on x86




4GB of virtual address space for kernel and almost 4GB for each user
process on x86

Significant enhancements to the Red Hat Enterprise Linux 3 I/O


subsystem will include:


64-bit SCSI/Fibre Channel DMA support




Up to 256 SCSI devices




VaryIO support (permits larger I/O transfers)


Serial ATA support - SATA1 (for Intel PIIX/ICH ATA ICH5)
!

Hotplug PCI framework (x86 and IA64 only)


"

Asynchronous I/O on sockets


#

Expanded Asynchronous I/O for disks support

Improved serviceability enhancements will be:


$

Logical Volume Manager (LVM1) support


%

Kernel crash dump and analysis enhancements


&

Configurable application core dump paths


'

Code profiling support included in the kernel (OProfile)

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


(

Support for diskless systems

Networking Enhancements will include:


)

Improvements to channel bonding


*

Failover & bandwidth aggregation for servers w/ multiple NICs


+

More complete kernel IPv6 support


,

Kernel IGMP updated from V2 to V3


-

Samba 3.0 (Beta)


.

Apache 2.0 web server


/

TUX web accelerator update

Security enhancements will include:


0

Filesystem ACLs
1

General purpose cryptographic API in the kernel


2

Position Independent Executables


3

Kernel support for ipsec on IPV4

Red Hat Cluster Manager enhancements will include:


4

Multinode high availability clustering with new GUI

The improved development environment in Red Hat Enterprise Linux 3 will


include:
5

gcc 3.2.3 tool chain


6

gcc "ssa" tool chain included as a technology preview


7

gcj / libgcj (Java gcc compiler front-end)


8

gdb 5.3.90 - including multi-threaded core dump and gcore


9

glibc 2.3.2
:

Eclipse 2.1 Developer Environment

Notable Red Hat Enterprise Linux 3 desktop enhancements:


;

XFree86 4.3.0
<

BluecurveTM graphical user interface (Unified GNOME/KDE look and feel)


=

OpenOffice.org 1.0.2 office productivity suite


>

Ximian Evolution 1.4.3


?

Mozilla 1.4

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Because Red Hat Enterprise Linux 3 is still in beta current features, packages,
and naming are subject to change before the final release. RPM and source
RPM packages for Red Hat Enterprise Linux 3 Beta 1 are available via Red Hat
Network at: https://rhn.redhat.com

Resources
@

Red Hat Enterprise Linux and Oracle FAQ:


http://www.redhat.com/oracle/faq.html

Proven Performer (Oracle9i RAC TPC-C results):


http://www.redhat.com/mktg/oracle9i

Oracle Delivers World Record TPC-C Benchmark on Linux; Outperforms


Microsoft SQL Server by 14% on Identical Processors:
http://www.oracle.com/corporate/press/index.html?1456818.html

Tips and Techniques: Install and Configure Oracle9i on Red Hat Enterprise
Linux Advanced Server, Aug 2002:
http://otn.oracle.com/tech/linux/pdf/installtips__nal.pdf

Oracle9i Database Release 2 on Linux: Performance, Reliability and


Manageability Enhancements on Red Hat Enterprise Linux Advanced Server
2.1: http://otn.oracle.com/tech/linux/pdf/9iR2-on-Linux-Tech-WP-Final.PDF

Linux Virtual Memory in Red Hat Enterprise Linux Advanced Server 2.1 and
Oracle's Memory Usage Characteristics:
http://otn.oracle.com/tech/linux/pdf/1_linuxVM_v2_accepted.pdf

Red Hat's Network Console and Crash Dump Facility:


http://www.redhat.com/support/wpapers/redhat/netdump/index.html

Oracle Products on Red Hat Enterprise Linux (A certification matrix):


http://www.redhat.com/oracle_cert/index.html

Database: Linux Powered and Enterprise Ready (Unbreakable Linux


overview): http://www.oracle.com/features/9i/index.html?t1db_unbrlinux.html

Oracle at redhat.com:
http://www.redhat.com/oracle

Tuning and Optimizing Red Hat Linux Advanced Server for Oracle9i

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1


Database: http://www.puschitz.com/TuningLinuxForOracle.shtml

Deploying Oracle 9i on Red Hat Enterprise Linux AS 2.1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy