Preparations for Oracle 10g RAC installation and deployment

Source: Internet
Author: User

I. Basic Environment requirements
System Environment:
System Version: RHEL5U8 x86_64
Oracle version: ORACLE 10.2.1
IP address
Odb1 192.168.100.144
192.168.101.144
Odb2 192.168.100.143
192.168.101.143
Disable Selinux/iptables on the server

Ii. Preparations
Modify host names of two computers
Odb1 odb1-priv odb1-vip
Obd2 odb2-priv odb2-vip
Configure the yum source code to ensure that all data packets are fully installed. javaslerac most hates less packets and ensures that most of the packet problems are caused by rpm packets.
Create two groups of oracle users and oinstall dba on two machines respectively
Prepare six shared disks. In this experiment, we can use virtualbox for simulation. in the environment, we can use EMC netapp for planning.
Data x 2 10 GB data disk size based on business
Ocr × 2 512 M cluster Information Registration Disk
Virdisk x 3 512 M
Note that virtualdis is not supported in oracle11g and only asm is supported.
Do not create hard disks in the format. You only need to configure and test the formatting on one machine.
Configure two-way SSH password-free authentication,
SSH requires two machines to connect to each other, and SSH itself is required to connect, otherwise an error will be reported on the oracle cluster node
To create a raw device, you must modify the two configuration files on the node of the RAC machine.
You also need to pay attention to the raw permission issues chmodchown
Note: The raw device port numbers on both sides must be the same. Otherwise, an error will be reported,
For example, if RAW1 on node A corresponds to port1, then RAW1 on Node B corresponds to port1, and the port cannot be incorrect. Otherwise, an error will occur.
Modify the system parameter file and configure the environment variables of oracle users

