Oracle-rac-11g-r2_install

Source: Internet
Author: User

ORACLE 11.2.0.3 RAC INSTALL
2013-06-09 __yoon
Mount Image:
Mkdir/media/disk
Mount/dev/cdrom/media/disk

Install all packages that Oracle-linux depends on:
Vi/etc/yum.repos.d/public-yum-el5.repo
[Oel5]
Name = Enterprise Linux 5.7 DVD
baseurl=file:///media/disk/server/
Gpgcheck=0
Enabled=1
Yum Install oracle-validated--execute and install dependent packages

To modify the hosts, configure the domain name:
Vi/etc/hosts
# don't remove the following line, or various programs
# that require network functionality would fail.
#127.0.0.1 Rac1 localhost.localdomain localhost
#::1 localhost6.localdomain6 Localhost6
127.0.0.1 localhost
192.168.228.161 Rac1
192.168.228.168 RAC1-VIP
1.1.1.161 Rac1-priv
192.168.228.162 RAC2
192.168.228.169 RAC2-VIP
1.1.1.162 Rac2-priv
192.168.228.170 Rac-scan

To add groups and users:
Groupadd-g Oinstall
Groupadd-g Asmadmin
Groupadd-g 1201 Asmdba
GROUPADD-G 1202 Asmoper
GROUPADD-G 1300 DBA
Groupadd-g 1301 Oper
Useradd-m-u 1100-g oinstall-g asmadmin,asmdba,asmoper-d/home/grid-s/bin/bash grid
Useradd-m-u 1101-g oinstall-g dba,oper,asmdba-d/home/oracle-s/bin/bash Oracle

Create a Oralce, grid password:
ID Oracle
ID Grid
passwd Oracle
passwd grid

To create the installation directory:
Mkdir-p/u01/app/grid/11.2.0
Chown-r grid:oinstall/u01
Mkdir-p/u01/app/oracle/11.2.0/db_1
Chown-r oracle:oinstall/u01/app/oracle
Chmod-r 775/u01

Configure Server Time synchronization: (10g needs to be configured, not NTP configured in 11GR2)
Rac1:
Vi/etc/ntp.conf
Server 127.127.1.0
Fudge 127.127.1.0 Stratum 11
Driftfile/var/lib/ntp/drift
Broadcastdelay 0.008
RAC2:
Vi/etc/ntp.conf
Server 192.168.228.161 prefer--192.168.228.161 the IP address of the primary node
Driftfile/var/lib/ntp/drift
Broadcastdelay 0.008
/ETC/INIT.D/NTPD Restart--restart

Configure SSH: (in 10g need to configure SSH communication, in 11g R2 new features no need to configure SSH)
In Rac1, RAC2:
Su-oracle
mkdir ~/.ssh
SSH-KEYGEN-T RSA
Ssh-keygen-t DSA
In Rac1:
Cat ~/.ssh/id_rsa.pub >>/.ssh/authorized_keys
Cat ~/.ssh/id_dsa.pub >>/.ssh/authorized_keys
SSH rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
SSH rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
SCP ~/.ssh/authorized_keys Rac2:~/.ssh/authorized_keys
In Rac1:
SSH Rac1 Date
SSH RAC2 Date
SSH Rac1-priv Date
SSH Rac2-priv Date
In RAC2:
SSH Rac1 Date
SSH RAC2 Date
SSH Rac1-priv Date
SSH Rac2-priv Date

Time synchronization, Configuration CTSS: (no configuration required in 11g R2)
In Rac1, RAC2:
/sbin/service ntpd Stop
Chkconfig ntpd off
Mv/etc/ntp.conf/etc/ntp.conf.original
Chkconfig ntpd--list
Rm/var/run/ntpd.pid
To confirm that the CTSSD is active after installation, use the grid user input:
$ crsctl Check CTSS

Configure the. Bash_profile under the grid:
Rac1:
Export ORACLE_SID=+ASM1
#export oracle_sid=+asm2
Export Oracle_base=/u01/app/grid
Export oracle_home=/u01/app/grid/11.2.0
Export path= $ORACLE _home/bin: $PATH:/usr/local/bin/:.
Export Temp=/tmp
Export Tmp=/tmp
Export Tmpdir=/tmp
Umask 022
RAC2:
#export ORACLE_SID=+ASM1
Export ORACLE_SID=+ASM2
Export Oracle_base=/u01/app/grid
Export oracle_home=/u01/app/grid/11.2.0
Export path= $ORACLE _home/bin: $PATH:/usr/local/bin/:.
Export Temp=/tmp
Export Tmp=/tmp
Export Tmpdir=/tmp
Umask 022

configure the. Bash_profile under Oracle:
Rac1 and RAC2: note SID
Oracle_sid=yoon1; Export Oracle_sid
#ORACLE_SID =yoon2; Export Oracle_sid
Oracle_unqname=yoon; Export Oracle_unqname
Java_home=/usr/local/java; Export Java_home
Oracle_base=/u01/app/oracle; Export Oracle_base
Oracle_home= $ORACLE _base/11.2.0/db_1; Export Oracle_home
Oracle_term=xterm; Export Oracle_term
nls_date_format= "YYYY:MM:DD HH24:MI:SS"; Export Nls_date_format
Nls_lang=american_america. ZHS16GBK; Export Nls_lang
tns_admin= $ORACLE _home/network/admin; Export Tns_admin
ora_nls11= $ORACLE _home/nls/data; Export ORA_NLS11
Path=.:${java_home}/bin:${path}: $HOME/bin: $ORACLE _home/bin: $ORA _crs_home/bin
Path=${path}:/usr/bin:/bin:/usr/bin/x11:/usr/local/bin
Export PATH
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= $ORACLE _home/jre
Classpath=${classpath}: $ORACLE _home/jlib
Classpath=${classpath}: $ORACLE _home/rdbms/jlib
Classpath=${classpath}: $ORACLE _home/network/jlib
Export CLASSPATH
threads_flag=native; Export Threads_flag
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

To turn off the firewall:
Service iptables Status
Service iptables Stop
Chkconfig iptables off
Chkconfig iptables--list

Install Asmlib:
oracleasm-2.6.18-274.0.0.0.1.el5-2.0.5-1.el5.x86_64.rpm
oracleasm-2.6.18-274.el5-2.0.5-1.el5.x86_64.rpm
oracleasm-support-2.1.7-1.el5.x86_64.rpm

Installation Configuration Oracleasm

/etc/init.d/oracleasm Configure
/etc/init.d/oracleasm Createdisk DATA/DEV/MAPPER/MPATH2P1
/etc/init.d/oracleasm Listdisks
/etc/init.d/oracleasm Scandisks

Under the grid User:

Execute./Runinstaller





































Execute under Oracle./runinstaller, install database software























Run ASMCA under the grid user to create an ASM disk group:

Su-grid

[[Email protected] ~] $asmca







Create a database under Oracle User:

Su-oracle

Executive DBCA

























Ok

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

Maclean Liu created the script:
# # # #udev Create a bare device script #######
For i in B c D E F g h i j K;
Do
echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id-g-u-s%p\ ", result==\" ' scsi_id-g-u-s/block/sd$i ' \ ", Name=\ "Asm-disk$i\", owner=\ "oracle\", group=\ "oinstall\", mode=\ "0660\" "
Done
#############################

Udev way to create a bare device:
Vi/etc/udev/rules.d/60-raw.rules
action== "Add", kernel== "sdb1", run+= "/bin/raw/dev/raw/raw1%N"
action== "Add", kernel== "Sdb2", run+= "/bin/raw/dev/raw/raw2%N"
action== "Add", kernel== "sdb3", run+= "/bin/raw/dev/raw/raw3%N"
action== "Add", kernel== "raw*", owner== "Oracle", group== "Oinstall", mode== "0660"
Execute under Root:
Start_udev

After you create the ORACLEASM group, you cannot delete:
Service Oracleasm Stop
Service Oracleasm DELETEDISK/DEV/MAPPER/MPATH2P1
Service Oracleasm Start
/etc/init.d/oracleasm Scandisks
/etc/init.d/oracleasm Listdisks

ASM disks do not recognize several phenomena:

