search
HomeDatabaseMysql TutorialVMware虚拟机上Oracle 10g R2 RAC 安装

VMware虚拟机上Oracle 10g R2 RAC 安装

项目流程如下:
一、RAC安装
 1、实验平台:Oracle 10gR2 RAC + RHEL 5.4 +VMware-server-1.0.9
 2、安装步骤:
  (1)系统需求:
  操作系统:红帽5.0或5.4
  内存:800M
  交换空间:2048M
  硬盘:10G
  网卡:2(public IP + Virtual IP,priv IP)
  主机节点:2(node1,node2)
  存储设备:1(DB files)
  (2)网络规划:
  主机名    类型  IP地址
  node1    公共  142.105.100.111
  node2    公共  142.105.100.112
  node1-vip  虚拟  142.105.100.211
  node2-vip  虚拟  142.105.100.212
  node1-priv  专用  192.168.100.111
  node2-priv  专用  192.168.100.112
(3)安装流程
  >安装虚拟机(vmware server 1.0.9)
  >安装操作系统(RHEL 5.4)
  >配置操作系统
  >复制虚拟机
  >配置双机信任关系
  >安装clusterware软件
  >安装database软件
  >配置监听listener
  >建立数据库实例
  >客户端TAF(transparent application failover)配置(透明切换)
(4)安装前准备及OS安装配置,准备好安装包,包括:
VMware-server-1.0.9-156507.i386.rpm(虚拟机包),rhel-server-5.4-i386-dvd.iso(红帽镜像),Oracle10201_clusterware_linux32.zip(集群软件),oracleasm-support-2.1.3-1.el5.i386.rpm(ASM包),oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm(ASM包),oracleasmlib-2.0.4-1.el5.i386.rpm(ASM包),compat-gcc-7.3-2.96.128.i386.rpm(集群软件包),compat-libstdc++-7.3-2.96.128.i386.rpm(集群软件包),compat-libstdc++-devel-7.3-2.96.128.i386.rpm(集群软件包),compat-gcc-c++-7.3-2.96.128.i386.rpm(集群软件包),oracle10g01_10.2.0.1.0_database_linux32.zip(数据库包)

    RAC1  Votingdisk
      OCRdisk
  vmware  sharedisk  ASMdisk1(两个ASM,一个用于用户数据,一个闪回数据)
      ASMdisk2
  RAC2
 
1)安装vmware-1.0.9版虚拟机
 rpm -ivh VMware-server-1.0.9-156507.i386.rpm
 RAC1 (新建->选择桥结->LSI Logic->SCSI->RAC1.vmdk(10G)->Votingdisk.vmdk(0.1G)(scsi1:1)(Independent)->OCRdisk.vmdk(0.1G)(scsi1:2)(Independent)->ASMdisk1(2G)(scsi1:3)(Independent)->ASMdisk2(1G)(scsi1:4)(Independent))->ethernet(加一块网卡(桥结))
 RAC2(同一,也可待建完后复制)
2)安装RedHat Linux 5.4 操作系统
关键点:
分区(swap,sda1)包(开发全选,基本系统全选,服务器FTP)
 防火墙(禁用),SELINUX(禁用),RAC1.vmx.
 [root@node1 ~]# uname -a
