小结REDHAT5+11G R2+ASM+ISCSI(OPENFILER)布署【补充中】

一.下载相关的包

数据库:第1和第2个压缩包

集群:第3个压缩包

iscsi:openfiler2.3

asmlib相关(3个)

redhat5.5(x86_64)

平台ESX5(虚拟机上布署)


Network Configuration
Node NamePublic IPPrivate IPVirtual IPSCAN NameSCAN IP
racnode1172.16.108.24172.16.108.34172.16.108.28racnode-cluster-scan172.16.108.26
racnode2172.16.108.25172.16.108.35172.16.108.29
openfiler1172.16.108.58  
Oracle Software Components
Software ComponentOS UserPrimary GroupSupplementary GroupsHome DirectoryOracle Base / Oracle Home
Grid Infrastructuregridoinstallasmadmin, asmdba, asmoper/home/grid/u01/app/grid
/u01/app/11.2.0/grid
Oracle RACoracleoinstalldba, oper, asmdba/home/oracle/u01/app/oracle
/u01/app/oracle/product/11.2.0/dbhome_1
Storage Components
Storage ComponentFile SystemVolume SizeASM Volume Group NameASM RedundancyOpenfiler Volume Name
OCR/Voting DiskASM2GB+CRSExternalracdb-crs1
Database FilesASM30GB+RACDB_DATAExternalracdb-data1
Fast Recovery AreaASM30GB+FRAExternalracdb-fra1

二.安装过程

1.先分别安装两个REDHAT系统,配置相关的IP地址

---------------------------------------


-------------------------------------

打上一些相关补丁

(32位)

rpm -Uvh binutils-2.*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh kernel-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh libgomp-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh unixODBC-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh libaio-devel-0.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-devel-2.*
64位

64-bit (x86_64) Installations

 

rpm -Uvh binutils-2.*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh unixODBC-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh libaio-devel-0.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh sysstat-7.*


修改系统内核参数

2.配置/etc/hosts文件

