Top Banner
Oracle on Linux Installation for Oracle on Linux Installation for Non-DBAs Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684
50

Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Dec 23, 2015

Download

Documents

Ross Marsh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Oracle on Linux Installation for Oracle on Linux Installation for Non-DBAsNon-DBAs

Sheryl Calish

Blue Heron Consulting

Paper #36684

Page 2: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

IntroductionIntroduction

Linux Installation Oracle Installation Most Recently:

Oracle 9i (Release 2) on SuSE 8.0 (kernel 2.4.18)

Past installs: Oracle 9i on SuSE 7.2 (kernel 2.4.4) Oracle 8.1.7 on Red Hat 6.2 (kernel 2.2.16)

Page 3: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Linux InstallationLinux Installation

Hardware and System Considerations Linux distributions How to prepare for a Linux installation

Page 4: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Oracle InstallationOracle Installation

Preparation tasks Reported installation issues Recommendations for novices

Page 5: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Hardware and System Hardware and System ConsiderationsConsiderations

To check for compatibility with Linux and Xfree86

To ensure proper configuration of your system

To enable others to help you, if something goes wrong

Page 6: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Component InformationComponent Information

Monitor: make, model, manufacture, horizontal and vertical scan rate for each resolution

Video Card: make, chipset, model number and VRAM

Sound Card: make, chipset, and model number

Page 7: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

More ComponentsMore Components

Memory: amount of RAM

Oracle 9i requires 512MB minimum

Mouse: type, protocol and number of buttons

Modem: type and port number

CD-ROM: interface type

SCSI Adapter: make and model number

Paper #36684

Page 8: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Hard Disk RequirementsHard Disk Requirements

Hard Drive(s): number, size and type

Oracle 9i space requirements:

3.5 GB for database software (typical not customized installation)

1.0 GB for seed database

1.0 GB for swap space

Page 9: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

System InformationSystem Information

Network Information: IP address, netmask, gateway IP address, one or more server IP addresses, domain name, organization name

Hostname: name of your computer

Partitions: default or map of planned partitions and mount points

Page 10: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Which Distribution?Which Distribution?

United Linux: SuSE Linux, Turbolinux, Conectiva, The SCOgroup (Caldera)

Red Hat

Mandrake

Debian

Page 11: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Certified for 9iR2Certified for 9iR2

Red Hat 2.1 Advanced Server

SLES7 and SLES8

Page 12: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Certified for 9iCertified for 9i

SLES7

SuSE 7.1 and 7.2 (&RAC)

Red Hat 7.1 (&RAC)

Caldera OU8

Paper #36684

Page 13: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Certified for 8.1.7Certified for 8.1.7

SLES7 SuSE 7.1 and 7.2

Red Hat 2.1 AS Red Hat 7.1

Caldera OU8

Page 14: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Shrink Windows PartitionShrink Windows Partition

Partition Magic

FIPS

GNU Parted

YAST2

Page 15: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Partitioning RationalePartitioning Rationale

"Partitioning Your Hard Drive": www.newriders.com/debian/html/noframes/node15

"4.3 Partitioning Hard Drives(s)": www.linuxdoc.org/LDP/lame/LAME/linux-admin-made-easy/install-partitioning

Page 16: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Optimal Flexible ArchitectureOptimal Flexible Architecture

Four separate mount points:

/u01, /u02, /u03, /u04

each in its own partition

Page 17: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Two ReferencesTwo References

"Tips for Installing and Configuring Oracle9i Database on Red Hat Linux", from OracleWorld 2003

"Installation Instructions for Oracle 9i Release 2 (9.2.0.x) on United Linux 1.0 based Linux systems", from www.suse.com/oracle

Page 18: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

My Current Partition TableMy Current Partition Table

Filesystem Size Used Avail Use% Mounted on

/dev/hda1 2.2G /windows/C

/dev/hda2 * * * * Extended

/dev/hda5 14M 3.7M 9.8M 28% /boot

/dev/hda6 4.0G 2.1G 1.9G 52% /

/dev/hda7 1.0G * * * /swap

/dev/hda8 6.0G 3.8G 2.2G 64% /opt

/dev/hda9 915M 349M 566M 39% /home

