Step-By-Step Installation of 9i RAC on IBM AIX(3) 转载

来源:互联网 发布:新页软件免费版 编辑:程序博客网 时间:2024/05/17 09:36

3.0 Preparing for the installation of RAC


The Real Application Clusters installation process includes four major tasks.

  1. Configure the shared disks and UNIX preinstallation tasks.
  2. Runthe Oracle Universal Installer to install the Oracle9i EnterpriseEdition and the Oracle9i Real Application Clusters software.
  3. Create and configure your database.

 

3.1 Configure the shared disks and UNIX preinstallation tasks


3.1.1 Configure the shared disks


Real Application Clusters requires that all each instance be able toaccess a set of unformatted devices on a shared disk subsystem if GPFSis not being used. These shared disks are also referred to as rawdevices. If your platform supports an Oracle-certified cluster filesystem, however, you can store the files that Real Application Clustersrequires directly on the cluster file system.

Note: If you are using Parallel Filesystem (GPFS), however, you can store the files that Real Application Clusters requires
directly on the cluster file system !

The Oracle instances in Real Application Clusters write data ontothe raw devices to update the control file, server parameter file, eachdatafile, and each redo log file. All instances in the cluster sharethese files.

The Oracle instances in the RAC configuration write information to raw devices defined for:

  • The control file
  • The spfile.ora
  • Each datafile
  • Each ONLINE redo log file
  • Server Manager (SRVM) configuration information

It is therefore necessary to define raw devices for each of thesecategories of file. The Oracle Database Configuration Assistant (DBCA)will create a seed database expecting the following configuration:

    Raw Volume
    File Size
    Sample File Name
    SYSTEM tablespace
    400 Mb
    db_name_raw_system_400mUSERS tablespace
    120 Mb
    db_name_raw_users_120mTEMP tablespace
    100 Mb
    db_name_raw_temp_100mUNDOTBS tablespace per instance
    312 Mb
    db_name_raw_undotbsx_312mCWMLITE tablespace
    100 Mb
    db_name_raw_cwmlite_100mEXAMPLE
    160 Mb
    db_name_raw_example_160mOEMREPO
    20 Mb
    db_name_raw_oemrepo_20mINDX tablespace
    70 Mb
    db_name_raw_indx_70mTOOLS tablespace
    12 Mb
    db_name_raw_tools_12mDRYSYS tablespace
    90 Mb
    db_name_raw_drsys_90mFirst control file
    110 Mb
    db_name_raw_controlfile1_110mSecond control file
    110 Mb
    db_name_raw_controlfile2_110mTwo ONLINE redo log files per instance
    120 Mb x 2
    db_name_thread_lognumber_120mspfile.ora
    5 Mb
    db_name_raw_spfile_5msrvmconfig
    100 Mb
    db_name_raw_srvmconf_100m

Note: Automatic Undo Management requires an undo tablespace perinstance therefore you would require a minimum of 2 tablespaces asdescribed above. By following the naming convention described in thetable above, raw partitions are identified with the database and theraw volume type (the data contained in the raw volume). Raw volume sizeis also identified using this method.

Note: In the sample names listed in the table, the string db_nameshould be replaced with the actual database name, thread is the threadnumber of the instance, and lognumber is the log number within a thread.

On the node from which you run the Oracle Universal Installer,create an ASCII file identifying the raw volume objects as shown above.The
DBCA requires that these objects exist during installation and databasecreation. When creating the ASCII file content for the objects, namethem
using the format:

database_object=raw_device_file_path

 

