Oracle Linux 5.5 (64bit) Installation of Oracle 11g R2 RAC graphic tutorial

Source: Internet
Author: User
Tags nameserver

Oracle Linux 5.5 (64bit) Installation of Oracle 11g R2 RAC graphic tutorial

1. Preparations before installation:
Operating System: Oracle Linux 5.5 64bit
Cluster software: GI 11.2.0.1
Database: database rdbms 11.2.0.1
2. Resource preparation:
Oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
Oracleasmlib-2.0.4-1.el5.x86_64.rpm
Oracleasm-support-2.1.7-1.el5.x86_64.rpm
Openfiler
3. Operating System installation:
DNS server: domain name
Db server: rac1 rac2
Storage server: openfiler
4. IP address planning:
DNS server: 192.168.192.168
Db node1: 192.168.192.169 public
192.168.192.171 VIP
10.0.0.1 private
Db node2: 192.168.192.170 public
192.168.192.172 VIP
10.0.0.2 private
Scan: 192.168.192.173
192.168.192.174
192.168.192.175
5. let's configure DNS first. I will not talk about what DNS is. The main function here is to introduce a new feature. After 11g R2, we will introduce the concept of SCAN IP, A virtual network service layer is added between the client and the database, that is, the scan ip address and the scap ip Listener. In the tnsnames. ora configuration file of the client, you only need to configure scan ip configuration information. The client accesses the database through scan ip and scan ip Listener. Compared with previous RAC versions, the advantage of using scan ip is that when the background RAC database adds or deletes nodes, the client configuration information does not need to be modified. You can configure SCAN by configuring the DNS server or GNS. Here we use DNS as an example to configure SCAN.
6. Install the DNS server
# Rpm-ivh bind-9.3.6-4.P1.el5_4.2.x86_64.rpm
# Rpm-ivh bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm
# Rpm-ivh caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm
Configure the main region
//
// Named. caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure
// Isc bind named (8) DNS server as a caching only nameserver
// (As a localhost DNS resolver only ).
//
// See/usr/share/doc/bind */sample/for example named configuration files.
//
// Do not edit this file-use system-config-bind or an editor
// To create named. conf-edits to this file will be lost on
// Caching-nameserver package upgrade.
//
Options {
Listen-on port 53 {any ;};
Listen-on-v6 port 53 {: 1 ;};
Directory "/var/named ";
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";


Allow-query {any ;};
Allow-query-cache {any ;};
};
Logging {
Channel default_debug {
File "data/named. run ";
Severity dynamic;
};
};
View localhost_resolver {
Match-clients {any ;};
Match-destinations {any ;};
Recursion yes;
Include "/etc/named. zones ";
};
Configure the Zone file and modify the/var/named/chroot/etc/named. rfc1912.zones file.
Add as follows:
Zone "192.168.192.in-addr. arpa" IN {
Type master;
File "192.168.192.in-addr. arpa ";
Allow-update {none ;};
};


Configure DNS forward/reverse resolution File
/Var/named/chroot/var/named directory
Vi localdomain. zone, configured
$ TTL 86400
@ In soa localhost root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns localhost
Localhost in a 127.0.0.1
Scan-cluster in a 192.168.192.173 (scan-ip is configured here)

