How to Install and Configure Oracle on Linux
Oracle RDBMS is a full-featured relational database management system from Oracle Corporation. It includes a set of administration tools, and precompilers for most programming languages. This article will cover how to install and configure an Oracle database on Linux.
The installation file for Oracle 8.0.5 Enterprise Edition is named Oracle8051EE_Intel.tgz. It can be downloaded from ftp://technet.oracle.com/. If needed, the glibc patch file glibcpatch.tgz can be downloaded from ftp://ftp.oracle.com/pub/www/otn/linux/.
Oracle currently uses glibc 2.0 rather than glibc 2.1. Oracle has supplied a patch which, when combined with compatibility RPM packages, allows it to run on Red Hat 6.0. I chose to use the Linux-Mandrake 6.0 distribution for this installation. If you are not using 6.0, you can skip the steps for installing the compatibility RPMs and the glibc patch. It is possible to install Oracle on other distributions, but since Oracle uses Red Hat for its development, Red Hat (or some variation of Red Hat) is preferred.
The C Development package must be installed when you install Linux. If you want to install Oracle's Intelligent agent, you must have tcl-8.0.3-20.i386.rpm installed. To install the JDBC drivers, you must define a path to your classesxxx.zip file.
I recommend creating a minimum of three partitions for Oracle. This allows you to use Oracle's Optimum Flexible Architecture (OFA) standard. Using OFA gives you the capability to segregate data from indexes and have multiple control files. The partitions should be named u01, u02 and u03. You can create more partitions if you have the disks to support them. I have two disks on my machine, so I created a partition of 1GB for /u01 and 150MB for /u02. I then created a directory called /u03 to give me the equivalent of another mount point. The first partition (/u01) is where the Oracle executables and all associated files will be placed during the installation process. The remaining mount points will be used for data files, indexes and control files.
A multitude of directories are created during the installation process. Some of the more important ones are:
$ORACLE_HOME/bin contains the executables for the database and administrative software.
$ORACLE_HOME/rdbms/admin contains the SQL scripts used to create the catalog, and other useful scripts too numerous to cover here. Refer to the Oracle Database Administration Manual for an explanation of the scripts contained in this directory.
$ORACLE_BASE/admin/SID/bdump contains the alert log for the instance. The name of the alert log is alert_SID.log, where SID is the system identifier for the instance (i.e., alert_greg.log for this installation). This file is extremely important in determining where problems lie. Any time you have an error or database crash, this is the first place to look for information on what might have happened to cause the problem.
$ORACLE_HOME/network/admin contains the tnsnames.ora and listener.ora files. Both of these files are described in the section on modifying configuration files.
$ORACLE_HOME/precomp/demo/proc contains several Pro*C example programs.
The data files, indexes and control files will be placed in /oradata/SID, where SID is the system identifier for the instance (i.e., /u01/oradata/greg, /u02/oradata/greg and /u03/oradata/greg for this installation).
The installation is broken down into 8 steps:
Pre-installation sets up the groups and users, and performs all the tasks prior to actually installing the software.
Software installation is the process of installing the software.
Documentation installation is the process of installing the on-line documentation for Oracle. This must be done in a separate step due to a bug in the installation process.
Binary patching is the process of applying the glibc patch supplied by Oracle.
Database creation creates the initial database.
Post-installation is the process of running a post-install script as root.
Configuration file modification is the process of identifying and modifying the configuration files used by the database and Net8.
Testing and automation is the final process of determining that the database is installed and configured properly, and setting the instance up to start automatically when the machine is rebooted.
Download the compatibility RPMs from Red Hat. The necessary RPMs are compat-binutils-5_2-2_9_1_0_23_1_i386.rpm, compat-glibc-5_2-2_0_7_1_i386.rpm, compat-egcs-5_2-1_0_3a_1_i386.rpm, compat-egcs-c++-5_2-1_0_3a_1_i386.rpm and compat-libs-5_2-1_i386.rpm. Issue the following commands to install the RPMs:
rpm -ivh compat-binutils-5_2-2_9_1_0_23_1_i386.rpm rpm -ivh compat-glibc-5_2-2_0_7_1_i386.rpm rpm -ivh compat-egcs-5_2-1_0_3a_1_i386.rpm rpm -ivh compat-egcs-c++-5_2-1_0_3a_1_i386.rpm rpm -ivh compat-libs-5_2-1_i386.rpm
Edit /etc/passwd for root and change the shell from /bin/bash to /bin/sh. This will make the installation scripts supplied by Oracle run without errors.
Create the groups and users used by Oracle. At a minimum, you will need a group called dba for the oracle user. You may also want to create a group called oper for the operation of the database. Refer to the Database Administrator's Guide for Oracle to determine whether you want to create this group. In the following example, I used only the dba group, with a group ID of 601. You may need to use a different group ID if 601 is already in use on your system. Be sure to change the password for the oracle user.
groupadd -g 601 dba useradd oracle -g 601 passwd oracle
Edit /etc/passwd as root to change the default shell.
Create the directories for your mount points if you didn't create them as partitions. Repeat the commands for all three mount points if necessary.
mkdir /u01 chown -R oracle.dba /u01
Change to the directory where you have unpacked the Oracle8051EE_Intel.tgz file (this is your staging directory for the installation process), and run the script to create the /etc/oratab file. This file is used by Oracle's startup script to determine which instances are running on the machine, and whether they should autostart when the machine is rebooted. More on this file later.
cd /home/oracle/orainst/orainst ORACLE_OWNER=oracle; export ORACLE_OWNER sh oratab.shSee Figure 1 for prompts and their replies.
Log out as root and log in as oracle. Make sure umask is set to 022 by typing umask. If it is not set to 022, you will need to add a line to your .profile file. Set the following environment variables in oracle's .profile:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/8.0.5
ORACLE_SID=greg #(replace with your system
#identifier)
ORACLE_TERM=386
PATH=$PATH:/u01/app/oracle/product/8.0.5/bin
TMPDIR=/var/tmp
export ORACLE_BASE ORACLE_HOME ORACLE_SID\
ORACLE_TERM
export PATH TMPDIR
umask 022 #(only if the umask is not already
#set to 022)
Log out, then log back in as oracle. Make sure the environment variables are set by using the env command, and that /bin:/usr/bin:/usr/local/bin is in your path.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- One Hand Slapping
- Home, My Backup Data Center
- What's the tweeting protocol?
- RSS Feeds
- Trying to Tame the Tablet
- Readers' Choice Awards 2011
- Reply to comment | Linux Journal
4 hours 51 min ago - Reply to comment | Linux Journal
7 hours 23 min ago - Reply to comment | Linux Journal
8 hours 41 min ago - great post
9 hours 15 min ago - Google Docs
9 hours 38 min ago - Reply to comment | Linux Journal
14 hours 26 min ago - Reply to comment | Linux Journal
15 hours 13 min ago - Web Hosting IQ
16 hours 47 min ago - Thanks for taking the time to
18 hours 24 min ago - Linux is good
20 hours 21 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
Oracle patch apply
I have to apply oracle patch for 249 days bug. But I am very new in oracle and linux. I don't know how to find existing oracle home.So can you kindly help me? How to apply this kind of patch in redhat linux? Can I apply without setting oracle home? I mean /opt/oracle/product/10.2.1 .../OPatch/opatch apply , this command can use?
thanks