使用VBOX在Oracle Enterprise Linux 5上安装 Oracle Database 12c RAC 12.1.0.1
Oracle数据库十分的复杂,尤其是在不同的平台或存储安装一套完善的Oracle DB考验的不仅是一个人的技术水平,更是考验技术人员的耐心以及细心程度。其中,需要掌握太多的IT技术领域的知识,包括但不限于硬件,网络,存储和软件,乃至包括业务规模和应用架构。技术始终是一场没有尽头的旅行,但是只要掌握最为通用的原理,多加磨练,一定能熟能生巧,事半功倍。
随着Oracle 12C的推出,出现了类似plugin Database的云数据库,这对多组织和多业务部门来说是一场福音,因为可拔插的云数据库能够显著的减少IT部门或者DBA团队的管理负载,从庞大规模的系统运维业务中抽出身来,集中精力解决好指定系统的业务问题,尤其是性能问题。本人通过Oracle VirtualBox虚拟机模拟安装了两个节点的Oracle 12C RAC Cluster,具体的脚本如下所示。具体的视频也可在土豆网搜索“Askerain”播客来观看,视频共有四讲。
1.Configure network.
=>vi /etc/hosts
192.168.1.101 prohost prohost.oracle.com
192.168.1.102 prohost-vip
192.168.1.103 promast promast.oracle.com
192.168.1.104 promast-vip
192.168.1.105 pro-cluster pro-cluster-scan
172.168.1.101 prohost-priv
172.168.1.102 promast-priv
=================================================
192.168.56.101 prod1 prod1.oracle.com
192.168.56.102 prod1-vip
192.168.56.103 prod2 prod2.oracle.com
192.168.56.104 prod2-vip
192.168.56.105 pro-cluster pro-cluster-scan
172.168.1.101 prod1-priv
172.168.1.102 prod2-priv
2.Disabled firewall and selinux.
=>vi /etc/selinux/config [disabled]
3.Create user and group.
groupadd -g 5000 asmadmin
groupadd -g 5001 asmdba
groupadd -g 5002 asmoper
groupadd -g 6000 oinstall
groupadd -g 6001 dba
groupadd -g 6002 oper
useradd -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -g oinstall -G dba,asmdba oracle
=>passwd oracle
=>passwd grid
4.Create directory for oracle.
=>mkdir /odb
=>mkdir /ogi
=>chown oracle:oinstall /odb
=>chown grid:;oinstall /ogi
5.Mount disk and yum install configuretion.
=>mkdir /media/mnt
=>mount /dev/cdrom /media/mnt
=>cd /etc/yum.repos.d
=>touch public-yum-ol5.repo
[oel5]
name=Enterprise Linux 5.7 DVD
baseurl=file:///media/mnt/Server
gpgcheck=0
enabled=1
=>yum install oracle-validated*
=>yum install oracle-rdbms-server-11gR2-preinstall-1.0-6.el6
6.Set ulimit parameters for user grid.
=>su grid
=>ulimit -a
=>su
=>vi /etc/security/limits.conf
# grid-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024
grid soft nofile 1024
# grid-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536
grid hard nofile 65536
# grid-rdbms-server-11gR2-preinstall setting for nproc soft limit is 2047
grid soft nproc 2047
# grid-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384
grid hard nproc 16384
# grid-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KB
grid soft stack 10240
# grid-rdbms-server-11gR2-preinstall setting for stack hard limit is 32768KB
grid hard stack 32768
7.Clone virtual machine and modify hostname and ip.
=>vi /etc/sysconfig/network [modify host name]
=>modify IP.(Important!)
=>cd /etc/udev/rules.d/
=>vi 70-persistent-net.rule
[delete oldest configure items,pay attention to mac address.]
=>ping test.
=>cd /etc/sysconfig/network-scripts [pay more attention to it.]
=>service network restart
8.Configure raw disk.
=>cd /dev
=>ls -l sd*
=>cd /etc/udev/rules.d
=>touch 99-oracle-asmdevices.rules
=>add raw disk by virtualbox.
=>run following scripts:
for i in b c d e f g h i ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
done
for i in b c d e f g h i ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
done
cd /etc/udev/rules.d
touch 99-oracle-asmdevices.rules
=>/sbin/start_udev
=>cd /dev
=>ls -l asm*
9.Configure env for user grid.
Node 1=>
=>mkdir /ogi/orabase
=>su grid
=>cd
=>vi .bash_profile
export GRID_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export ORACLE_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export PATH=$GRID_HOME/bin:$GRID_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin
export ORACLE_SID=+ASM1
export LD_LIBRARY_PATH=$GRID_HOME/lib:$GRID_HOME/lib32
export ORACLE_BASE=/g01/orabase
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG="Simplified Chinese"_China.AL32UTF8
Node 2=>
=>mkdir /ogi/orabase
=>su grid
=>cd
=>vi .bash_profile
export GRID_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export ORACLE_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export PATH=$GRID_HOME/bin:$GRID_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin
export ORACLE_SID=+ASM2
export LD_LIBRARY_PATH=$GRID_HOME/lib:$GRID_HOME/lib32
export ORACLE_BASE=/g01/orabase
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG="Simplified Chinese"_China.AL32UTF8
10.Configure env for user root.
export GRID_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export ORACLE_HOME=/ogi/12cgrid/app/12.2.0.1/grid
export PATH=$GRID_HOME/bin:$GRID_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin
11.Configure env for user oracle.
Node 1=>
=>su oracle
=>mkdir /odb/orabase
=>cd
=>vi .bash_profile
export ORACLE_HOME=/odb/oracle/app/oracle/product/12.2.0.1/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin
export ORACLE_SID=PROD1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export ORACLE_BASE=/odb/oracle/
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG="Simplified Chinese"_China.AL32UTF8
Node 2=>
=>su oracle
=>mkdir /odb/orabase
=>cd
=>vi .bash_profile
export ORACLE_HOME=/odb/oracle/app/oracle/product/12.2.0.1/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/sbin:/bin:/usr/sbin:/usr/bin
export ORACLE_SID=PROD2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export ORACLE_BASE=/odb/oracle/
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG="Simplified Chinese"_China.AL32UTF8
12.Switch instance and machine,use this command modify it.
=>su
=>srvctl modify instance -d orcl -instance prod1 -node machine1
=>srvctl modify instance -d orcl -instance prod2 -node machine2
[root@maclean1 ~]# srvctl stop database -d orcl
[root@maclean1 ~]# srvctl start database -d orcl
具体下载脚本请查看附件!
相关推荐
详解在vBox上安装Oracle10g_Rac,Oracle官方技术人员编写,不解释
使用vBox安装10201_clusterware,升级到10205;安装10201_database,升级到10205_database 用图文形式详细描述了oracle-rac在virtualbox上的安装过程
Ansible> = 2.4 Oracle Linux(或任何基于RHELLinux系统)> = 6.4 Oracle数据库/网格基础结构18.3.0.0、12.2.0.1、12.1.0.1、12.1.0.2、11.2.0.4、11.2.0.3 有关示例配置,请查看: SI/FS: group_vars/vbox-si-fs....
用Vbox在Linux上安装Oracle 11g
一.LINUX 服务器安装配置 .... 二. ORACLE数据库安装前准备工作 ...... 2.8.1创建固定大小的vdi磁盘文件 2.8.2依次创建vote、ocr、asm1、asm2、asm3、asm4、asm5五个磁盘 2.8.3把所有新创建的磁盘全部改成可共享...
### 绝杀用Vbox在Linux (CentOS 6.X)上安装Oracle 11g #### 一、新建虚拟机 在准备安装Oracle 11g之前,首先需要搭建一个合适的虚拟环境。这里选用的是Oracle VM VirtualBox作为虚拟化平台,并在其中安装CentOS 6....
### vbox安装Oracle 11g RAC环境详细步骤 #### 环境概要与配置需求 本实验旨在一台普通Windows 7操作系统上通过安装VirtualBox虚拟机来模拟Oracle 11g RAC (Real Application Clusters)环境。具体而言,实验将创建...
首先,文档的标题为“Oracle 12CR2 RAC安装过程记录”,描述中提到的是“12c RAC”,标签为“ORACLE12C ORACLERAC”,由此可以知道文章记录的是Oracle 12c第二版(Release 2)中RAC安装的过程。 文档内容中提到了...
本文档说的是如何在Vbox安装Linux实验环境,以确保在Linux上可以安装Oracle实验环境,已备Oracle学习使用。
vbox搭建的虚拟机,并安装oracle11gRAC过程记录,带截图。
### VBox虚拟机+Redhat5.6+RAC安装知识点详解 #### 一、安装虚拟机 ##### 1. Linux系统版本 - **系统环境**:本教程使用的是Red Hat Enterprise Linux Server release 5.6 (Tikanga)作为操作系统基础。 - **硬件...
5. **客体操作系统安装**:在每个虚拟机中安装Oracle Linux 6.1,确保选择与RAC兼容的版本和体系结构。 6. **Oracle 安装前提条件**:在每个节点上安装必要的依赖和软件包,包括开发工具、内核参数调整、网络配置等...
OEL+6.3+++11.2.0.3+RAC+++VBOX安装脚本
vbox+redhat6.3+oracle11gRAC安装文档详细图解安装过程
ORACLE 11G RAC,在VBOX虚拟机下进行安装,多张图片,内容很详细,非常适合新手。
linux下安装Vbox
基于OEL 6.31 1.2.0.3 RAC VBOX安装脚本
Oracle_VM_VirtualBox_Extension_Pack-6.1.36a-152435.vbox Oracle_VM_VirtualBox_Extension_Pack-6.1.18.vbox-extpack VM拓展包支持USB3.0
在安装VirtualBox时候的VirtualBox Extension Pack文件: Oracle_VM_VirtualBox_Extension_Pack-6.1.4.vbox-extpack
"安装 CobaltStrike 4.2 在 Kali 2020.4 Linux 中" 本文将指导您如何在 Kali 2020.4 Linux 中安装 CobaltStrike 4.2。CobaltStrike 是一种功能强大的后渗透攻击工具,广泛应用于渗透测试和红队行动中。下面将详细...