Oracle 9.i Deployment On Linux
Oracle 9.i Deployment On Linux
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 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:
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.
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.
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.
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 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/
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
Given that these products represent the versions most commonly used by
enterprises deploying Oracle, Red Hat Enterprise Linux is ready when you are.
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
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.
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
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.
Disk Partitioning Setup - Select Manually partition with Disk Druid. Create
the following partitions:
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.
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
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.
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:
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):
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).
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*;
pkgSkipList=;
removeSkipList=kernel*;
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
sysctl -p
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:
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
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
After creating this script, make the file executable by issuing the following
command (as root):
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
cd ~/MEDIA
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
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.
Unix Group Name - Enter oinstall for the Unix Group Name and click Next.
/tmp/orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /opt/oracle/oraInventory to oinstall.
File Locations - Accept the defaults for File Locations and click Next
Installation Types - Select the default Installation Type (Enterprise Edition) 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
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.
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.
sqlplus scott/tiger
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.
#!/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')
'stop')
*)
echo "Usage: dbora {start|stop}"
exit 1
esac
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 :
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:
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
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
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.
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.
O(1) scheduler
Hyperthreading scheduler
4GB of virtual address space for kernel and almost 4GB for each user
process on x86
Filesystem ACLs
1
glibc 2.3.2
:
XFree86 4.3.0
<
Mozilla 1.4
Resources
@
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
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
Oracle at redhat.com:
http://www.redhat.com/oracle
Tuning and Optimizing Red Hat Linux Advanced Server for Oracle9i