When you create the ASCII file, separate the database objects fromthe paths with equals (=) signs as shown in the example below:

    system1=/dev/rdb_name_system_400m
    spfile1=/dev/rdb_name_spfile_5m
    users1=/dev/rdb_name_users_120m
    temp1=/dev/rdb_name_emp_100m
    undotbs1=/dev/rdb_name_undotbs1_312m
    undotbs2=/dev/rdb_name_undotbs2_312m
    example1=/dev/rdb_name_example_160m
    cwmlite1=/dev/rdb_name_cwmlite_100m
    indx1=/dev/rdb_name_indx_70m
    tools1=/dev/rdb_name_tools_12m
    drsys1=/dev/rdb_name_drsys_90m
    control1=/dev/rdb_name_cntrl1_110m
    control2=/dev/rdb_name_cntrl2_110m
    redo1_1=/dev/rdb_name_log11_120m
    redo1_2=/dev/rdb_name_log12_120m
    redo2_1=/dev/rdb_name_log21_120m
    redo2_2=/dev/rdb_name_log22_120m

     

You must specify that Oracle should use this file to determine theraw device volume names by setting the following environment variablewhere filename
is the name of the ASCII file that contains the entries shown in the example above:

 

csh:

setenv DBCA_RAW_CONFIG filename

ksh, bash or sh:

DBCA_RAW_CONFIG=filename; export DBCA_RAW_CONFIG

3.1.2 UNIX Preinstallation Steps


Note: In addition, you can run the installPrep.sh script provided in Note 189256.1 which catches most unix environment problems.

After configuring the raw volumes, perform the following steps prior to installation as root user:

 

Add the Oracle USER

  • Make sure you have an osdba group defined in the /etc/group file on all nodes of your cluster. To designate an osdba group name and group number and osopergroup during installation, these group names must be identical on allnodes of your UNIX cluster that will be part of the Real ApplicationClusters database. The default UNIX group name for the osdba and osopergroups is dba.There also needs be an oinstall group which the software owner shouldhave as its primary group. A typical entry would therefore look likethe following:

    dba::101:oracle
    oinstall::102:root,oracle

  • The following is an example of the command used to create the "dba" group with a group ID of "101":

          # mkgroup -'A' id='101' users='oracle' dba

  • Create an oracle account on each node so that the account:
    • Is a member of the osdba group (dba in this example)
    • Has oinstall as its primary group
    • Is used only to install and update Oracle software
    • Has write permissions on remote directories

    The following is an example of the smit command used to create the "oracle" user:

       Smit -> Security & Users -> Users -> Add a User

  •  

    Fastpath:

  •  

    # smit mkuser

    Type or select values in entry fields.
    Press Enter AFTER making all desired changes.

    [TOP]
    [Entry Fields]
    * User NAME [oracle]
    User
    ID [101] #
    ADMINISTRATIVE USER? false +
    Primary GROUP [oinstall] +

    Group SET [] +
    ADMINISTRATIVE GROUPS [] +
    ROLES [] +
    Another user can SU TO USER? true +
    SU GROUPS [ALL] +
    HOME directory [/home/oracle]
    Initial PROGRAM [/bin/ksh]

    User INFORMATION []
    EXPIRATION date (MMDDhhmmyy) [0]

Note that the primary group is not "dba". The "use" of "oinstall" isoptional but recommended. For more information on the use of the"oinstall" group see the : Oracle9iInstallation Guide Release 2 (9.X.X.X.0) for UNIX Systems: AIX-BasedSystems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel and SunSPARC Solaris documentation.

  • Create a mount point directory on each node to serve as the top of your Oracle software directory structure so that:
    • The name of the mount point on each node is identical to that on the initial node
    • The oracle account has read, write, and execute privileges
  • On the node from which you will run the Oracle UniversalInstaller, set up user equivalence by adding entries for all nodes inthe cluster, including the local node, to the .rhosts file of theoracle account, or the /etc/hosts.equiv file.
  • As oracle account user, check for user equivalence for the oracle account by performing a remote login (rlogin) to each node in the cluster.
  • As oracle account user, if you are prompted for a password, you have not given the oracle account the same attributes on all nodes. You must
    correct this because the Oracle Universal Installer cannot use the rcp command to copy Oracle products to the remote node's directories without
    user equivalence.

