Home Database Mysql Tutorial VMware虚拟机上Oracle 10g R2 RAC 安装

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

Jun 07, 2016 pm 05:26 PM

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 of this Website
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

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

When might a full table scan be faster than using an index in MySQL? When might a full table scan be faster than using an index in MySQL? Apr 09, 2025 am 12:05 AM

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Explain InnoDB Full-Text Search capabilities. Explain InnoDB Full-Text Search capabilities. Apr 02, 2025 pm 06:09 PM

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

Difference between clustered index and non-clustered index (secondary index) in InnoDB. Difference between clustered index and non-clustered index (secondary index) in InnoDB. Apr 02, 2025 pm 06:25 PM

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values ​​and pointers to data rows, and is suitable for non-primary key column queries.

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 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.

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

The relationship between mysql user and database The relationship between mysql user and database Apr 08, 2025 pm 07:15 PM

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

See all articles