Linux node1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[root@node1 ~]# tail -7 /etc/hosts
127.0.0.1            localhost.localdomain localhost
142.105.100.111        node1
142.105.100.112        node2
142.105.100.211        node1-vip
142.105.100.212        node2-vip
192.168.100.111        node1-priv
192.168.100.112        node2-priv
[root@node1 ~]# tail -7 /etc/sysctl.conf
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
[root@node1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
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
[root@node1 ~]#sysctl -p
[root@node1 ~]# tail -1 /etc/rc.local
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=20
[root@node1 ~]# vi /etc/redhat-release
[root@node1 ~]#> /etc/resolv.conf
[root@node1 ~]#groupadd oinstall
[root@node1 ~]#groupadd  dba
[root@node1 ~]#useradd oracle
[root@node1 ~]#passwd oracle
[root@node1 ~]# tail -7 /home/oracle/.bash_profile
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=RACDB1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:$PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[root@node1 ~]#mkdir -p /u01/app/oracle
[root@node1 ~]#chown -R oracle:oinstall /u01
[root@node1 ~]#chmod -R 775 /u01
[root@node1 ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        1241    9968301  83  Linux
/dev/sda2            1242        1305      514080  82  Linux swap / Solaris
Disk /dev/sdb: 107 MB, 107374080 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        102      104432  83  Linux
Disk /dev/sdc: 107 MB, 107374080 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1        102      104432  83  Linux
Disk /dev/sdd: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1              1        261    2096451  83  Linux
Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
  Device Boot      Start        End      Blocks  Id  System
/dev/sde1              1        130    1044193+  83  Linux
[root@node1 ~]#rpm -ivh oracleasm-support-2.1.3-1.el5.i386.rpm
[root@node1 ~]#rpm  -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
[root@node1 ~]#rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
[root@node1 ~]#/etc/init.d/oracleasm configure
Default user to own the driver interface []:oracle
Default group to own the driver interface []:dba
Start oracle ASM library driver interdace on boot (y/n)[n]:y
Scan for oracle ASM disks on boot (y/n) [y]:y
[root@node1 ~]#/etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
[root@node1 ~]#/etc/init.d/oracleasm createdisk VOL2 /dev/sde1
[root@node1 ~]#/etc/init.d/oracleasm listdisks
[root@node1 ~]# tail -5 /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="17", RUN+="/bin/raw /dev/raw/raw1 %M %m"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="33", RUN+="/bin/raw /dev/raw/raw2 %M %m"
KERNEL=="raw[1-2]",OWNER="oracle",GROUP="oinstall",MODE="640"
  [root@node1 ~]#start_udev
  [root@node1 ~]#ls -l /dev/raw
  [root@node1 ~]#rpm -ivh /oradisk/compat-gcc-7.3-2.96.128.i386.rpm
  [root@node1 ~]#rpm -ivh /oradisk/compat-libstdc++-7.3-2.96.128.i386.rpm  —force
  [root@node1 ~]#rpm -ivh  /oradisk/compat-libstdc++-devel-7.3-2.96.128.i386.rpm
  [root@node1 ~]#rpm -ivh /oradisk/compat-gcc-c++-7.3-2.96.128.i386.rpm
Node2
  [root@node1 ~]#mkdir /vmware/RAC2
  [root@node1 ~]#Cp /vmware/RAC1/* /vmware/RAC1/ -rf
  [root@node1 ~]#Vim rac2.vmx(rac1改为rac2)
  打开vmware下RAC2,(create)
  [root@node1 ~]#Hostname node2
  [root@node2 ~]#Cat /etc/sysconf/network
  [root@node2 ~]#Cd /etc/sysconfig/network-scripts/
  [root@node2 network-scripts]#Mv ifcfg-eth0.bak ifcfg-eth0
[root@node2 network-scripts]#Mv ifcfg-eth1.bak ifcfg-eth1
[root@node2 network-scripts]#Ifconfig eth0 | grep Hwaddr
[root@node2 network-scripts]#Ifconfig eth1 | grep Hwaddr
[root@node2 network-scripts]#Vim ifconfig eth0(改硬件地址)
[root@node2 network-scripts]#Vim ifconfig eth1(改硬件地址)
[root@node2 network-scripts]#Service network restart
[root@node2 network-scripts]#vim /home/oracle/.bash_profile(改ORACLE_SID为RACDB2)
[root@node2 ~]#ping node1
[root@node2 ~]#ping node2
[root@node2 ~]#ping node1-priv
[root@node2 ~]#ping node1-priv
[root@node2 ~]#/etc/init.d/oracleasm scandisks
[root@node2 ~]#/etc/init.d/oracleasm listdisks
[root@node2 ~]#service xinetd start
[root@node2 ~]#chkconfig time-stream on
[root@node2 ~]#exit
[root@node2 ~]#crontab -e
* * * * rdate -s 142.105.100.112
[root@node1 ~]#su - oracle
[oracle@node1 ~]#mkdir .ssh
[oracle@node1 ~]#chmod 700 .ssh
[oracle@node1 ~]#ssh-keygen -t rsa
[oracle@node1 ~]#ssh-keygen -t dsa
[root@node2 ~]#su - oracle
[oracle@node2 ~]#mkdir .ssh
[oracle@node2 ~]#chmod 700 .ssh
[oracle@node2 ~]#ssh-keygen -t rsa
[oracle@node2 ~]#ssh-keygen -t dsa
[oracle@node1 ~]#cat /home/oracle/.ssh/id_rsa.pub >>/home/oracle/.ssh/authorized_keys
[oracle@node1 ~]#cat /home/oracle/.ssh/id_dsa.pub >>/home/oracle/.ssh/authorized_keys
[oracle@node1 ~]#ssh node2 cat /home/oracle/.ssh/id_rsa.pub >> /home/oracle/.ssh/authorized_keys
[oracle@node1 ~]#ssh node2 cat /home/oracle/.ssh/id_dsa.pub >> /home/oracle/.ssh/authorized_keys
[oracle@node1 ~]#scp /home/oracle/.ssh/authorized_keys node2:/home/oracle/.ssh/authorized_keys
[oracle@node1 ~]#ssh node1 date
[oracle@node1 ~]#ssh node2 date
[oracle@node1 ~]#ssh node1-priv date
[oracle@node1 ~]#ssh node1-priv date
[oracle@node1 ~]#ssh node2
[oracle@node2 ~]#ssh node1 date
[oracle@node2 ~]#ssh node2 date
[oracle@node2 ~]#ssh node1-priv date
[oracle@node2 ~]#ssh node2-priv date
安装Oracle 10gR2 clusterware:
[oracle@node1 ~]#cd /oradisk
[oracle@node1 ~]#unzip Oracle10201_clusterware_linux32.zip
[oracle@node1 ~]#chown -R oracle:oinstall /oradisk
[oracle@node1 ~]#chmod -R 775 /oradisk
[oracle@node1 ~]#cd /oradisk/clusterware
[oracle@node1 clusterware]#/oradisk/clusterware/cluvfy/runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose
[oracle@node1 ~]#su - root
[root@node1 ~]#cd /oradisk/clusterware/rootpre
[root@node1 ~]#exit
[oracle@node1 ~]#cd /oradisk/clusterware
[oracle@node1 clusterware]#export LANG=en_US.UTF-8
[oracle@node1 clusterware]#./runInstaller -ignoreSysPreReqs

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft