Folder-c-s1GB-alsilogic-t2 "drive: \ Folder \ file name. vmdk creates three 1G s respectively. two 2G2 instances. create, configure the virtual machine when creating a virtual machine, pay attention to delete the soft drive, add a network card, (select to only communicate with the host) in the Virtual Machine
I. Preparations before installation
1. Use the built-in VM tool to divide shared disks (vmvm version 6.0)
Enter the directory where the VM is located and use the following tools to divide the shared disk space
Vmware-vdiskmanager.exe-c-s 1 GB-a lsilogic-t 2 "drive letter: \ Folder \ file name. vmdk"
Create three 1G. Two 2G
2. Create and configure virtual machines
When creating a virtual machine, delete the soft drive and add a network card (select to only communicate with the host)
Add the following to the virtual machine configuration file (to add the created disk recently, both nodes must be added)
Scsi1.present = "TRUE"
Scsi1.virtualDev = "lsilogic"
Scsi1.sharedBus = "virtual"
Scsi1: 1. present = "TRUE"
Scsi1: 1. mode = "independent-persistent"
Scsi1: 1. filename = "drive letter: \ Folder \ file name. vmdk"
Scsi1: 1. deviceType = "plainDisk"
Scsi1: 2. present = "TRUE"
Scsi1: 2. mode = "independent-persistent"
Scsi1: 2. filename = "drive letter: \ Folder \ file name. vmdk"
Scsi1: 2. deviceType = "plainDisk"
Scsi1: 3. present = "TRUE"
Scsi1: 3. mode = "independent-persistent"
Scsi1: 3. filename = "drive letter: \ Folder \ file name. vmdk"
Scsi1: 3. deviceType = "plainDisk"
Scsi1: 4. present = "TRUE"
Scsi1: 4. mode = "independent-persistent"
Scsi1: 4. filename = "drive letter: \ Folder \ file name. vmdk"
Scsi1: 4. deviceType = "plainDisk"
Scsi1: 5. present = "TRUE"
Scsi1: 5. mode = "independent-persistent"
Scsi1: 5. filename = "drive letter: \ Folder \ file name. vmdk"
Scsi1: 5. deviceType = "plainDisk"
Disk. locking = "FALSE"
DiskLib. dataCacheMaxSize = "0"
DiskLib. datachemaxreadaheadsize = "0"
DiskLib. dataCacheMinReadAheadSize = "0"
DiskLib. dataCachePageSize = "4096"
DiskLib. maxUnsyncedWrites = "0"
3. Install the system (rhel5)
Use the default installation. Because both asm and ocfs2 require graphical configuration, a graphical interface must be provided. Disable SELINUX and firewall, and configure the system to start only ssh. syslog, network, and xfs services. Another system also makes the same settings. (when partitioning, do not partition the shared disk to keep it free)
4. Install the required package
# Rpm-ivh compat-db-4.2.52-5.1.i386.rpm
# Rpm-ivh libstdc ++ devel-4.1.1-52.el5.i386.rpm
# Rpm-ivh libgomp-4.1.1-52.el5.i386.rpm
# Rpm-ivh glibc-headers-2.5-12.i386.rpm
# Rpm-ivh glibc-devel-2.5-12.i386.rpm
# Rpm-ivh gcc-4.1.1-52.el5.i386.rpm
# Rpm-ivh gcc-c ++-4.1.1-52. el5.i386. rpm
# Rpm-ivh compat-gcc-34-3.4.6-4.i386.rpm
# Rpm-ivh compat-gcc-34-c + +-3.4.6-4. i386.rpm
# Rpm-ivh compat-libgcc-296-2.96-138.i386.rpm
# Rpm-ivh compat-libstdc ++-33-3.2.3-61.i386.rpm
# Rpm-ivh cpp-4.1.1-52.el5.i386.rpm
# Rpm-Uvh glibc-2.5-12.i386.rpm
# Rpm-ivh libaio-0.3.106-3.2.i386.rpm
# Rpm-ivh libXmu-1.0.2-5.i386.rpm
# Rpm-ivh libXp-1.0.0-8.i386.rpm
# Rpm-ivh make-3.81-1.1.i386.rpm
# Rpm-ivh openmotif22-2.2.3-18.i386.rpm
# Rpm-ivh openmotif-2.3.0-0.3.el5.i386.rpm
# Rpm-ivh setarch-2.0-1.1.i386.rpm
# Rpm-ivh sysstat-7.0.0-3.el5.i386.rpm
5. Create an Oracle user, create an SSH Trust, and edit parameters and variables.(The dual-node implementation is not mentioned below)
# Vi/etc/sysctl. conf
Kernel. sem = 250 32000 100 128
Kernel. shmmni = 4096
Kernel. shmall = 2097152
Kernel. shmmax = 278396928
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 262144
Net. core. rmem_max = 1048576
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
Log out of the original kernel. shmmax and kernel. shmall (the preceding values need to be changed)
# Sysctl-p
# Vi/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
# Vi/etc/pam. d/login
Session required/lib/security/pam_limits.so
# Vi/etc/modprobe. conf
Options hangcheck-timer hangcheck_tick = 30 hangcheck_margin = 180
# Vi/etc/rc. d/rc. local
/Sbin/modprobe hangcheck_timer
# Modprobe hangcheck_timer
# Grep hangcheck/var/log/messages | tail-2
# Vi/etc/hosts
127.0.0.1Localhost
192.168.0.243Rac1
192.168.0.245Rac2
192.168.0.143V-rac1
192.168.0.145V-rac2
10.0.0.243Int-rac1
10.0.0.245Int-rac2
# Ping-c 3 rac1
# Ping-c 3 rac2
# Ping-c 3 int-rac1
# Ping-c 3 int-rac2
# Groupadd oinstall
# Groupadd dba
# Useradd-u 200-g oinstall-G dba-d/home/oracle-r oracle-m
# Passwd oracle
# Id oracle
# Su-oracle
# Mkdir ~ /. Ssh
# Chmod 700 ~ /. Ssh
# Ssh-keygen-t rsa(Press ENTER)
# Ssh-keygen-t dsa(Press ENTER)
Run with node 1
# Cd ~ /. Ssh
# Cat id_rsa.pub> authorized_keys
# Cat id_dsa.pub> authorized_keys
# Scp authorized_keys rac2:/home/oracle/. ssh/
# Ssh rac2
# Cd. ssh
# Cat id_rsa.pub> authorized_keys
# Cat id_dsa.pub> authorized_keys
# Exit
Run with node 2
# Cd ~ /. Ssh
# Scp authorized_keys rac1:/home/oracle/. ssh/
Dual-node implementation
# Ssh-agent $ SHELL
# Ssh-add
# Ssh rac1 date
# Ssh rac2 date
# Vi/home/oracle/. bash_profile
Umask 022
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/10.2.0/rac_db
Export ORA_CRS_HOME = $ ORACLE_BASE/10.2.0/crs
Export ORACLE_PATH = $ ORACLE_BASE/common/oracle/SQL:.: $ ORACLE_HOME/rdbms/admin
Export ORACLE_SID = orcl1(Node 2 is ipvl2)
Export NLS_LANG = AMERICAN_AMERICA.zhs16gbk
Export NLS_DATE_FORMAT = "YYYY-MM-DD HH24: MI: SS"
Export PATH =. :$ {PATH }:$ HOME/bin: $ ORACLE_HOME/bin: $ ORA_CRS_HOME/bin
Export PATH =$ {PATH }:/ usr/bin:/usr/bin/X11:/usr/local/bin
Export PATH =$ {PATH}: $ ORACLE_BASE/common/oracle/bin
Export ORACLE_TERM = xterm
Export TNS_ADMIN = $ ORACLE_HOME/network/admin
Export ORA_NLS10 = $ ORACLE_HOME/nls/data
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib
Export LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}: $ ORACLE_HOME/mongom/lib
Export LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}:/lib:/usr/local/lib
Export CLASSPATH = $ ORACLE_HOME/JRE
Export CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/jlib
Export CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/rdbms/jlib
Export CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/network/jlib
Export THREADS_FLAG = native
Export TEMP =/tmp
Export TMPDIR =/tmp
Export DISPLAY = 192.168.0.244: 0.0
6. Switch to the root user to create the installation directory and assign permissions.
Mkdir-p/u01/app/oracle/10.2.0/rac_db
Mkdir-p/u01/app/oracle/10.2.0/crs
Chown-R root. oinstall/u01/
Chmod-R 775/u01/
Mkdir-p/u02/oradata/orcl
Chown-R oracle. dba/u02/
Chmod-R 775/u02/
7. Partition Node 1 to the disk
# Fdisk/dev/sdb(Same format:/dev/sdc/dev/sdd/dev/sde/dev/sdf /)
N> p> 1> press enter> w
Restart the two computers so that the other machine can recognize the formatted disk.
8. Install ocfs2 and configure ocfs2(Dual-node)
# Rpm-ivh ocfs2-tools-1.2.6-1.el5.i386.rpm
# Rpm-ivh ocfs2-2.6.18-8.el5-1.2.6-6.el5.i686.rpm(Package based on different kernels)
# Rpm-ivh ocfs2console-1.2.6-1.el5.i386.rpm
# Ocfs2consoleUse in X
# Vi/etc/init. d/o2cb
Delete the following lines
### BEGIN INIT INFO
# Provides: o2cb
# Required-Start: $ network
# Shocould-Start:
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Description: Load O2CB cluster services at system boot.
### END INIT INFO
#/Etc/init. d/o2cb offline ocfs2
#/Etc/init. d/o2cb unload
#/Etc/init. d/o2cb configure
In Node 1 format,/dev/sdb1 is ocfs2
# Mkfs. ocfs2-B 4 k-C 32 k-L oradatafiles/dev/sdb1
It is best to restart the dual-node, because it is a virtual environment, so it is worried about the slow synchronization of another Virtual Machine
# Mount-t ocfs2-o datavolume/dev/sdb1/u02/oradata/orcl
# Vi/etc/fstab
/Dev/sdb1/U02/oradata/orclOcfs2_ Netdev, datavolume0 0
# Vi/etc/sysconfig/o2cb
Os2cb_heartbeat_threshold = 601
9. Install asm and configure asm.
# Rpm-ivh oracleasm-support-2.0.4-1.el5.i386.rpm
# Rpm-ivh oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm(Package based on different kernels)
# Rpm-ivh oracleasmlib-2.0.3-1.el5.i386.rpm
#/Etc/init. d/oracleasm configure
Oracle, dba, y, y
Node 1 execution
#/Etc/init. d/oracleasm createdisk VOL1/dev/sdc1
#/Etc/init. d/oracleasm createdisk VOL2/dev/sdd1
#/Etc/init. d/oracleasm createdisk VOL3/dev/sde1
#/Etc/init. d/oracleasm createdisk VOL4/dev/sdf1
#/Etc/init. d/oracleasm listdisks
# Ls-l/dev/oracleasm/disks/
Node 2 execution
#/Etc/init. d/oracleasm scandisks
#/Etc/init. d/oracleasm listdisks
# Ls-l/dev/oracleasm/disks/
10. configure the NTPD server, or configure the two machines for the same time. Otherwise, there will be many problems during installation. We recommend that you install the time server for synchronization. in addition, when installing, monitoring the time of two machines may sometimes be much worse.
13. Use the root user to decompress and install
# Unzip 10201_clusterware_linux32.zip
# Unzip 10201_database_linux32.zip
2. Install clusterware and oracle
# Rpm-ivh clusterware/rpm/cvuqdisk-1.0.1-1.rpm
# Scp clusterware/rpm/cvuqdisk-1.0.1-1.rpm rac2:/opt/
Node 2 execution
Rpm/ivh/opt/cvuqdisk-1.0.1-1.rpm
Check the environment and run Node 1
# Su-oracle
# Cd clusterware/cluvfy
#./Runcluvfy. sh stage-pre crsinst-n rac1, rac2-verbose
ERROR:
Cocould not find a suitable set of interfaces for VIPs.
Result: Node connectivity check failed.
The error message returned by the virtual IP address.
Compat-gcc-7.3-2.96.128
Compat-gcc-c ++-7.3-2.96.128
Compat-libstdc ++-7.3-2.96.128
Compat-libstdc ++ devel-7.3-2.96.128
If the preceding package does not exist, an error is reported.
# Rpm-ivh compat-gcc-7.3-2.96.128.i386.rpm
# Rpm-ivh compat-libstdc +++-7.3-2.96.128.i386.rpm
# Rpm-ivh compat-libstdc ++ devel-7.3-2.96.128.i386.rpm
# Rpm-ivh compat-gcc-c +++-7.3-2.96.128.i386.rpm
Hardware check
#./Runcluvfy. sh stage-post hwos-n rac1, rac2-verbose
ERROR:
Cocould not find a suitable set of interfaces for VIPs.
Result: Node connectivity check failed.
There will still be virtual IP errors, which can be ignored
# Vi/etc/RedHat-release
Change version 5 to 4 because oracle10G does not support RHEL5 Installation
# Cd ..
#./RunInstaller
● Welcome:
Click [Next]
● Specify Inventory directory and credentials:
Inventory directory:/u01/app/oracle/oraInventory
Operating System group name: oinstall
Click [Next]
● Specify Home Details:
Name: datagrs10g_home
Location:/u01/app/oracle/10.2.0/crs(Manually change the CRS directory)
Click [Next]
● Product Specific Prerequisite Checks:
Click [Next]
● Specify Cluster Configuration:
Cluster Name: crs
--------------------------------------------------------
| Public Node Name | Private Node Name | Virtual Node Name |
--------------------------------------------------------
| Rac1 | int-rac1 | v-rac1 |
--------------------------------------------------------
| Rac2 | int-rac2 | v-rac2 |
--------------------------------------------------------
Click [Next]
● Specify Network Interface Usage:
--------------------------------------------------
| Interface Name | Subnet | Interface Type |
--------------------------------------------------
| Eth0 | 192.168.0.0 | Public |
--------------------------------------------------
| Eth1 | 10.0.0.0 | Private |
--------------------------------------------------
Click [Next]
● Specify OCR Location:
Select Normal Redundacy.
Specify OCR Location:/u02/oradata/orcl/OCRFile
Specify OCR Mirror Location:/u02/oradata/orcl/OCRFile_mirror
(If a prompt is displayed, use the root user chown-R oracle. dba/u02 /)
Click [Next]
● Specify Voting Disk Location:
Select Normal Redundacy.
Voting Disk Location:/u02/oradata/orcl/VotingFile
Additional Voting Disk 1 Location:/u02/oradata/orcl/VotingFile_mirror1
Additional Voting Disk 2 Location:/u02/oradata/orcl/VotingFile_mirror2
Click [Next]
● Summary:
Click [Install]
{Arch = 'uname-m'
# If ["$ arch" = "i686"-o "$ arch" = "ia64"]
# Then
#LD_ASSUME_KERNEL = 2.4.19
#Export LD_ASSUME_KERNEL
# Fi
# End workaround ● Execute Configuration Scripts :}}}
Run/u01/app/oracle/oraInventory/orainstRoot. sh on rac1 as root
Then, run/u01/app/oracle/oraInventory/orainstRoot. sh on rac2 as root.
Then, run/u01/app/oracle/product/crs/root. sh on rac1 as root.
Then, run/u01/app/oracle/product/crs/root. sh on rac2 as root.
After the root. sh command is executed on rac2, an error occurs. Run vipca as root under X to solve the problem.
#/U01/app/oracle/product/10.2.0/crs/bin/vipca
● Welcome:
Click [Next]
● Network interfaces:
Select eth0 and eth1
Click [Next]
● Virtual IPs for cluster notes:
--------------------------------------------------------------
| Node Name | IP Alias Name | IP Address | Subnet Mask |
--------------------------------------------------------------
| Rac1 | v-rac1 | 192.168.0.143 | 255.255.255.0 |
--------------------------------------------------------------
| Rac2 | v-rac2 | 192.168.0.145 | 255.255.255.0 |
--------------------------------------------------------------
Click [Next]
● Summary:
Click [Finish]
● Configuration Assistant Progress Dialog:
After the configuration is complete, click [OK]
● Configuration Results:
Click [Exit]
Click [OK] On the Execute Configuration Scripts interface on rac1.
● End of installation:
Click [Exit]
ORACLE software installation
$ Cd database/
$./RunInstaller
● Welcome:
Click [Next]
● Select Installation Type:
I chose Enterprise Edition.
Click [Next]
● Specify Home Details:
Name: Required rs10g_home1
Location:/u01/app/oracle/10.2.0/rac_db
Click [Next]
● Specify Hardware Cluster Installation Mode:
Select Cluster Installation and select both nodes.
Click [Next]
● Product-Specific Prerequisite Checks:
Click [Next]
● Select Configuration Option:
Select Install database Software only
Click [Next]
● Summary:
Click [Install]
● Run Script Windows:
Run/u01/app/oracle/10.2.0/rac_db/root. sh on rac1 as root
Then, run/u01/app/oracle/10.2.0/rac_db/root. sh on rac2 as root.
● End of installation:
Click [Exit]
Create a TNS listener process:
----------------
0. Run netca (rac1 ):
Log On with oracle
$ Netca
● Real Application Clusters, Configuration:
Select Cluster configuration
Click [Next]
● Real Application Clusters, Active Nodes:
Select All two nodes
Click [Next]
● Welcome:
Select Listener configuration
Click [Next]
● Listener Configuration, Listener:
Select Add
Click [Next]
● Listener Configuration, Listener Name:
Fill in LISTENER
Click [Next]
● Listener Configuration, Select Protocols:
Select TCP
Click [Next]
● Listener Configuration, TCP/IP Protocol:
Select Use the standard port number of 1521
Click [Next]
● Listener Configuration, More Listener? :
Select No
Click [Next]
● Welcome:
Select Naming Methods configuration
Click [Next]
● Naming Methods Configuration, Select Naming Methods:
Select Local Naming and Easy Connect Naming.
Click [Next]
● Naming Methods Configuration Done:
Click [Next]
● Welcome:
Click [Finish]
1. check:
On rac1
$ Ps-ef | grep lsnr | grep-v 'grep' | grep-v 'ocws' | awk '{print $9 }'
On rac2
$ Ps-ef | grep lsnr | grep-v 'grep' | grep-v 'ocws' | awk '{print $9 }'
Create a database:
-----------
0. Run dbca (rac1 ):
Log On with oracle
$ Dbca
● Welcome:
Select Oracle Real Application Clusters database
Click [Next]
● Step 1 of 17: Opetations:
Select Create a Database
Click [Next]
● Step 2 of 17: Node Selection:
Select All two nodes
Click [Next]
● Step 3 of 17: Database Templates:
Select Custom Database
Click [Next]
● Step 4 of 17: Database Identification:
Global Database Name: orcl
SID Prefix: orcl
Click [Next]
● Step 5 of 16: Management Options:
Use the default option, that is
Choose Configure the Database with Enterprise Manager
Select Use Database Control for Database Management
Click [Next]
● Step 6 of 16: Database Credentials:
Select Use the Same Password for All Accounts
Enter Password
Click [Next]
● Step 7 of 15: Storage Options:
Select ASM
Click [Next]
● Step 8 of 15: Create ASM Instance:
Enter the password.
Select Create server parameter file (SPFILE)
/U02/oradata/orcl/dbs/spfile + ASM. ora
Click [Next]
Click [OK] In the displayed window.
● Step 9 of 15: ASM Disk Groups:
Click [Create New]
● Create Disk Group:
Disk Group Name: DATA
Redundancy: Normal
Select VOL1 and VOL2
Click [OK]
Click [Create New]
● Create Disk Group:
Disk Group Name: FLASH_RECOVERY_AREA
Redundancy: External
Select VOL3 and VOL4
Click [OK]
Click [Next]
● Step 10 of 15: Database File Locations:
Choose Use Oracle-Managed Files
Database Area: + DATA
Click [Next]
● Step 11 of 15: Recovery Configuration:
Select Specify Flash Recovery Area
Flash Recovery Area: + FLASH_RECOVERY_AREA
Flash Recovery Area Size: 2048 MB
Click [Next]
● Step 11 of 15: Database Content:
Use default value
Click [Next]
● Step 12 of 15 Database Services:
Click [Add] And the name is RACTEST.
Orcl1: Preferred
Orcl2: Preferred
TAF Policy: Basic
Click [Next]
● Step 13 of 15: Initialization Parameters:
Use default value
Click [Next]
● Step 14 of 15: Database Storage:
Use default value
Click [Next]
● Step 15 of 15: Create Options:
Use default value
Click [Finish]