[grid@racnode1 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              racnode1 localhost.localdomain localhost
#::1            localhost6.localdomain6 localhost6
127.0.0.1        localhost.localdomain   localhost

                                 
# Public Network - (eth0)
172.16.108.24    racnode1
172.16.108.25    racnode2

# Private Interconnect - (eth1)
172.16.108.34    racnode1-priv
172.16.108.35    racnode2-priv

# Public Virtual IP (VIP) addresses - (eth0:1)
172.16.108.28    racnode1-vip
172.16.108.29    racnode2-vip
# Single Client Access Name (SCAN)
172.16.108.26    racnode-cluster-scan

172.16.108.58 openfiler1
172.16.108.59 openfiler1-priv

-------------------------------------------------------------------------

[root@racnode2 ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              racnode2 localhost.localdomain localhost
#::1            localhost6.localdomain6 localhost6

127.0.0.1        localhost.localdomain   localhost

                                 
# Public Network - (eth0)
172.16.108.24    racnode1
172.16.108.25    racnode2

# Private Interconnect - (eth1)
172.16.108.34    racnode1-priv
172.16.108.35    racnode2-priv

# Public Virtual IP (VIP) addresses - (eth0:1)
172.16.108.28    racnode1-vip
172.16.108.29    racnode2-vip
# Single Client Access Name (SCAN)
172.16.108.26    racnode-cluster-scan

172.16.108.58 openfiler1
172.16.108.59 openfiler1-priv

关闭NTP在安装时候会启用CTSS

[root@racnode1 ~]#  
                         /sbin/service ntpd stop
[root@racnode1 ~]#  
                         chkconfig ntpd off
[root@racnode1 ~]#  
                         mv /etc/ntp.conf /etc/ntp.conf.original
                      

Also remove the following file:

[root@racnode1 ~]#  
                         rm /var/run/ntpd.pid
                      


Configure iSCSI Volumes on Oracle RAC Nodes

[root@racnode1 ~]#  
                         rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep iscsi-initiator-utils
                      

If the iscsi-initiator-utils package is not installed, load CD #1 into each of the Oracle RAC nodes and perform the following:

[root@racnode1 ~]#  
                         mount -r /dev/cdrom /media/cdrom
[root@racnode1 ~]#  
                         cd /media/cdrom/Server
[root@racnode1 ~]#  
                         rpm -Uvh iscsi-initiator-utils-*
[root@racnode1 ~]#  
                         service iscsid start
Turning off network shutdown. Starting iSCSI daemon:       [   
                        
OK  ]
                                                           [   
                        
OK  ]

[root@racnode1 ~]#  
                         chkconfig iscsid on
[root@racnode1 ~]#  
                         chkconfig iscsi on
[root@racnode1 ~]#  
                         iscsiadm -m discovery -t sendtargets -p openfiler1-priv
Manually Log In to iSCSI Targets

[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.crs1 -p 192.168.2.195 -l
[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.data1 -p 192.168.2.195 -l
[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.fra1 -p 192.168.2.195 -l
Configure Automatic Log In
[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.crs1 -p 192.168.2.195 --op update -n node.startup -v automatic
[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.data1 -p 192.168.2.195 --op update -n node.startup -v automatic
[root@racnode1 ~]#  
                         iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.fra1 -p 192.168.2.195 --op update -n node.startup -v automatic
Create Persistent Local SCSI Device Names

[root@racnode1 ~]#  
                         (cd /dev/disk/by-path; ls -l *openfiler* | awk '{FS=" "; print $9 " " $10 " " $11}')
ip-192.168.2.195:3260-iscsi-iqn.2006-01.com.openfiler:racdb.crs1-lun-0 -> ../../sdb
ip-192.168.2.195:3260-iscsi-iqn.2006-01.com.openfiler:racdb.data1-lun-0 -> ../../sdd
ip-192.168.2.195:3260-iscsi-iqn.2006-01.com.openfiler:racdb.fra1-lun-0 -> ../../sdc
Current iSCSI Target Name to local SCSI Device Name Mappings
iSCSI Target NameSCSI Device Name
iqn.2006-01.com.openfiler:racdb.crs1/dev/sdb
iqn.2006-01.com.openfiler:racdb.data1/dev/sdd
iqn.2006-01.com.openfiler:racdb.fra1/dev/sdc

创建文件/etc/udev/rules.d/55-openiscsi.rules

[root@racnode1 ~]# more  /etc/udev/rules.d/55-openiscsi.rules
# /etc/udev/rules.d/55-openiscsi.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM="/etc/udev/scripts/iscsidev.sh %b",SYMLINK+="iscsi/%
c/part%n"


[root@racnode1 ~]#  
                         mkdir -p /etc/udev/scripts

创建文件/etc/udev/scripts/iscsidev.sh

[root@racnode1 ~]# more /etc/udev/scripts/iscsidev.sh
#!/bin/sh
# FILE: /etc/udev/scripts/iscsidev.sh
BUS=${1}
HOST=${BUS%%:*}
[ -e /sys/class/iscsi_host ] || exit 1
file="/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/targetname"
target_name=$(cat ${file})
# This is not an open-scsi drive
if [ -z "${target_name}" ]; then
   exit 1
fi
# Check if QNAP drive
check_qnap_target_name=${target_name%%:*}
if [ $check_qnap_target_name = "iqn.2004-04.com.qnap" ]; then
    target_name=`echo "${target_name%.*}"`
fi
echo "${target_name##*.}"


[root@racnode1 ~]#  
                         chmod 755 /etc/udev/scripts/iscsidev.sh
[root@racnode1 ~]#  
                         service iscsi stop
[root@racnode1 ~]#  
                         service iscsi start
[root@racnode1 ~]#  
                         ls -l /dev/iscsi/*
iSCSI Target Name to Local Device Name Mappings
iSCSI Target NameLocal Device Name
iqn.2006-01.com.openfiler:racdb.crs1/dev/iscsi/crs1/part
iqn.2006-01.com.openfiler:racdb.data1/dev/iscsi/data1/part
iqn.2006-01.com.openfiler:racdb.fra1/dev/iscsi/fra1/part
Create Partitions on iSCSI Volumes

[root@racnode1 ~]#  
                         fdisk /dev/iscsi/crs1/part
Command (m for help):  
                         n
Command action
   e   extended
   p   primary partition (1-4)
                          p
Partition number (1-4):  
                         1
First cylinder (1-1012, default 1):  
                         1
Last cylinder or +size or +sizeM or +sizeK (1-1012, default 1012):  
                         1012

Command (m for help):  
                         p

Disk /dev/iscsi/crs1/part: 2315 MB, 2315255808 bytes
72 heads, 62 sectors/track, 1012 cylinders
Units = cylinders of 4464 * 512 = 2285568 bytes

               Device Boot      Start         End      Blocks   Id  System
/dev/iscsi/crs1/part1               1        1012     2258753   83  Linux

Command (m for help):  
                         w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

# ---------------------------------------

[root@racnode1 ~]#  
                         fdisk /dev/iscsi/data1/part
Command (m for help):  
                         n
Command action
   e   extended
   p   primary partition (1-4)
                          p
Partition number (1-4):  
                         1
First cylinder (1-33888, default 1):  
                         1
Last cylinder or +size or +sizeM or +sizeK (1-33888, default 33888):  
                         33888

Command (m for help):  
                         p

Disk /dev/iscsi/data1/part: 35.5 GB, 35534143488 bytes
64 heads, 32 sectors/track, 33888 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

                Device Boot      Start         End      Blocks   Id  System
/dev/iscsi/data1/part1               1       33888    34701296   83  Linux

Command (m for help):  
                         w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


# ---------------------------------------

[root@racnode1 ~]#  
                         fdisk /dev/iscsi/fra1/part
Command (m for help):  
                         n
Command action
   e   extended
   p   primary partition (1-4)
                          p
Partition number (1-4):  
                         1
First cylinder (1-33888, default 1):  
                         1
Last cylinder or +size or +sizeM or +sizeK (1-33888, default 33888):  
                         33888

Command (m for help):  
                         p

Disk /dev/iscsi/fra1/part: 35.5 GB, 35534143488 bytes
64 heads, 32 sectors/track, 33888 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

               Device Boot      Start         End      Blocks   Id  System
/dev/iscsi/fra1/part1               1       33888    34701296   83  Linux

Command (m for help):  
                         w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

增加用户GRID和ORACLE

Create Groups and User for Grid Infrastructure

Lets start this section by creating the recommended OS groups and user for Grid Infrastructure on both Oracle RAC nodes:

[root@racnode1 ~]#  
                                 groupadd -g 1000 oinstall
[root@racnode1 ~]#  
                                 groupadd -g 1200 asmadmin
[root@racnode1 ~]#  
                                 groupadd -g 1201 asmdba
[root@racnode1 ~]#  
                                 groupadd -g 1202 asmoper
[root@racnode1 ~]#  
                                 useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid

[root@racnode1 ~]#  
                                 id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
                              

Set the password for the grid account:

[root@racnode1 ~]#  
                                 passwd grid
Changing password for user grid.
New UNIX password:  
                                 xxxxxxxxxxx
Retype new UNIX password:  
                                 xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
                              

su - grid

[grid@racnode1 ~]$ more .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
# ---------------------------------------------------
# .bash_profile
# ---------------------------------------------------
# OS User:      grid
# Application:  Oracle Grid Infrastructure
# Version:      Oracle 11g release 2
# ---------------------------------------------------

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

alias ls="ls -FA"

# ---------------------------------------------------
# ORACLE_SID
# ---------------------------------------------------
# Specifies the Oracle system identifier (SID)
# for the Automatic Storage Management (ASM)instance
# running on this node.
#  
                                      
#Each RAC node must have a unique ORACLE_SID.
#  
                                      
#(i.e. +ASM1, +ASM2,...)
# ---------------------------------------------------
ORACLE_SID=+ASM1; export ORACLE_SID

# ---------------------------------------------------
# JAVA_HOME
# ---------------------------------------------------
# Specifies the directory of the Java SDK and Runtime
# Environment.
# ---------------------------------------------------
JAVA_HOME=/usr/local/java; export JAVA_HOME

# ---------------------------------------------------
# ORACLE_BASE
# ---------------------------------------------------
# Specifies the base of the Oracle directory structure
# for Optimal Flexible Architecture (OFA) compliant
# installations. The Oracle base directory for the
# grid installation owner is the location where
# diagnostic and administrative logs, and other logs
# associated with Oracle ASM and Oracle Clusterware
# are stored.
# ---------------------------------------------------
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

# ---------------------------------------------------
# ORACLE_HOME
# ---------------------------------------------------
# Specifies the directory containing the Oracle
# Grid Infrastructure software. For grid
# infrastructure for a cluster installations, the Grid
# home must not be placed under one of the Oracle base
# directories, or under Oracle home directories of
# Oracle Database installation owners, or in the home
# directory of an installation owner. During
# installation, ownership of the path to the Grid
# home is changed to root. This change causes
# permission errors for other installations.
# ---------------------------------------------------
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

# ---------------------------------------------------
# ORACLE_PATH
# ---------------------------------------------------
# Specifies the search path for files used by Oracle
# applications such as SQL*Plus. If the full path to
# the file is not specified, or if the file is not
# in the current directory, the Oracle application
# uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu.
# ---------------------------------------------------
ORACLE_PATH=/u01/app/oracle/common/oracle/sql; export ORACLE_PATH

# ---------------------------------------------------
# SQLPATH
# ---------------------------------------------------
# Specifies the directory or list of directories that
# SQL*Plus searches for a login.sql file.
# ---------------------------------------------------
# SQLPATH=/u01/app/common/oracle/sql; export SQLPATH

# ---------------------------------------------------
# ORACLE_TERM
# ---------------------------------------------------
# Defines a terminal definition. If not set, it
# defaults to the value of your TERM environment
# variable. Used by all character mode products.
# ---------------------------------------------------
ORACLE_TERM=xterm; export ORACLE_TERM

# ---------------------------------------------------
# NLS_DATE_FORMAT
# ---------------------------------------------------
# Specifies the default date format to use with the
# TO_CHAR and TO_DATE functions. The default value of
# this parameter is determined by NLS_TERRITORY. The
# value of this parameter can be any valid date
# format mask, and the value must be surrounded by
# double quotation marks. For example:
#
#         NLS_DATE_FORMAT = "MM/DD/YYYY"
#
# ---------------------------------------------------
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

# ---------------------------------------------------
# TNS_ADMIN
# ---------------------------------------------------
# Specifies the directory containing the Oracle Net
# Services configuration files like listener.ora,
# tnsnames.ora, and sqlnet.ora.
# ---------------------------------------------------
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

# ---------------------------------------------------
# ORA_NLS11
# ---------------------------------------------------
# Specifies the directory where the language,
# territory, character set, and linguistic definition
# files are stored.
# ---------------------------------------------------
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

# ---------------------------------------------------
# PATH
# ---------------------------------------------------
# Used by the shell to locate executable programs;
# must include the $ORACLE_HOME/bin directory.
# ---------------------------------------------------
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH

# ---------------------------------------------------
# LD_LIBRARY_PATH
# ---------------------------------------------------
# Specifies the list of directories that the shared
# library loader searches to locate shared object
# libraries at runtime.
# ---------------------------------------------------
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

# ---------------------------------------------------
# CLASSPATH
# ---------------------------------------------------
# Specifies the directory or list of directories that
# contain compiled Java classes.
# ---------------------------------------------------
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

# ---------------------------------------------------
# THREADS_FLAG
# ---------------------------------------------------
# All the tools in the JDK use green threads as a
# default. To specify that native threads should be
# used, set the THREADS_FLAG environment variable to
# "native". You can revert to the use of green
# threads by setting THREADS_FLAG to the value
# "green".
# ---------------------------------------------------
THREADS_FLAG=native; export THREADS_FLAG

# ---------------------------------------------------
# TEMP, TMP, and TMPDIR
# ---------------------------------------------------
# Specify the default directories for temporary
# files; if set, tools that create temporary files
# create them in one of these directories.
# ---------------------------------------------------
export TEMP=/tmp
export TMPDIR=/tmp

# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022

另一节点修改一ORACLE_SID即可

Create Groups and User for Oracle Database Software

Next, create the the recommended OS groups and user for the Oracle database software on both Oracle RAC nodes:

[root@racnode1 ~]#  
                                 groupadd -g 1300 dba
[root@racnode1 ~]#  
                                 groupadd -g 1301 oper
[root@racnode1 ~]#  
                                 useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle

[root@racnode1 ~]#  
                                 id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
                              

Set the password for the oracle account:

[root@racnode1 ~]#  
                                 passwd oracle
Changing password for user oracle.
New UNIX password:  
                                 xxxxxxxxxxx
Retype new UNIX password:  
                                 xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
                              

[oracle@racnode2 ~]$ more .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
# ---------------------------------------------------
# .bash_profile
# ---------------------------------------------------
# OS User:      oracle
# Application:  Oracle Database Software Owner
# Version:      Oracle 11g release 2
# ---------------------------------------------------

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

alias ls="ls -FA"

# ---------------------------------------------------
# ORACLE_SID
# ---------------------------------------------------
# Specifies the Oracle system identifier (SID) for
# the Oracle instance running on this node.
#  
                                      
#Each RAC node must have a unique ORACLE_SID.
#  
                                      
#(i.e. racdb1, racdb2,...)
# ---------------------------------------------------
ORACLE_SID=racdb2; export ORACLE_SID

# ---------------------------------------------------
# ORACLE_UNQNAME
# ---------------------------------------------------
# In previous releases of Oracle Database, you were
# required to set environment variables for
# ORACLE_HOME and ORACLE_SID to start, stop, and
# check the status of Enterprise Manager. With
# Oracle Database 11g release 2 (11.2) and later, you
# need to set the environment variables ORACLE_HOME
# and ORACLE_UNQNAME to use Enterprise Manager.
# Set ORACLE_UNQNAME equal to the database unique
# name.
# ---------------------------------------------------
ORACLE_UNQNAME=racdb; export ORACLE_UNQNAME

# ---------------------------------------------------
# JAVA_HOME
# ---------------------------------------------------
# Specifies the directory of the Java SDK and Runtime
# Environment.
# ---------------------------------------------------
JAVA_HOME=/usr/local/java; export JAVA_HOME

# ---------------------------------------------------
# ORACLE_BASE
# ---------------------------------------------------
# Specifies the base of the Oracle directory structure
# for Optimal Flexible Architecture (OFA) compliant
# database software installations.
# ---------------------------------------------------
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

# ---------------------------------------------------
# ORACLE_HOME
# ---------------------------------------------------
# Specifies the directory containing the Oracle
# Database software.
# ---------------------------------------------------
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME

# ---------------------------------------------------
# ORACLE_PATH
# ---------------------------------------------------
# Specifies the search path for files used by Oracle
# applications such as SQL*Plus. If the full path to
# the file is not specified, or if the file is not
# in the current directory, the Oracle application
# uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu.
# ---------------------------------------------------
ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_PATH

# ---------------------------------------------------
# SQLPATH
# ---------------------------------------------------
# Specifies the directory or list of directories that
# SQL*Plus searches for a login.sql file.
# ---------------------------------------------------
# SQLPATH=/u01/app/common/oracle/sql; export SQLPATH

# ---------------------------------------------------
# ORACLE_TERM
# ---------------------------------------------------
# Defines a terminal definition. If not set, it
# defaults to the value of your TERM environment
# variable. Used by all character mode products.
# ---------------------------------------------------
ORACLE_TERM=xterm; export ORACLE_TERM

# ---------------------------------------------------
# NLS_DATE_FORMAT
# ---------------------------------------------------
# Specifies the default date format to use with the
# TO_CHAR and TO_DATE functions. The default value of
# this parameter is determined by NLS_TERRITORY. The
# value of this parameter can be any valid date
# format mask, and the value must be surrounded by
# double quotation marks. For example:
#
#         NLS_DATE_FORMAT = "MM/DD/YYYY"
#
# ---------------------------------------------------
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

# ---------------------------------------------------
# TNS_ADMIN
# ---------------------------------------------------
# Specifies the directory containing the Oracle Net
# Services configuration files like listener.ora,
# tnsnames.ora, and sqlnet.ora.
# ---------------------------------------------------
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

# ---------------------------------------------------
# ORA_NLS11
# ---------------------------------------------------
# Specifies the directory where the language,
# territory, character set, and linguistic definition
# files are stored.
# ---------------------------------------------------
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

# ---------------------------------------------------
# PATH
# ---------------------------------------------------
# Used by the shell to locate executable programs;
# must include the $ORACLE_HOME/bin directory.
# ---------------------------------------------------
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH

# ---------------------------------------------------
# LD_LIBRARY_PATH
# ---------------------------------------------------
# Specifies the list of directories that the shared
# library loader searches to locate shared object
# libraries at runtime.
# ---------------------------------------------------
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

# ---------------------------------------------------
# CLASSPATH
# ---------------------------------------------------
# Specifies the directory or list of directories that
# contain compiled Java classes.
# ---------------------------------------------------
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

# ---------------------------------------------------
# THREADS_FLAG
# ---------------------------------------------------
# All the tools in the JDK use green threads as a
# default. To specify that native threads should be
# used, set the THREADS_FLAG environment variable to
# "native". You can revert to the use of green
# threads by setting THREADS_FLAG to the value
# "green".
# ---------------------------------------------------
THREADS_FLAG=native; export THREADS_FLAG

# ---------------------------------------------------
# TEMP, TMP, and TMPDIR
# ---------------------------------------------------
# Specify the default directories for temporary
# files; if set, tools that create temporary files
# create them in one of these directories.
# ---------------------------------------------------
export TEMP=/tmp
export TMPDIR=/tmp

# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022

另一节点修改相应的ORACLE_SID即可

Verify That the User nobody Exists

Before installing the software, complete the following procedure to verify that the user nobody exists on both Oracle RAC nodes:

 

  1. To determine if the user exists, enter the following command:
    #  
                                         id nobody
    uid=99(nobody) gid=99(nobody) groups=99(nobody)
                                      

    If this command displays information about the nobody user, then you do not have to create that user.

  2. If the user nobody does not exist, then enter the following command to create it:
    #  
                                         /usr/sbin/useradd nobody
                                      
  3. Repeat this procedure on all the other Oracle RAC nodes in the cluster.

[root@racnode1 ~]#  
                                 mkdir -p /u01/app/grid
[root@racnode1 ~]#  
                                 mkdir -p /u01/app/11.2.0/grid
[root@racnode1 ~]#  
                                 chown -R grid:oinstall /u01
[root@racnode1 ~]#  
                                 mkdir -p /u01/app/oracle
[root@racnode1 ~]#  
                                 chown oracle:oinstall /u01/app/oracle
[root@racnode1 ~]#  
                                 chmod -R 775 /u01
两边执行

Set Resource Limits for the Oracle Software Installation Users

/etc/security/limits.conf

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

/etc/pam.d/login
添加一行

session    required     pam_limits.so


/etc/profile添加如下

 if [ $USER = "oracle" ] || [ $USER = "grid" ]; then      
 if [ $SHELL = "/bin/ksh" ]; then         
 ulimit -p 16384         
 ulimit -n 65536     
 else         
 ulimit -u 16384 -n 65536     
 fi     
 umask 022
 fi


配置内核参数

/etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576

[root@racnode1 ~]#  
                                   sysctl -p

安装OPENFILER,只有一点要说明在配允许访问地址IP时要写IP段不要写单个IP,否则在使用ISCSIADM命令时看不到结果输出

EG.192.168.1.35-->192.168.1.0(代表192.168.1.1-192.168.1.254)

使用UDEV固定磁盘做与映射关系

解压后运行GRID文件夹里的安装文件

(忽略的报错)

CVU预先检查错误

增加ASM磁盘

安装数据库

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值