11gR203RAConLinux Install

User Accounts
==============
userdel oracle
userdel grid
groupdel oinstall
groupdel dba
groupdel asmadmin
groupdel asmdba
groupdel asmoper


rm -fr /home/oracle
rm -fr /home/grid




<create group>
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 asmadmin
/usr/sbin/groupadd -g 503 asmdba
/usr/sbin/groupadd -g 504 asmoper
/usr/sbin/groupadd -g 505 dba








<create user>
/usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba –d /home/grid/ grid
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba –d /home/oracle/ oracle




<set password>
passwd oracle
passwd grid
<<< 用新建的用户重新登录修改密码


o network
===============
#hostname
222.12.191.161 linuxcluster01
222.12.191.167 linuxcluster02




#oracle_vip
222.12.191.163 linuxcluster01-vip
222.12.191.169 linuxcluster02-vip


#oracle_private_ip1
172.16.5.9 linuxcluster01-prvi1
172.16.5.11 linuxcluster02-prvi1


#oracle_private_ip2
172.16.5.21 linuxcluster01-prvi2
172.16.5.23 linuxcluster02-prvi2


#oracle_scan_ip
222.12.191.165 linuxcluster01-scan










* DNS server <<< /etc/nsswitch.conf 
new:
hosts: files nis dns
old:
hosts: dns files nis


<<< After modifying the nsswitch.conf file, restart the nscd daemon
/sbin/service nscd restart






o Synchronizing the Time on ALL Nodes
====================================
more /etc/ntpd.conf
NTP with the -x






o Configuring Kernel Parameters
====================================
more /etc/sysctl.conf


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






NOTE: The latest information on kernel parameter settings for Linux Note:169706.1.


/sbin/sysctl -p   <<< Run the following as the root user to allow the new kernel parameters to be put in place:


NOTE: OUI checks the current settings for various kernel parameters to ensure they meet the minimum requirements for deploying Oracle RAC.






o Set shell limits for the oracle user (all node)
=================================================
more /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




more /etc/pam.d/login
session required pam_limits.so




more /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


<<< For the C shell (csh or tcsh)


