10goracle Linux Installtion

download 10goracle Linux Installtion

of 14

Transcript of 10goracle Linux Installtion

  • 7/28/2019 10goracle Linux Installtion

    1/14

    Oracle UniversityTechnical Setup Document

    Oracle Database 10g: Performance Tuning

    Global Course Code: D19165GC11

    Last Modified: 07-Feb-2007

    Copyright 2004, Oracle Corporation. All rights reserved.

  • 7/28/2019 10goracle Linux Installtion

    2/14

    Overview

    Introduction

    Welcome, and thank you for choosing Oracle University. This technical document describes the necessary steps tofollow in order to replicate the technical environment for which this course was designed. Before proceeding, youmay find it helpful to print this document for ease of reference.

    This class is intended as both training in the use of the various performance tuning tools and practice indiagnosis and remedy of common problem found in Oracle Database configuration. There are twodatabases in the setup: orcl andprod. The orcl database is a standard database resulting from a

    default install with the example schema included. The orcl database is used for practices and exploring

    the tools. The proddatabase is a customized database the components are the same as orcl, but the

    SYSTEMand the USERS tablespace as specified as dictionary managed. The proddatabase is primarily

    used for the practices that involve workload scenarios.It is helpful to have additional disk available, 20 GB is recommended. The RHAS 3.0 Update 3

    installation, the Oracle Database Enterprise Edition 10.2.0.1, and the two databases can be installed on

    a 14 GB partition. This value does not include the /boot or swap partitions. Installations using less than a20 GB partition may experience out of space errors during the practices. Additional memory is alsorecommended. 1achines with more than 1 GB and faster CPU complete the practices and housekeepingoperations more quickly

    Alternative Configurations

    We strongly recommend following the exact configurations described in this document. However, we realize thatwith the abundance of hardware, software, and networking configurations it will not always be possible to followthese steps to the letter. As a result, here is a brief overview of some additional configurations that may work.Please be sure to test these configurations thoroughly and discuss them in detail with your Oracle UniversityRepresentative before utilizing them to support the course.

    Software Licenses & Support

    Please note the following as it relates to software licenses and support:

    Oracle University does not provide product software or licenses for on-site training events. Thisdocument assumes possession of all applicable Oracle software and associated licenses.

    It is not possible to provide a complete and thorough installation guide in this document, thougheffort is made to include important directions to follow when performing the installation. Customers with

    product installation issues should open a Technical Assistance Request (TAR) with Oracle World WideSupport for resolution.

    Required Files

    The following files are needed for the purposes of completing this setup. If you are missing all or part of thesefiles, please contact your Oracle University Representative:

    Copyright 2004, Oracle Corporation. All rights reserved.2

  • 7/28/2019 10goracle Linux Installtion

    3/14

    D19165GC11_labs.zipLab files can include sql files, doc files, pdf files and student and/or instructor lab files

    D19165GC11_setup_doc_linux.zipLINUX setup documentation

    To install Oracle Database 10g you need the following:

    Oracle 10g Database Release 2 (10.2.0.1)(Installation documentation part numberB15660-02)

    Name Part #Oracle 10g Database Release 1 (10.2.0.1) for Linux x86CD

    B24415-01

    Glossary of Terminology

    Client Workstation The computer where client software is installed. Client software might includeSQL*Plus, Oracle Forms and Reports Developer, Oracle Designer, Jdeveloper, Procedure Builder and an HTMLbrowser. In a 3-Tier or N-Tier architecture this would be the Client Tier. In the training environment, this issometimes known as the student machine.Database - Collection of data that is treated as a unit. The purpose of a database is to store and retrieve relatedinformation. The database consists of operating system files: data files, control files and redo log files.Database Instance - Every time a database is started, a system global area (SGA) is allocated and Oraclebackground processes are started. The system global area is an area of memory used for database informationshared by the database users. The combination of the background processes and memory buffers is called an Oracleinstance.Database Server - Computer where database is created. In a 3-Tier or N-Tier architecture this would be theDatabase Tier.DMP files files created buy the Oracle Export utility. These DMP files are then used by the Oracle Import utilityto import a database, a specific database users objects or a specific set of tables.

    Intelligent Agent (IA) - A process running on the server that accepts and runs job requests from the OracleEnterprise Manager Console.Oracle Enterprise Manager (OEM) - a Graphical User Interface tool used to manage oracle databases.OEM Repository - database that stores information about resources managed through OEM.ORACLE_BASE operating system variable that specifies the BASE of the Oracle directory structure for OFA-compliant databases.ORACLE_HOME - operating system variable that points to the directory where oracle has been installedORACLE_SID operating system variable that determines the instance an Oracle application connects to bydefault.

    Copyright 2004, Oracle Corporation. All rights reserved.3

  • 7/28/2019 10goracle Linux Installtion

    4/14

    Setup Instructions

    Hardware Requirements for Workstation

    Minimum Recommended Tested

    OperatingSystem

    Red Hat Linux EL 3.0 2.4.21-4.EL

    Red Hat Linux EL 3.02.4.21-4.EL

    Red Hat Linux EL 4.0Update 2 2.6.9-22.ELsmp

    CPU 1.7 GHz 1.7 GHz 1.7 GHz, 3.0GHz, 3.2 GHzdual core

    Memory 1 Gig 1 Gig 1Gig, 2,Gig

    Hard Drive20 Gig

    20 Gig 25GB, 60GB, 120GB

    Video1024x768 resolution, 256

    color, 70Hz refreshOr Higher Or Higher

    Monitor17 1024 x 768 resolution at

    70MHzOr Higher Or Higher

    CD-ROM 4x CD-ROM SCSI or EIDE Or faster Or Faster

    Ethernet 16 bits 10 Base T twisted pair Or faster Or Faster

    Browser Mozilla 1.6Mozilla 1.7.13(no substitutes)

    Mozilla 1.7.13(no substitutes)

    Plugin Adobe SVG Plugin 3.0.1 Adobe SVG Plugin 3.0.1 Adobe SVG Viewer 3.01Beta 3 for RedHat Linux

    Copyright 2004, Oracle Corporation. All rights reserved.4

  • 7/28/2019 10goracle Linux Installtion

    5/14

    Workstation Setup Instructions

    Software Setup Instructions

    1. Open a terminal window. Login as the root user.

    2. Create these operating system groups: oinstall, dba, and, oper.

    /usr/sbin/groupadd oinstall/usr/sbin/groupadd dba/usr/sbin/groupadd oper

    3. Create the operating system user oracle:

    /usr/sbin/useradd -g oinstall -G dba,oper -d /home/oracle oracle

    4. Enter the following command to set the password of the oracle user:

    /usr/sbin/passwd oracle

    5. With an editor of your choosing edit /home/oracle/.bash_profile to include the following entries:

    umask 022

    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/binLD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib

    ORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1ORACLE_SID=orcl

    PATH=$ORACLE_HOME/bin:$PATH

    export PATH LD_LIBRARY_PATHexport ORACLE_BASE ORACLE_HOME ORACLE_SID

    6. Create the directory for the software installation and assign ownership to oracle:oinstall.mkdir -p /u01/app/oraclechown -R oracle:oinstall /u01/appchmod -R 775 /u01/app

    7. Open the /etc/sysctl.conf file in any text editor and add lines similar to the following:

    kernel.sem = 250 32000 100 128kernel.shmmax = 2147483684kernel.shmmni = 4096kernel.shmall = 2097152kernel.msgmnb = 360000kernel.msgmni = 2878kernel.msgmax = 8192fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 262144net.core.wmem_default = 262144net.core.wmem_max = 262144

    8. Issue this command to set the kernel parameters:

    /sbin/sysctl -p

    Copyright 2004, Oracle Corporation. All rights reserved.5

  • 7/28/2019 10goracle Linux Installtion

    6/14

    9. Required RPMs.

    binutils-2.15.92.0.2-15compat-db-4.1.25-9control-center-2.8.0-12.rhel4.2gcc-3.4.4-2gcc-c++-3.4.4-2

    glibc-2.3.4-2.13glibc-common-2.3.4-2.13gnome-libs-1.4.1.2.90-44.1libstdc++-3.4.4-2libstdc++-devel-3.4.4-2make-3.80-5pdksh-5.2.14-30.3sysstat-5.0.5-11.rhel4

    To check the installed RPMs, run this command:

    rpm -qa binutils \compat-db \control-center \gcc \

    gcc-c++ \glibc \glibc-common \gnome-libs \libstdc++ \libstdc++-devel \make \pdksh \sysstat | sort

    10. Exit from root user.11. Connect as oracle in a Xterm enabled window to begin the installation. Mount the Oracle Database10g DVD. Execute the script //database/runInstaller from oracle's home directory,/home/oracle.

    Example:

    /media/cdrecorder/database/runInstaller

    12. Select Advanced Installation. ClickNext.

    13. Specify Inventory directory and credentialsVerify the Inventory Directory: /u01/app/oracle/oraInventoryOperating Group: oinstallClickNext.

    14. Select Installation TypeSelect Enterprise Edition (1.24 GB)ClickProduct Languages.

    15. Language Selection

    Click the double arrow ( >> ) to select all.ClickOK.ClickNext.

    16. Specify Home DetailsVerify the name for the installation:

    OraDb10g_home1Verify the path:

    /u01/app/oracle/product/10.2.0/db_1ClickNext.

    Copyright 2004, Oracle Corporation. All rights reserved.6

  • 7/28/2019 10goracle Linux Installtion

    7/14

    17. Product-Specific Prerequisite ChecksThe installer will now verify the system meets all the minimum requirements for installing and

    configuring the chosen product. The checks should all succeeds. If so, click Next. If not consult theinstallation manual and verify all prerequisites have been met..

    18. Select Configuration Option

    Select Create a database.ClickNext.

    19. Select Database ConfigurationSelect General Purpose.ClickNext.

    20. Specify Database Configuration OptionsGlobal Database Name: orcl.oracle.comSID: orclDatabase Character Set: Unicode standard UTF-8 AL32UTF8Check box next to Create database with sample schemasClickNext.

    21. Select Database Management OptionSelect Use Database Control for Database Management.ClickNext.

    22. Specify Database Storage OptionSelect File SystemClickNext.

    23. Specify Backup and Recovery OptionsSelect Do not enable Automated BackupsClickNext.

    24. Specify Database Schema Passwords

    Select Use the same password for all accountsPassword: oracleClickNext.

    25. On the Summary Screen: ClickInstall.

    26. Click OK, when the Database Configuration Assistant completes.

    Execute Configuration ScriptsOpen a terminal window and execute these steps:

    su -/u01/app/oracle/oraInventory/orainstRoot.sh/u01/app/oracle/product/10.2.0/db_1/root.shexit

    27. After executing the scripts, clickOK.

    28. At the End of Installation screen clickExit, then clickYes

    Unlock accounts

    1. Unlock and assign passwords to all locked schemas in the database. Open a text editor and create a textfile named unlock.sh which contains (cut and paste):

    Copyright 2004, Oracle Corporation. All rights reserved.7

  • 7/28/2019 10goracle Linux Installtion

    8/14

    sqlplus -S /nolog

  • 7/28/2019 10goracle Linux Installtion

    9/14

    9. End of InstallationClick Exit.

    10. Do you really want to exit?Click Yes.

    The orcl database has been created. Use dbca to create the prod database.1. Open a terminal window. Login as the oracle user.

    2. Start the Database Configuration Assistant.

    dbca

    3. At the Welcome page, clickNext.

    4. On the Operations page verify Create a Database is selected, and clickNext.

    5. On the Database Templates page, select Custom Database, and ClickNext.

    6. Enter prod.oracle.com as the Global Database Name. The SID field will automatically be set to

    prod. ClickNext.

    7. Confirm Configure the Database with Enterprise Manager is selected. Verify the Enable E-mailNotification and Enable Daily Backup are NOT selected. ClickNext.

    8. On the Database Credentials page, select Use the Same Password for All Accounts, enter andconfirm the password oracle. ClickNext.WARNING: The labs expect the use of this password. Several lab scripts will fail if any otherpassword is used.

    9. On the Storage Options page, verify that File System is selected. ClickNext.

    10. On the Database File Locations page, verify that Use Database File Location from Template isselected. ClickNext.

    11. On the Recovery Configuration page, unselect Specify Flash Recovery Area. ClickNext.

    12. On the Database Content page, Database Components tab, select Oracle Spatial, Example Schemas,and Enterprise Manager Repository only. All other options are NOT selected. ClickNext.

    13. On the Initialization Parameters page, choose the Character Sets tab, and then select Use Unicode(AL32UTF8). ClickNext.

    14. On the Database Storage page, in the navigator, expand the Tablespaces node, and select SYSTEM.Select the Storage tab, and select Extent Management: Managed in the Dictionary. Navigate to theStorage tab of the USERS tables and select Extent Management: Managed in the Dictionary. ClickNext.

    15. On the Creation Options page, select Create Database and Generate Database Creation scripts. Thedatabase creation will take some time, if this operation is to be performed on multiple machines, youcan transfer the database creation script to the other machine and run the script on other machinesinstead of using dbca for each. ClickFinish.

    16. A Summary Report of the database creation is shown, Click OK. The Database Script Creationprogress is shown, and then the database creation starts.

    17. When the database creation is complete, Click Exit. In the confirmation window Select No to Another

    Copyright 2004, Oracle Corporation. All rights reserved.9

  • 7/28/2019 10goracle Linux Installtion

    10/14

    Operation?.

    18. Confirm that the /etc/oratab file has been updated. There should these two lines lines:

    orcl:/u01/app/oracle/product/10.2.0/db_1:Nprod:/u01/app/oracle/product/10.2.0/db_1:N

    The format is instance_name:ORACLE_HOME:startup_optionIf either of these lines does not appear add them with a text editor. Use the ORACLE_HOMEdirectory name where you installed the database executables. In step 5 of the Software SetupInstructions section above.

    Setup the lab files.1. Extract the lab files from the D19165GC11_labs.zip file to the /home/oracle directory.

    Extract the lab files with:

    unzip D19165GC11_labs.zip

    2. Confirm that the workshops, labs, and solutions directories have been created in the /home/oracle/directory.

    3. Confirm that the net service name prod has been created. Use the command netmgr, and view theservice names entries. If the service names prod or orcl do not exist, then create them using netmgr.

    The prod net service name has the following properties:Service Name: prod.oracle.com

    Hostname: localhost.localdomainPort Number: 1521

    The orcl net service name has the following properties:Service Name: orcl.oracle.com

    Hostname: localhost.localdomainPort Number: 1521

    4. Unlock and assign passwords to all locked schemas in the database. Open a text editor and create atext file named unlock.sh which contains (cut and paste):

    sqlplus -S /nolog

  • 7/28/2019 10goracle Linux Installtion

    11/14

    6. Create a additional directory

    mkdir $ORACLE_BASE/admin/prod/disk1

    7. From the workshops directory, execute the ./setup WORKSHOP script. This script prepares the

    prod database for the lab exercises. Several tablespaces and users are created in the prod database.

    cd /home/oracle/workshops./setup WORKSHOP

    8. Login into the prod database as the sys user and install Statspack with the spcreate script in the

    $ORACLE_HOME/rdbms/admin directory.

    When prompted set:password for the perfstat user to perfstatdefault tablespace SYSAUXtemporary tablespace TEMP

    ORACLE_SID=prodsqlplus / as sysdbaSQL> @?/rdbms/admin/spcreate.sql

    WARNING: If there are errors during the Statspack install, use spdrop.sql to cleanup the failedinstallation. Correct the errors and run spcreate.sql again.

    9. Practice 7 assumes that the sudoers file has been setup to allow certain privileges to the oracle

    user. If the sudoers file is setup the student will not require root access. As the root user changethe sudoers file using the visudo command, include the lines in bold below:

    visudo

    # sudoers file.## This file MUST be edited with the 'visudo' command as root.## See the sudoers man page for the details on how to write a sudoers file.#

    # Host alias specification# User alias specification# Cmnd alias specification# Defaults specification# User privilege specificationroot ALL=(ALL) ALL# Uncomment to allow people in group wheel to run all commands# %wheel ALL=(ALL) ALL# Same thing without a password# %wheel ALL=(ALL) NOPASSWD: ALL

    # Samples# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom# %users localhost=/sbin/shutdown -h now####Extra for Perf tunoracle ALL = NOPASSWD: /bin/dd, /bin/kill

    Copyright 2004, Oracle Corporation. All rights reserved.11

  • 7/28/2019 10goracle Linux Installtion

    12/14

    Non-Oracle software:

    Mozilla 1.6 with these plugins configured:- Adobe SVG Viewer 3.01 Beta 3 (Build 88)- Adobe Acrobat Reader 5.08- Java Runtime Environment 1.6.2_03

    These plugins and the installation instructions are available fromMozilla(http://plugindoc.mozdev.org/linux.html)

    Copyright 2004, Oracle Corporation. All rights reserved.12

  • 7/28/2019 10goracle Linux Installtion

    13/14

    Software Test Instructions

    Testing Oracle*Net:

    To test the listener and tnsnames are configuration do the following to force an Oracle*Net connection.

    As the oracle os user in a terminal window:

    sqlplus /nologset instance orclconnect sys/oracle as sysdba

    You should see:

    $ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 13 08:22:21 2004Copyright (c) 1982, 2004, Oracle. All rights reserved.SQL> set instance orclOracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    With the Partitioning, OLAP and Data Mining optionsSQL> connect sys/oracle as sysdbaConnected.SQL>

    Testing DB Control:

    Start Mozilla and point to http://hostname:1158/em. Verify the port location in$ORACLE_HOME/install/portlist.ini.

    user: syspass: oracleas: sysdba

    This will bring up the licensing agreement and then take you into DB Control.

    Testing iSQLPlus:

    Start Mozilla 1.4 and enter the URL http://hostname:5560/isqlplus. Verify the port location in

    $ORACLE_HOME/install/postlist.ini.

    user: shpass: shsid: orcl

    This will take you into iSQLPlus.

    Copyright 2004, Oracle Corporation. All rights reserved.13

    http://hostname:5500/emhttp://hostname:5500/emhttp://hostname:5560/isqlplushttp://hostname:5560/isqlplushttp://hostname:5500/emhttp://hostname:5560/isqlplus
  • 7/28/2019 10goracle Linux Installtion

    14/14

    Clean Up

    Server Clean-Up

    Related Courses

    We hope your Oracle University training experience was a positive one! For information on additional trainingservices and opportunities within, please visit us at http://education.oracle.com. We look forward to serving youagain in the future.

    Copyright 2004, Oracle Corporation. All rights reserved.14