Page 19: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Previous Partition TablePrevious Partition Table

Filesystem Size Used Avail Use% Mounted on

/dev/hda6 1.9G 212M 1.5G 12% /

/dev/hda11 758M 5.0M 714M 1% /home

/dev/hda10 4.2G 3.7G 324M 92% /opt

/dev/hda12 243M 13k 230M 1% /u02

/dev/hda13 243M 13k 230M 1% /u03

/dev/hda7 1.2G 828M 324M 72% /usr

/dev/hda8 243M 41M 189M 18% /usr/local

Paper #36684

Page 20: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Swap SpaceSwap Space

Oracle 9i installation requires swap space to be equal to physical memory or 1GB, whichever is greater

A temporary swap file can be used

Page 21: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Run Linux InstallerRun Linux Installer

Follow the documentation for your distribution Check with your Linux distribution for the latest

updates and patches

Page 22: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Prepare for Oracle InstallationPrepare for Oracle Installation

Make sure appropriate software is installed

Create the database administrator groups

Create the Oracle user Create mount points Modify kernel parameters Set environment variables

Page 23: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Required SoftwareRequired Software

rpm -q k_deflt

> k_deflt-2.4.18-58

rpm -q glibc

> glibc-2.2.5-158

rpm -q binutils

> binutils-2.11.920.10-89

Page 24: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

More Required SoftwareMore Required Software

rpm -q gilbc-locale

>glibc-locale-2.2.5-177

rpm -q make

>make-3.79.1-292

rpm -q gcc

>gcc-2.95.3

Page 25: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Database Administrator GroupsDatabase Administrator Groups

As root:

From menu in SuSE:

System -> Configuration -> Create group

From command line:

groupadd oinstall

groupadd dba

groupadd operPaper #36684

Page 26: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Create Oracle userCreate Oracle user

As root:

From menu in SuSE:

System -> Configuration -> Create user

From command line:

useradd oracle -g oinstall -G dba,oper

Page 27: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Mount PointsMount Points

If you did not create the partitions for these you can create the mount points now, then,

As root, change ownership:

chown oracle.dba /opt/oracle (or /u01)

OR

chown oracle.oinstall /opt/oracle

chmod 775 /opt/oracle (or /u01)

Run the same command for /u02, /u03, /u04

Page 28: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Kernel ParametersKernel Parameters

Oracle documentation warns of possible installation or production problems if the settings are insufficient

SHMMAX

Page 29: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Environment VariablesEnvironment Variables

As oracle user

Three sources:

1) Oracle Metalink

2) www.puschitz.com/OracleOnLinux

3)orarun9i.rpm (run as root)

Page 30: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

orarun9i.rpmorarun9i.rpm

can be downloaded from SuSE

sets up most environment variables in /etc/profile.d/oracle.sh

sets kernel parameters

sets up automatic startup/shutdown of Oracle

look at /usr/share/doc/packages/orarun9i/README

Page 31: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

New orarun New orarun

For SLES8 and SuSE 8.1 use:

orarun-1.4-2-SL80_81.noarch.rpm

Major difference is location of :

/etc/profile.d/oracle.[c]sh

has been moved to:

/etc/sysconfig/oracle

Paper #36684

Page 32: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Oracle9i RHL Run PackageOracle9i RHL Run Package

Available from GURU LABS www.gurulabs.com/downloads.html

Based on orarun9i.rpm from SuSE modified to work with Red Hat

Page 33: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Functions of RHL RunFunctions of RHL Run

Provides:

/etc/init.d/oracle

/etc/profile.d/oracle/sh|chs (requires edits)

/etc/sysconfig/oracle (requires edits)

/usr/share/doc/oraclerun9i-1.4/INSTALL

Page 34: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Temporary swapfileTemporary swapfile

# become the root user

su -

# create a 1GB file (or any value for "count")

dd if=/dev/zero of=/swapfile bs=1k count=1048576

# make it a swapfile

mkswap /swapfile

# activate

swapon /swapfile

Page 35: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Run Oracle InstallerRun Oracle Installer

Oracle 9iR2 installation took 45 minutes with 512MB and 1GB of swap space

Oracle 9iR1 installation took 1 hour with 512MB and 658MB of swap space