more /etc/csh.login
if ( $USER = "oracle" || $USER = "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif


o create directory
========================================
mkdir -p /u01/sw/db
mkdir -p /u01/sw/psu
mkdir -p /u01/sw/patch
mkdir -p /u01/sw/rpm
chmod -R 777 /u01/sw 








<Oracle inventory 目录>
mkdir -p /u01/app/oraInventory


chown -R grid:oinstall /u01/app/oraInventory


chmod -R 775 /u01/app/oraInventory


<Grid Infrastructure BASE 目录>
mkdir –p /u01/app/grid


chown grid:oinstall /u01/app/grid


chmod -R 775 /u01/app/grid


<Grid Infrastructure Home 目录>
mkdir -p /u01/11.2.0/grid


chown -R grid:oinstall /u01/11.2.0/grid


chmod -R 775 /u01/11.2.0/grid


<Oracle Base 目录>
mkdir -p /u01/app/oracle


mkdir /u01/app/oracle/cfgtoollogs 


chown -R oracle:oinstall /u01/app/oracle


chmod -R 775 /u01/app/oracle


<Oracle Rdbms Home 目录>
mkdir -p /u01/app/oracle/product/11.2.0/db_1


chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1


chmod -R 775 /u01/app/oracle/product/11.2.0/db_1




o .bash_profile 
=====================
<<< grid
umask 022
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/11.2.0/grid
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export PS1=`hostname`:'$PWD'"$"




<<< oracle
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export PS1=`hostname`:'$PWD'"$"






. .bash_profile






o Check OS Software Requirements
==================================
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel


* NOTE: Be sure to check on all nodes that the Linux Firewall and SE Linux is disabled.






o Prepare the shared storage
=============================


fdisk /dev/sdc
/sbin/partprobe


<ASMLib > (all node)
oracleasm-support-2.1.3-1.el5x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-92.1.17.0.2.el5-2.0.5-1.el5.x86_64.rpm


* NOTE: 
If using user and group separation for the installation,the ASMLib driver interface owner is 'grid' and the group to own the driver interface is 'asmadmin'. 
If only the Oracle user is performed, the owner will be 'oracle' and the group owner will be 'dba'.


/etc/init.d/oracleasm configure  <<< grid  asmadmin


<Mark the Shared Disks>


/usr/sbin/oracleasm createdisk disk_name device_partition_name
/usr/sbin/oracleasm listdisks
<<< other node
/usr/sbin/oracleasm scandisks
/usr/sbin/oracleasm listdisks




o Setup SSH user equivalency
========================================
/u01/sw/db/sshUserSetup.sh -user grid -hosts "linuxcluster01 linuxcluster02" -advanced -noPromptPassphrase
/u01/sw/db/sshUserSetup.sh -user oracle -hosts "linuxcluster01 linuxcluster02" -advanced -noPromptPassphrase




o Oracle Grid Infrastructure Install
========================================


#xhost +
#su - grid
osdba : asmdba 
osoper: asmoper
osasm : asmadmin
cvuqdisk-....rpm


oraInstRoot.sh  <<< if this is the first installation of an Oracle product on this system
root.sh         <<< NOTE: DO NOT run root.sh at this time, we must first install the 11.2.0.2.2 GI PSU (Patch 12311357).






o Grid Infrastructure Home Patching
========================================
o RDBMS Software Install
========================================
dba,oper


o RAC Home Patching
========================================
o Run ASMCA to create diskgroups
========================================
#su - grid
cd /u01/11.2.0/grid/bin
./asmca


<<< add OCR mirror
ocrconfig -add +ORADATA
ocrcheck


o Run DBCA to create the database
========================================


o Recommended Postinstallation Tasks
========================================
Back Up the root.sh Script
Tune Semaphore Parameters
1. Calculate the minimum total semaphore requirements using the following formula:
2 * sum (process parameters of all database instances on the system) + overhead for background processes + system and other application requirements
2. Set semmns (total semaphores systemwide) to this total.
3. Set semmsl (semaphores for each set) to 250.
4. Set semmni (total semaphores sets) to semmns divided by semmsl, rounded up to the nearest multiple of 1024.


======
PSU
======


opatch
======================
unzip /u01/sw/patch/p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch version




auto patch
======================
As the Grid home owner execute
1、/home/grid/ocm.rsp
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /home/grid/ocm.rsp


usually the user root
2、To patch GI home and all Oracle RAC database homes of the same version
opatch auto /u01/sw/psu -ocmrf /home/grid/ocm.rsp     <<< restart crs
opatch auto /u01/sw/psu -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/grid/ocm.rsp   


<<</u01/11.2.0/grid/crs/install/crsconfig_params    <<< just only patch grid






manual patch
======================
1、Stop the CRS managed resources running from DB homes.


If this is a GI Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
If this is an Oracle Restart Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location>

Note:

You need to make sure that the Oracle ACFS file systems are unmounted (see Section 2.8) and all other Oracle processes are shutdown before you proceed. 




2、Run the pre root script.


If this is a GI Home, as the root user execute:

# <GI_HOME>/crs/install/rootcrs.pl -unlock
If this is an Oracle Restart Home, as the root user execute:

# <GI_HOME>/crs/install/roothas.pl -unlock






3、Apply the CRS patch using.


As the GI home owner execute:

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/sw/psu/13696251
As the GI home owner execute:

$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/sw/psu/13696216


4、Run the pre script for DB component of the patch.


As the database home owner execute:

$ /u01/sw/psu/13696251/custom/server/13696251/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME


5、Apply the DB patch.


As the database home owner execute:

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/sw/psu/13696251/custom/server/13696251
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/sw/psu/13696216


6、Run the post script for DB component of the patch.


As the database home owner execute:

$ /u01/sw/psu/13696251/custom/server/13696251/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME


7、Run the post script.


As the root user execute:

# /u01/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:

# /u01/11.2.0/grid/crs/install/rootcrs.pl -patch



select action,comments from registry$history;
bug 13342249


--For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:




cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> select * from registry$history;
SQL> QUIT



你可能感兴趣的:(11gR203RAConLinux Install)