Iii. Preparations for implementation
1. Create an oracle user and create two nodes with the same configuration
[Root @ rac2 ~] # Groupadd oinstall
[Root @ rac2 ~] # Groupadd dba
[Root @ rac2 ~] # Useradd-d/home/oracle-g oinstall-G dba-s/bin/bash oracle
[Root @ rac2 ~] # Echo "123.com" | passwd -- stdin oracle
[Root @ rac1 oracle] # echo "123.com" | passwd -- stdin oracle
Changing password foruser oracle.
Passwd: all authentication tokens updated successfully.
[Root @ rac1 oracle] #
2. Modify the computer name and the hosts file
[Root @ odb1 ~] # Hostname
Odb1
Two ways to modify a computer name
Temporary modification: hostnameodb1
Permanent modification: vim/etc/sysconfig/network
The hots file needs to be modified. The dual-node authentication requires that the two machines have the same configuration, and the other machine can pass scp directly.
[Root @ odb1 ~] # Cat/etc/hosts
127.0.0.1 localhost
192.168.100.144 odb1
192.168.100.143 odb2
192.168.101.144 odb1-priv
Odb2-priv 192.168.101.143
192.168.100.252 odb1-vip
192.168.100.253 odb2-vip
[Root @ odb1 ~] #
3. Modify the yum source server. We will use the local yum server. The configuration of the two machines is the same. scp can be used on the new machine.
Mount/dev/cdrom/mnt
The following attachment is the local source configuration of yum, because the RHEL5.x series is difficult to configure the Internet yum, And the rpm installation is even more scary. Only local yum configuration is supported.
[Root @ odb1 ~] # Cat/etc/yum. repos. d/opensource. repo
[Opensource]
Name = opensource
Baseurl = file: // mnt/Server
Enabled = 1
Gpgcheck = 0
[Opensource1]
Name = opensource1
Baseurl = file: // mnt/VT
Enabled = 1
Gpgcheck = 0
[Opensource2]
Name = opensource2
Baseurl = file: // mnt/Cluster
Enabled = 1
Gpgcheck = 0
[Root @ odb1 ~] #
4. shared storage disk configurations are simulated here. Therefore, we can add hard disk sharing on the first node, and then the second node can be used.
Several LVM commands used: pvcreate cgcreate lvcreate
Format required
The configuration of bare devices is modified as follows, and the two machines are configured in the same way;
Root @ rac1/home] # cat/etc/sysconfig/rawdevices
# Raw device bindings
# Format: <rawdev> <major> <minor>
# <Rawdev> <blockdev>
# Example:/dev/raw/raw1/dev/sda1
#/Dev/raw/raw2 8 5
/Dev/raw/raw1/dev/sdb1
/Dev/raw/raw2/dev/sdc1
/Dev/raw/raw3/dev/sdd1
/Dev/raw/raw4/dev/sde1
/Dev/raw/raw5/dev/sdf1
/Dev/raw/raw6/dev/sdg1
/Dev/raw/raw7/dev/sdh1
[Root @ rac1/home] #
[Root @ rac1/home] # cat/etc/udev/rules. d/60-raw.rules
# Enter raw device bindings here.
#
# An example wocould be:
# ACTION = "add", KERNEL = "sda", RUN + = "/bin/raw/dev/raw/raw1% N"
# To bind/dev/raw/raw1 to/dev/sda, or
# ACTION = "add", ENV {MAJOR} = "8", ENV {MINOR} = "1 ", RUN + = "/bin/raw/dev/raw/raw2% M % m"
# To bind/dev/raw/raw2 to the device with major 8, minor
ACTION = "add", KERNEL = "sdb", RUN + = "/bin/raw/dev/raw/raw1% N"
ACTION = "add", KERNEL = "sdc", RUN + = "/bin/raw/dev/raw/raw2% N"
ACTION = "add", KERNEL = "sdd", RUN + = "/bin/raw/dev/raw/raw3% N"
ACTION = "add", KERNEL = "sde", RUN + = "/bin/raw/dev/raw/raw4% N"
ACTION = "add", KERNEL = "sdf", RUN + = "/bin/raw/dev/raw/raw5% N"
ACTION = "add", KERNEL = "sdg", RUN + = "/bin/raw/dev/raw/raw6% N"
ACTION = "add", KERNEL = "sdh", RUN + = "/bin/raw/dev/raw/raw7% N"
[Root @ rac1/home] #
Restart service
[Root @ rac1/home] #/etc/rc. d/init. d/rawdevices restart
Assigning devices:
/Dev/raw/raw1 -->/dev/sdb1
/Dev/raw/raw1: bound to major 8, minor 17
/Dev/raw/raw2 -->/dev/sdc1
/Dev/raw/raw2: bound to major 8, minor 33
/Dev/raw/raw3 -->/dev/sdd1
/Dev/raw/raw3: bound to major 8, minor 49
/Dev/raw/raw4 -->/dev/sde1
/Dev/raw/raw4: bound to major 8, minor 65
/Dev/raw/raw5 -->/dev/sdf1
/Dev/raw/raw5: bound to major 8, minor 81
/Dev/raw/raw6 -->/dev/sdg1
/Dev/raw/raw6: bound to major 8, minor 97
/Dev/raw/raw7 -->/dev/sdh1
/Dev/raw/raw7: bound to major 8, minor 113
Done
[Root @ rac1/home] #
Authorization is required on both nodes
[Root @ odb1 ~] # Chown-R root: oinstall/dev/raw [1-2]
[Root @ odb1 ~] # Chown-R oracle: oinstall/dev/raw [3-5]
[Root @ odb1 ~] # Chown-R oracle: dba/dev/raw [6-8]
[Root @ odb1 ~] # Chmod 660/dev/raw *
[Root @ odb1 ~] # Vim/etc/udev/rules. d/50-udev.rules
KERNEL = "raw [1-7]", OWNER = "oracle" GROUP = "dba", MODE = "0660"
5. Configure two-way SSH Authentication
Perform the following three steps on both the RAC nodes:
[Oracle @ odb1 ~] $ Ssh-keygen-t rsa one-way carriage return
[Oracle @ odb1 ~] $ Cd. ssh/
[Oracle @ odb1. ssh] $ ssh-copy-id-I id_rsa.pub oracle@192.168.100.143
[Oracle @ odb1. ssh] $ ssh-copy-id-I id_rsa.pub oracle@192.168.100.144
Note that, after the configuration is complete, you need to manually connect to the test by using SSH to ensure the normal operation.
Because if the node is not installed during the RAC node check, an error is reported.
The two nodes are operated under the oracle user
Sshodb1
Sshodb2
Sshodb1-priv
Sshodb2-priv
6. yum packages required for oracle Installation
Yum-y installinstallcompat-db. * binutils-devel. * control-center. * control-center-devel. * control-center. * gcc-c ++ glibc-utils glibc. * glibc-common. * glibc-devel. * glibc-headers. * compat-glibc. * glibc-common libstdc ++. * libstdc ++-devel. * libstdc ++ 44-devel. * makesetarch installcompat-db. * compat-db binutils control-center gcc-c ++ glibc-devel glibc-common libstdc ++-devel makeopenmotif setarch libaio compat-libstdc ++ compat-gcccompat -libXp openmotif22 compat-db
7. Configure Environment Variables
Configure Environment Variables
Su-oracle
The configurations of vim. bashrc nodes are identical. You only need to modify the SID.
ExportORACLE_BASE =/u01/app/oracle
ExportORA_CRS_HOME = $ ORACLE_BASE/product/10.2.0/crs_1
ExportORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
ExportPATH = $ ORACLE_HOME/bin: $ ORA_CRS_HOME/bin: $ PATH
ExportORACLE_OWNER = oracle
ExportORACLE_SID = odb1
ExportORACLE_TERM = vt100
ExportTHREADS_FLAG = native
ExportLD_LIBRARY_PATH = $ ORACLE_HOME/lib: $ LD_LIBRARY_PATH
ExportLANG = en_US
Umask022
8. Create an environment variable node. Both nodes must be created.
[Root @ odb1 ~] # Mkdir/u01
[Root @ odb1 ~] # Chown oracle: oinstall/u01/-R
[Oracle @ odb1 ~] $ Mkdir $ ORACLE_BASE/admin-p
[Oracle @ odb1 ~] $ Mkdir-p $ ORACLE_HOME
[Oracle @ odb1 ~] $ Mkdir-p $ ORA_CRS_HOME
[Oracle @ odb1 ~] $ Mkdir-p $ ORACLE_BASE/oradata/r10g
9. Modify the maximum number of connections file of oracle (both nodes need to be modified)
Cat/etc/security/limits.com
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
10. Add the pam Authentication Module for oracle
Cat/etc/pam. d/login
Session required/lib/security/pam_limits.so
11. Modify the kernel parameters and configure both nodes.
Vim/etc/sysctl. conf
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 1048576
Net. core. rmem_max = 1048576
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
Sysctl-p takes effect
12. Modify the hangcheck time Kernel Parameters and install both nodes.
Add the following line to the end of vim/etc/modprobe. conf:
Options hangcheck-timer hangcheck_tick = 30 hangcheck_margin = 180
Then it takes effect: modprobe-vhangcheck-timer
13. Set up your own NTP time server or your own inetrnet Time Server
Ntpdate ntp. api. bz
Check my blog on building an NTP time server;
The time server Synchronizes time on an hourly basis. For more information, see synchronize time using the NTP server.
Ontab-e
* 1 *** ntpdate-s ntp. api. bz
Now that the Environment configuration is ready, the RAC installation is available in the http://www.bkjia.com/Linux/2013-09/89664tm

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.