Establish system environment variables

  • Set a local bin directory in the user's PATH, such as /usr/local/bin, or /opt/bin. It is necessary to have execute permissions on this directory.
  • Set the DISPLAY variable to point to the system's (from where you will run OUI) IP address, or name, X server, and screen.
  • Set a temporary directory path for TMPDIR with at least 20 Mb of free space to which the OUI has write permission.

Establish Oracle environment variables: Set the following Oracle environment variables:

    Environment Variable
    Suggested value
    ORACLE_BASEeg /u01/app/oracleORACLE_HOMEeg /u01/app/oracle/product/901ORACLE_TERMxtermNLS_LANGAMERICAN-AMERICA.UTF8 for exampleORA_NLS33$ORACLE_HOME/ocommon/nls/admin/dataPATHShould contain $ORACLE_HOME/binCLASSPATH$ORACLE_HOME/JRE:$ORACLE_HOME/jlib /
    $ORACLE_HOME/rdbms/jlib: /
    $ORACLE_HOME/network/jlib

  • Create the directory /var/opt/oracle and set ownership to the oracle user.

Note: There is a verification script InstallPrep.sh available whichmay be downloaded and run prior to the installation of Oracle RealApplication Clusters. This script verifies that the system isconfigured correctly according to the Installation Guide. The output ofthe script will report any further tasks that need to be performedbefore successfully installing Oracle 9.x DataServer (RDBMS). Thisscript performs the following verifications:-

ORACLE_HOME Directory Verification
UNIX User/umask Verification
UNIX Group Verification
Memory/Swap Verification
TMP Space Verification
Real Application Cluster Option Verification
Unix Kernel Verification

./InstallPrep.sh
You are currently logged on as oracle
Is oracle the unix user that will be installing Oracle Software? y or n
y
Enter the unix group that will be used during the installation
Default: dba
dba

Enter Location where you will be installing Oracle
Default: /u01/app/oracle/product/oracle9i
/u01/app/oracle/product/9.2.0.1
Your Operating System is AIX
Gathering information... Please wait

Checking unix user ...
user test passed

Checking unix umask ...
umask test passed

Checking unix group ...
Unix Group test passed

Checking Memory & Swap...
Memory test passed

/tmp test passed

Checking for a cluster...
AIX Cluster test
Cluster has been detected
You have 2 cluster members configured and 2 are curently up
No cluster warnings detected
Processing kernel parameters... Please wait
Running Kernel Parameter Report...
Check the report for Kernel parameter verification

Completed.

/tmp/Oracle_InstallPrep_Report has been generated

Please review this report and resolve all issues before attempting to install the Oracle Database Software

 

 

3.2 Using the Oracle Universal Installer for Real Application Clusters


Follow these procedures to use the Oracle Universal Installer toinstall the Oracle Enterprise Edition and the Real Application Clusterssoftware. Oracle9i is supplied on multiple CD-ROM disks. During theinstallation process it is necessary to switch between the CD-ROMS. OUIwill manage the switching between CDs. For the latest RAC/IBMcertification matrix see here.