Oracle 8.1.7 installation took 15 minutes with 512MB of RAM and 1GB of swap space

Page 36: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Start OracleStart Oracle

linuxprompt:~> sqlplus /nolog

SQL> connect / as sysdba

SQL> startup

Page 37: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Install CleanupInstall Cleanup

In order to run Oracle Installer after an incomplete install

From www.puschitz.comrm

rm -rf /etc/oraInst.loc /etc/oratab (/tmp/OraInstall ?)

rm -rf $ORACLE_BASE/* /tmp/<other_Oracle_owned_files>

Paper #36684

Page 38: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Installation Issue #1Installation Issue #1

Issue: Inability to access another program after Oracle installation

Solution: Add $PATH before you enter other path variables

Page 39: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

PATH ExamplePATH Example

Instead of:

PATH=/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin/bin:/opt/local/GNU/bin

Enter: PATH=$PATH:/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin/bin:/opt/local/GNU/bin

Page 40: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Installation Issue #2Installation Issue #2

Issue: Incompatibilities between some versions of Oracle and glibc or binutils of some versions of Linux

Examples:

Red Hat 7.0 and Oracle 8.1.7 have a glibc issue

Red Hat 7.1/7.2/7.3, AS 2.1 and Oracle 9iR1 have a binutil issue

Sun JDK 1.3.1 and SuSE 7.2 have a glibc issue

Page 41: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

9iR2 and Red Hat 8.09iR2 and Red Hat 8.0

From www.puschitz.com/OracleOnLinux:

"Error in invoking target install of makefile: /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.

mk"

Edit $ORACLE_HOME/ctx/lib/env_ctx.mk and go to "INSO_LINK =", add a "$(LDLIBFLAG)dl" to the line and save it.

Page 42: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

9iR2 and SuSE 8.09iR2 and SuSE 8.0

From suse-oracle mailing list

"Error in invoking target ntcrontab.o of makefile: /opt/oracle/product/oracle/network/lib/ins_int_client.mk"

Page 43: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

9iR2 on SuSE 8.0 (con't)9iR2 on SuSE 8.0 (con't)

First solution:

Edit the file $ORACLE_HOME/sysliblist

add the following to the existing line

-L/usr/lib/gcc-lib/i486-suse-linux/2.95.3 -lgcc

the line becomes something like this:

-L/usr/lib/gcc-lib/i486-suse-linux/2.95.3 -lgcc -ldl -lm -lpthread

Paper #36684

Page 44: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

9iR2 on SuSE 8.09iR2 on SuSE 8.0

Second solution:

look in $ORACLE_HOME/install/make.log for linker errors (eg. lack of the library clntsh. (ld reports cannot find -lclntsh)

go to $ORACLE_HOME/bin and run the command 'genclntsh' (as user oracle)

Page 45: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Installation Issue #3Installation Issue #3

Issue: Some have reported that the Installer hangs during installation

Enter: unset LANG

Then run Oracle Universal Installer

Page 46: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Installation Issue #4Installation Issue #4

Issue: Mounting and unmounting cdrom

Run Oracle Universal Installer as Oracle user

From Oracle user directory:

mount /media/cdrom

/media/cdrom/oracle9i/runInstaller

unmount /media/cdrom

DO NOT cd to cdrom directory to ./runInstaller!

Page 47: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

RecommendationsRecommendations

Decide on the version of Oracle you want to install and work backward.

Choose the version of the Linux distribution with the same binutils and glibc as the certified version.

Oracle 9iR2 reported to install smoothly on Red Hat 7.3, 8.0, SuSE 8.0, 8.1 and 8.2.

Check that your hardware and system components are supported by your chosen Linux distribution -especially for Xfree86.

Page 48: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

ResourcesResources

Oracle Metalink

Linux Forum at www.oracle.com/forums

SuSE: www.suse.com/oracle

Listserve groups:

SuSE-oracle

[email protected]

Page 49: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.

Contact InformationContact Information

Sheryl CalishSheryl CalishBlue Heron ConsultingBlue Heron [email protected]@earthlink.net

Paper #36684Paper #36684

Page 50: Oracle on Linux Installation for Non-DBAs Sheryl Calish Blue Heron Consulting Paper #36684.