Vi 192.168.168.in-addr-arpa (this will generate one by yourself)
$ TTL 86400
@ In soa localhost. root. localhost .(
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns localhost.
1 in ptr localhost.
173 in ptr scan-cluster.localdomain. (configure san IP here)
Start DNS
[Root @ dns named] #/etc/init. d/named status
Number of zones: 1
Debug level: 0
Xfers running: 0
Xfers deferred: 0
Soa queries in progress: 0
Query logging is OFF
Recursive clients: 0/1000
Tcp clients: 0/100
Server is up and running
The named (pid 18907) is running ..
Then, modify/etc/resolv. conf for the two rac nodes respectively.
Search localdomain
Nameserver 192.168.192.168
We have completed DNS configuration !!!!

7. Configure the hosts file on two nodes
[Root @ rac1 ~] # Cat/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 localhost. localdomain localhost
192.168.192.169 rac1.xupeng.com rac1
192.168.192.170 rac2.xupeng.com rac2
10.0.0.1 rac1-priv.xupeng.com rac1-priv
10.0.0.2 rac2-priv.xupeng.com rac2-priv
192.168.192.171 rac1-vip.xupeng.com rac1-vip
192.168.192.172 rac2-vip.xupeng.com rac2-vip

8. Install the environment package required for oracle 11g
This depends on how you install it. Some choose to install all-inclusive (when installing the operating system), and some prefer to install the packages required by oracle manually. This doesn't matter, I will use YUM source here, haha ....
This operation is performed on two nodes.
[Root @ rac1 ~] # Vi/etc/yum. repos. d/my. repo
[Oracle]
Name = OEL-$ releasever-Media
Baseurl = file: // mnt/Server
Gpgcheck = 0
Enable = 1
[Root @ rac1 ~] # Yum-y install compat-libstdc ++-33 elfutils-libelf-devel gcc-c ++ glibc-devel glibc-headers libaio-devel libstdc ++-devel sysstat unixODBC -devel

9. parameter configuration
The following operations must be configured on two nodes:
[Root @ rac1 ~] # Vi/etc/sysctl. conf
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmmax = 4294967295
Kernel. shmall = 2097152
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048586
Make the kernel parameters take effect. The configurations of sysctl-p are the same as those of a single instance.

[Root @ rac1 ~] # Vi/etc/security/limits. conf
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft nproc 2047
Grid hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft nproc 2047
Hard nproc 16384

[Root @ rac1 ~] # Vi/etc/pam. d/login
Session required/lib64/security/pam_limits.so

10. Added users and groups, and added oracle and grid users' ssh equality
Perform the following operations on the two nodes:
Groupadd-g 1000 oinstall
Groupadd-g 1300 dba
Groupadd-g 1301 running
Groupadd-g 1201 asmdba
Groupadd-g 1200 asmadmin
Groupadd-g 1202 asmoper
Useradd-m-u 1100-g oinstall-G asmadmin, asmdba, asmoper-d/home/grid-s/bin/bash-c "Grid Infrastructure Owner" grid
Passwd grid
Useradd-m-u 1101-g oinstall-G dba, role, asmdba-d/home/oracle-s/bin/bash-c "Oracle Software Owner" oracle
Passwd oracle
Set mutual trust. Remember that both oracle and grid users must set mutual trust.
Su-grid
Mkdir ~ /. Ssh
Ssh-keygen-t rsa
Ssh-keygen-t dsa
Perform the following operations on a node:
Cat ~ /. Ssh/id_rsa.pub>./. ssh/authorized_keys -- the public key exists in the authorized_keys file and is written to the local machine.
Cat ~ /. Ssh/id_dsa.pub>./. ssh/authorized_keys
Ssh rac2 cat ~ /. Ssh/id_rsa.pub> ~ /. Ssh/authorized_keys -- the public key of the second node is written to the local machine.
Ssh rac2 cat ~ /. Ssh/id_dsa.pub> ~ /. Ssh/authorized_keys
Scp ~ /. Ssh/authorized_keys secdb2 :~ /. Ssh/authorized_keys
Verify the two nodes separately
Ssh rac1 date
Ssh rac2 date
Ssh rac1-priv date
Ssh rac2-priv date

11. create directory and authorization
The following operations must be performed on both nodes:
Mkdir-p/u01/app/grid
Mkdir-p/u01/app/11.2.0/grid
Chown-R grid: oinstall/u01
Mkdir-p/u01/app/oracle
Chown oracle: oinstall/u01/app/oracle
Chmod-R 775/u01

12. Environment Variables
The following operations also need to be performed on two nodes. Here, we need to note that the SID of the grid user is different from that of the oracle user. If you understand the principle, there will be no errors.
[Root @ rac1 ~] # Su-grid
[Grid @ rac1 ~] $ Less. 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
ORACLE_SID = + ASM1; export ORACLE_SID
JAVA_HOME =/usr/local/java; export JAVA_HOME
ORACLE_BASE =/u01/app/grid; export ORACLE_BASE
ORACLE_HOME =/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_PATH =/u01/app/oracle/common/oracle/SQL; export ORACLE_PATH
ORACLE_TERM = xterm; export ORACLE_TERM
NLS_DATE_FORMAT = "YYYY-MM-DD HH24: MI: SS"; export NLS_DATE_FORMAT
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
PATH =$ {PATH }:/ usr/bin:/usr/bin/X11:/usr/local/bin
PATH =$ {PATH}:/u01/app/common/oracle/bin
Export PATH
LD_LIBRARY_PATH = $ ORACLE_HOME/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}: $ ORACLE_HOME/mongom/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}:/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
Export NLS_LANG = american_america.ZHS16GBK
Alias sqlplus = "rlwrap sqlplus"
Umask 022