To install the Oracle Software, perform the following:.

  • Login as the root user and mount the first CD-ROM if installing from CD-ROM

    # mount -rv cdrfs /dev/cd0 /cdrom

  • Executethe "rootpre.sh" shell script on the CD-ROM mount point or the locationof Disk1 if installing from a disk stage. See the Oracle9iInstallation Guide Release 2 (9.X.X.X.0) for UNIX Systems: AIX-BasedSystems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel and SunSPARC Solaris documentation for more information on creating disk stages.

    # /<Location_Of_Install_Media>/rootpre.sh     
  • Loginas the oracle user and execute the "runInstaller". See<Note:153960.1> if you experience problems starting therunInstaller.

    $ /<Location_Of_Install_Media>/runInstaller
  • At the OUI Welcome screen, click Next.
  • Aprompt will appear for the Inventory Location (if this is the firsttime that OUI has been run on this system). This is the base directoryinto which OUI will install files. The Oracle Inventory definition canbe found in the file /etc/oraInst.loc. Click OK.
  • Verify the UNIX group name of the user who controls the installation of the Oracle9i software. If an instruction to run /tmp/orainstRoot.sh appears, the pre-installation steps were not completed successfully. Typically, the /var/opt/oracle directory does not exist or is not writeable by oracle. Run /tmp/orainstRoot.sh to correct this, forcing Oracle Inventory files, and others, to be written to the ORACLE_HOME directory. Once again this screen only appears the first time Oracle9i products are installed on the system. Click Next.
  • The File Location window will appear. Do NOT change the Source field. The Destination field defaults to the ORACLE_HOME environment variable. Click Next.
  • Select the Products to install. In this example, select the Oracle9i Server then click Next.
  • Select the installation type. Choose the Enterprise Editionoption. The selection on this screen refers to the installationoperation, not the database configuration. The next screen allows for acustomized database configuration to be chosen. Click Next.
  • Selectthe configuration type. In this example you choose the AdvancedConfiguration as this option provides a database that you cancustomize, and configures the selected server products. Select Customized and click Next.
  • Selectthe other nodes on to which the Oracle RDBMS software will beinstalled. It is not necessary to select the node on which the OUI iscurrently running. Click Next.
    • NOTE:If choosing to create a shared Oracle Home on GPFS, you will onlychoose one node within the Cluster Node Selection screen of OUI for theinstallation of the binaries.
  • Identifythe raw partition in to which the Oracle9i Real Application Clusters(RAC) configuration information will be written. It is recommended thatthis raw partition is a minimum of 100MB in size.
  • An option to Upgrade or Migrate an existing database is presented. Do NOTselect the radio button. The Oracle Migration utility is not able toupgrade a RAC database, and will error if selected to do so.
  • The Summary screen will be presented. Confirm that the RAC database software will be installed and then click Install. The OUI will install the Oracle9i software on to the local node, and then copy this information to the other nodes selected.
  • OnceInstall is selected, the OUI will install the Oracle RAC software on tothe local node, and then copy software to the other nodes selectedearlier. This will take some time. During the installation process, theOUI does not display messages indicating that components are beinginstalled on other nodes - I/O activity may be the only indication thatthe process is continuing.

3.3 Create a RAC Database using the Oracle Database Configuration Assistant

 


The Oracle Database Configuration Assistant (DBCA) will create adatabase for you (for an example of manual database creation see Database Creation in Oracle9i RAC).The DBCA creates your database using the optimal flexible architecture(OFA). This means the DBCA creates your database files, including thedefault server parameter file, using standard file naming and fileplacement practices. The primary phases of DBCA processing are:-

  • Verify that you correctly configured the shared disks for each tablespace (for non-cluster file system platforms)
  • Create the database
  • Configure the Oracle network services
  • Start the database instances and listeners

Oracle Corporation recommends that you use the DBCA to create yourdatabase. This is because the DBCA preconfigured databases optimizeyour environment to take advantage of Oracle9i features such as theserver parameter file and automatic undo management. The DBCA alsoenables you to
define arbitrary tablespaces as part of the database creation process.So even if you have datafile requirements that differ from thoseoffered in one of the DBCA templates, use the DBCA. You can alsoexecute user-specified scripts as part of the database creation process.