1) GI home directory or its subdirectory permissions error

2) Incorrect permissions for ASM disks

3) ASM instance is not started or ASM Disk Group is not on Mount

4) ASM Disk Group resources are not online

5) Incorrect permissions for Oracle users

6) Permissions error for Oracle ($ORACLE _home/bin) executable file
OK, then I will follow the above analysis of the results of one-by-one troubleshooting:

1) GI home directory or its subdirectory permissions error
[Email protected] ~]# Ls-ld/u01/app/11.2.0/grid/
Drwxr-x---The root oinstall 4096 APR 01:36/u02/app/11.2.0/grid/
I have a simple look at the GI home directory permissions, which is normal. Here want to remind everyone, some DBAs see such directory permissions intentionally or unconsciously, found that the owner is root, think that there is a problem, rightfully through the command to change, if only to change the permissions of the directory is not a problem, the fallback method is very simple, but once added-R parameter recursive way to the directory, The permissions of the child file are changed, and the fault occurs. Therefore, everyone in the operation of the time do not blindly to do not grasp the matter, master each operation behind the principle and its consequences, so that the full preparation of the fallback method.
2) Incorrect permissions for ASM disks
[Email protected] ~]# ls-l/dev/oracleasm/disks/
Total 0
BRW-RW----1 grid asmadmin 8, APR 01:22 ASMDISK1
BRW-RW----1 grid asmadmin 8, APR 01:22 ASMDISK2
If you find that the permissions are incorrect, modify the following command:
[Email protected] ~]# oracleasm configure-i
Or
[Email protected] ~]#/etc/init.d/oracleasm Configure
View after modification:
[Email protected] ~]# Oracleasm Configure
Oracleasm_enabled=true
Oracleasm_uid=grid
Oracleasm_gid=asmadmin
Oracleasm_scanboot=true
Oracleasm_scanorder= ""
Oracleasm_scanexclude= ""
3) ASM instance is not started or ASM Disk Group is not on Mount
4) ASM Disk Group resources are not online:
[Email protected] ~]$ crsctl stat res–t
---------------------------------------------------------------------
NAME TARGET State SERVER State_details
--------------------------------------------------------------------------------
Local Resources
---------------------------------------------------------------------
Ora. Data.dg
Online online Rac1
Ora. Flash.dg
Online online Rac1
Ora. Grid.dg
Online online Rac1
Ora. Listener.lsnr
Online online Rac1
Ora.asm
Online online Rac1 Started
Ora.ons
OFFLINE OFFLINE Rac1
---------------------------------------------------------------------
Cluster Resources
---------------------------------------------------------------------
Ora.cssd
1 Online Online Rac1
Ora.diskmon
1 OFFLINE OFFLINE
Ora.evmd
1 Online Online Rac1
5) Incorrect permissions for Oracle users
[[email protected] ~]# ID Oracle
UID=1101 (Oracle) gid=1000 (oinstall) groups=1000 (Oinstall), 1300 (DBA), 1301 (Oper), 1201 (ASMDBA)
Oracle users need to join the ASMDBA group, if found not joined, do the following:
[Email protected] ~]# gpasswd-a Oracle ASMDBA
Adding user Oracle to group ASMDBA
6) Permissions error for Oracle ($ORACLE _home/bin) executable file
[Email protected] ~]# su-oracle
[Email protected] ~]$ CD $ORACLE _home/bin
[Email protected] bin]$ ls-l Oracle
-rwsr-s--x 1 Oracle oinstall 232399473 APR 07:04 Oracle
The permissions for the Oracle executable file are incorrect:
[Email protected] ~]# cd/u01/app/oracle/product/11.2.0/dbhome_1/bin/
[Email protected] bin]# chown oracle.asmadmin Oracle
[Email protected] bin]# ls-l Oracle
-rwxr-x--x 1 Oracle asmadmin 232399473 APR 07:04 Oracle
[Email protected] bin]# chmod +s Oracle
[Email protected] bin]# ls-l Oracle
-rwsr-s--x 1 Oracle asmadmin 232399473 APR 07:04 Oracle

Oracle-rac-11g-r2_install

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.