[Grid @ rac1 ~] $ Su-oracle
Password:
[Oracle @ rac1 ~] $ Less. 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
ORACLE_SID = test1; export ORACLE_SID
ORACLE_UNQNAME = test; export ORACLE_UNQNAME
JAVA_HOME =/usr/local/java; export JAVA_HOME
ORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_PATH =/u01/app/common/oracle/SQL; export ORACLE_PATH
ORACLE_TERM = xterm; export ORACLE_TERM
NLS_DATE_FORMAT = "DD-MON-YYYY HH24: MI: SS"; export NLS_DATE_FORMAT
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
PATH =$ {PATH }:/ usr/bin:/usr/bin/X11:/usr/local/bin
PATH =$ {PATH}:/u01/app/common/oracle/bin
Export PATH
LD_LIBRARY_PATH = $ ORACLE_HOME/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}: $ ORACLE_HOME/mongom/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}:/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
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK
Umask 022

13. openfiler to divide buckets
This software is quite useful. It is actually a linux system installed in the vmware environment. We can just create a vmdisk. Configure to log on to a Web page https: // ip: 446

I have already divided it here, just look at the picture. As for the openfiler configuration, you should be able to learn it by yourself. It is very simple to look at the Mouse icon in the picture. You can do it in a little better way.

14. Configure ISCSI on two rac nodes respectively
[Root @ rac1 ~] # Yum-y install iscsi-initiator-utils
[Root @ rac1 ~] # Service iscsid start
[Root @ rac1 ~] # Chkconfig iscsid on
[Root @ rac1 ~] # Iscsiadm-m discovery-t sendtargets-p 192.168.192.111
Add an iscsi Disk:
[Root @ rac1 ~] # Iscsiadm-m node-T iqn.2006-01.com. openfiler: tsn.4849d1d582bc-p 192.168.192.111-l
Perform the following operations on one of the rac nodes:
[Root @ rac1 ~] # Fdisk/dev/sdb and so on. I need to format 3 disks here !!!
After that, let's take a look and use fdisk-l
[Root @ rac1 ~] # Fdisk-l
Disk/dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 25 200781 83 Linux
/Dev/sda2 26 547 4192965 82 Linux swap/Solaris
/Dev/sda3 548 3916 27061492 + 83 Linux
Disk/dev/sdb: 2113 MB, 2113929216 bytes
66 heads, 62 sectors/track, 1008 cylinders
Units = cylinders of 4092*512 = 2095104 bytes

Device Boot Start End Blocks Id System
/Dev/sdb1 10 1008 2043954 83 Linux

Disk/dev/sdc: 2113 MB, 2113929216 bytes
66 heads, 62 sectors/track, 1008 cylinders
Units = cylinders of 4092*512 = 2095104 bytes

Device Boot Start End Blocks Id System
/Dev/sdc1 10 1008 2043954 83 Linux

Disk/dev/sdd: 8556 MB, 8556380160 bytes
64 heads, 32 sectors/track, 8160 cylinders
Units = cylinders of 2048*512 = 1048576 bytes

Device Boot Start End Blocks Id System
/Dev/sdd1 10 8160 8346624 83 Linux
To another node
Enter partprobe to view the consistency between fdisk-l and other nodes !!

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • Next Page

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.