The DBCA and the Oracle Net Configuration Assistant also accuratelyconfigure your Real Application Clusters environment for various Oraclehigh availability features and cluster administration tools.

  • DBCA will launch as part of the installation process, but can be run manually by executing the command dbca from the $ORACLE_HOME/bin directory on UNIX platforms. The RAC Welcome Page displays. Choose Oracle Cluster Database option and select Next.
  • The Operations page is displayed. Choose the option Create a Database and click Next.
  • The Node Selection page appears. Select the nodes that you want to configure as part of the RAC database and click Next. If nodes are missing from the Node Selection then perform clusterware diagnostics by executing the $ORACLE_HOME/bin/lsnodes -vcommand and analyzing its output. Refer to your vendor's clusterwaredocumentation if the output indicates that your clusterware is notproperly installed. Resolve the problem and then restart the DBCA.
  • The Database Templates page is displayed. The templates other than New Database include datafiles. Choose New Database and then click Next.
  • The Show Details button provides information on the database template selected.
  • DBCA now displays the Database Identification page. Enter the Global Database Name and Oracle System Identifier (SID). The Global Database Name is typically of the form name.domain, for example mydb.us.oracle.comwhile the SID is used to uniquely identify an instance (DBCA shouldinsert a suggested SID, equivalent to name1 where name was entered inthe Database Name field). In the RAC case the SID specified will beused as a prefix for the instance number. For example, MYDB, would become MYDB1, MYDB2 for instance 1 and 2 respectively.
  • The Database Options page is displayed. Select the options you wish to configure and then choose Next. Note: If you did not choose New Database from the Database Template page, you will not see this screen.
  • The Additional database Configurations button displays additional database features. Make sure both are checked and click OK.
  • Select the connection options desired from the Database Connection Options page. Note: If you did not choose New Database from the Database Template page, you will not see this screen. Click Next.
  • DBCA now displays the Initialization Parameters page. This page comprises a number of Tab fields. Modify the Memory settings if desired and then select the File Locations tab to update information on the Initialization Parameters filename and location. Then click Next.
  • The option Create persistent initialization parameter file is selected by default. If you have a cluster file system, then enter a file system name, otherwise a raw device name for the location of the server parameter file (spfile) must be entered. Then click Next.
  • The button File Location Variables… displays variable information. Click OK.
  • The button All Initialization Parameters…displays the Initialization Parameters dialog box. This box presentsvalues for all initialization parameters and indicates whether they areto be included in the spfile to be created through the check box,included (Y/N). Instance specific parameters have an instance value inthe instance column. Complete entries in the All Initialization Parameters page and select Close. Note:There are a few exceptions to what can be altered via this screen.Ensure all entries in the Initialization Parameters page are completeand select Next.
  • DBCA now displays the Database Storage Window. This page allows you to enter file names for each tablespace in your database.
  • The file names are displayed in the Datafiles folder, but are entered by selecting the Tablespacesicon, and then selecting the tablespace object from the expanded tree.Any names displayed here can be changed. A configuration file can beused, see section 3.2.1, (pointed to by the environment variable DBCA_RAW_CONFIG). Complete the database storage information and click Next.
  • The Database Creation Options page is displayed. Ensure that the option Create Database is checked and click Finish.
  • The DBCA Summary window is displayed. Review this information and then click OK.
  • Once the Summary screen is closed using the OK option, DBCA begins to create the database according to the values specified.

A new database now exists. It can be accessed via Oracle SQL*PLUS orother applications designed to work with an Oracle RAC database.

限于篇幅少了怎么管理instance的startup 和shutdown

 

 

 

5.0 References

  • Note: 182037.1 - AIX: Quick Start Guide - 9.0.1 RDBMS Installation
  • Note: 201019.1 - AIX: Quick Start Guide - 9.2.0 RDBMS Installation
  • Note:137288.1 - Database Creation in Oracle9i RAC
  • Note:183408.1 - Raw Devices and Cluster Filesystems With Real Application Clusters
  • RAC/IBM AIX certification matrix
  • Oracle9i Real Application Clusters Installation and Configuration Release 1 (9.0.1)
  • Oracle9i Real Application Clusters Concepts
  • Oracle9i Real Application Clusters Administration
  • Oracle9i Real Application Clusters Deployment and Performance
  • Oracle9i Installation Guide for Compaq Tru64, Hewlett-Packard HPUX, IBM-AIX, Linux, and Sun Solaris-based systems.
  • Oracle9i Release Notes

全文完

原创粉丝点击