[转帖]如何获得一个Oracle RAC数据库(从Github - oracle/vagrant-boxes) --- 暂时未测试成功 公司网络太差了..
如何获得一个Oracle RAC数据库(从Github - oracle/vagrant-boxes)
环境
一台笔记本电脑,Windows操作系统,安装了VirtualBox,Vagrant,Github。
笔记本内存至少16G。使用外置硬盘,最终实际消耗112GB。
目标
两节点RAC。操作系统Oracle Linux 7,数据库版本支持12.2,18从和19c。本例测试的是19c。
实例名为ORCLCDB,带一个可插拔数据库orclpdb1。
克隆项目
git clone https://github.com/oracle/vagrant-boxes.git
进入vagrant-boxes\OracleRAC目录。其中的README.md有详细的操作过程。
拷贝安装介质
需要下载对应版本的数据库和GI介质并拷贝到ORCL_software目录下。19.3版本介质约6GB。
cd vagrant-boxes/OracleRAC/ORCL_software
cp LINUX.X64_193000_db_home.zip .
cp LINUX.X64_193000_grid_home.zip .
修改配置
默认的RAC节点配置为8GB,由于笔记本只有16G内存,因此把单节点内存配置改为6G,在config/vagrant.yml
文件中修改:
node1:
vm_name: node1
mem_size: 6144
cpus: 2
public_ip: 192.168.56.101
vip_ip: 192.168.56.103
private_ip: 192.168.200.101
u01_disk: ./node1_u01.vdi
node2:
vm_name: node2
mem_size: 6144
cpus: 2
public_ip: 192.168.56.102
vip_ip: 192.168.56.104
private_ip: 192.168.200.102
u01_disk: ./node2_u01.vdi
如果内存小于6G,vagrant up
会报如下错误:
ERROR: vm1_mem_size option can not be less then 6 Gb
config/vagrant.yml, mem_size: 6144
启动安装
启动命令如下:
vagrant up
安装非常顺利,总共耗时2小时29分:
可以看到无论是安装,还是运行,资源都是和紧张的,这是由于笔记本内存不足导致的,如有可能,可以在公有云上进行此实验:
整个安装过程实际创建了两个虚机,本例为ol7-193-node1和ol7-193-node2。VirtualBox很贴心,还为这两个虚机建立一个分组:ol7-193-gi
:
安装日志较长,以下截取了一部分:
PS E:\DB\vagrant-boxes\OracleRAC> Measure-Command { vagrant up | Out-Default}
getting Proxy Configuration from Host...
==> vagrant: A new version of Vagrant is available: 2.2.6 (installed version: 2.2.4)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
Bringing machine 'node2' up with 'virtualbox' provider...
Bringing machine 'node1' up with 'virtualbox' provider...
==> node2: Importing base box 'ol7-latest'...
Progress: 10%
Progress: 30%
Progress: 40%
==> node2: Matching MAC address for NAT networking...
==> node2: Setting the name of the VM: ol7-193-node2
==> node2: Clearing any previously set network interfaces...
==> node2: Preparing network interfaces based on configuration...
node2: Adapter 1: nat
node2: Adapter 2: hostonly
node2: Adapter 3: intnet
==> node2: Forwarding ports...
node2: 22 (guest) => 2222 (host) (adapter 1)
==> node2: Running 'pre-boot' VM customizations...
这里停了很久,因为需要准备RAC节点磁盘和共享存储。
然后到第1个节点:
node2: -----------------------------------------------------------------
node2: INFO: 2019-11-19 09:21:43: Running user-defined post-setup scripts
node2: -----------------------------------------------------------------
==> node1: Importing base box 'ol7-latest'...
Progress: 10%
Progress: 30%
Progress: 40%
==> node1: Matching MAC address for NAT networking...
==> node1: Setting the name of the VM: ol7-193-node1
==> node1: Fixed port collision for 22 => 2222. Now on port 2200.
==> node1: Clearing any previously set network interfaces...
==> node1: Preparing network interfaces based on configuration...
node1: Adapter 1: nat
node1: Adapter 2: hostonly
node1: Adapter 3: intnet
==> node1: Forwarding ports...
node1: 22 (guest) => 2200 (host) (adapter 1)
==> node1: Running 'pre-boot' VM customizations...
==> node1: Booting VM...
==> node1: Waiting for machine to boot. This may take a few minutes...
node1: SSH address: 127.0.0.1:2200
node1: SSH username: vagrant
node1: SSH auth method: private key
node1:
node1: Vagrant insecure key detected. Vagrant will automatically replace
node1: this with a newly generated keypair for better security.
node1:
node1: Inserting generated public key within guest...
node1: Removing insecure key from the guest if it's present...
node1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> node1: Machine booted and ready!
==> node1: Checking for guest additions in VM...
==> node1: Setting hostname...
==> node1: Configuring and enabling network interfaces...
空间占用
基本的操作系统位于VirtualBox默认目录下,两个节点(虚机)合计占用空间4.2G。
此外,Vagrant为每个节点又各挂接一块100G磁盘,实际各占用空间15G。另外还有4块20GASM共享磁盘,实际占用80G。这几块磁盘位于Vagantfile所在目录,如下图所示:
所以本实验实际占用空间=4.2+15*2+80
=114.2GB。
验证
使用vagrant ssh或vagrant putty(需安装插件,vagrant plugin install vagrant-multi-putty
)可以登录数据库主机。我用后者,界面更一致和美观。
以下为进入主机后的操作
[vagrant@oracle-19c-vagrant ~]$ sudo -s
[root@oracle-19c-vagrant vagrant]# su - oracle
Last login: Thu Nov 14 16:23:04 +08 2019
[oracle@oracle-19c-vagrant ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Nov 14 16:46:28 2019
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
参考
- https://github.com/oracle/vagrant-boxes/tree/master/OracleDatabase
- https://yum.oracle.com/boxes
[转帖]如何获得一个Oracle RAC数据库(从Github - oracle/vagrant-boxes) --- 暂时未测试成功 公司网络太差了..的更多相关文章
- [转帖]如何获得一个RAC Oracle数据库(从Github - oracle/docker-images) - 本地版 ---暂时未做实验.
如何获得一个RAC Oracle数据库(从Github - oracle/docker-images) - 本地版 2019-11-09 16:35:30 dingdingfish 阅读数 32更多 ...
- oracle rac 数据库常用命令
oracle rac 数据库常用命令:1.所有实例和服务的状态srvclt status database -d orcl单个实例的状态:srvctl status instance -d orcl ...
- Linux 上Oracle RAC 10g 升级到 Oracle RAC 11g
了解如何在 Oracle Enterprise Linux 5 上逐步将 Oracle RAC 10g 第 2 版升级到 Oracle RAC 11g. Oracle 数据库 11g(即,新一代网格计 ...
- NBU 还原LINUX ORACLE RAC数据库(MIDDB)
MIDDB集群数据库恢复 目录 MIDDB集群数据库恢复... 1 1.安装 NBUcilent 1 2.修改hosts文件... 2 3.修改hosts文件... 2 4.使用bplis读取备份文件 ...
- NBU 还原LINUX ORACLE RAC数据库(CRM)
CRM集群数据库恢复 linux centos 6.6 oracle 11.2.0.3 集群环境 1.53 oraclea 1.54 oracleb 在linux操作系统root用户下安装好NBUci ...
- JDBC连接oracle RAC数据库配置
RAC的配置如下: node1:ip地址192.168.60.132,实例名:rac1,主机名:rac1 node2:ip地址192.168.60.144,实例名:rac2,主机名:rac2 RAC服 ...
- mssql server修改数据库文件位置 此种方法暂未测试成功
--查看当前的存放位置 select database_id,name,physical_name AS CurrentLocation,state_desc,size from sys.master ...
- Oracle RAC集群体系结构
一. Oracle集群体系结构 Oracle RAC,全称是Oracle Real Application Cluster,即真正的应用集群,是oracle提供的一个并行集群系统,整个集群系统由Ora ...
- bay——Oracle RAC集群体系结构.docx
Oracle RAC集群体系结构 ————bayaim 2018年10月22日13:33 https://blog.51cto.com/ixdba/862207 一. Oracle集群体系结构 O ...
随机推荐
- drf--搜索、过滤、排序组件
目录 drf--搜索.过滤.排序组件 过滤 DjangoFilterBackend 自定义过滤器django-filter模块 自定义过滤类 搜索SearchFilter 排序OrderingFilt ...
- 自动居中标题和内容;aspxgridview允许定义两个关键字为主键的格式
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- Robot Framework RIDE简单使用
Testproject Testsuite Testcase 1.创建测试项目 打开RIDE,点击File--New Project,选择项目路径,填入项目名称 2.右键点击新建的测试项目,选择New ...
- springboot工程启动即执行一段代码
最近在做一个项目, 需要Tomcat启动后就执行一段代码 在这里需要用到CommandLineRunner这个接口, Spring boot的CommandLineRunner接口主要用于实现在应用初 ...
- Flask 中内置的 Session 应用
目录 1.Flask 中 session 是需要 secret_key 的 2.session抛异常 3.session 用法: 4.验证session Flask中的Session非常的奇怪,他会将 ...
- Nginx 核心配置-location的匹配案例实战篇
Nginx 核心配置-location的匹配案例实战篇 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.location语法规则介绍 在没有使用正则表达式的时候,nginx会先在 ...
- ASS/SSA字幕格式
[时间:2019-04] [状态:Open] [关键词:字幕,ASS,SSA,文件格式,v4 Styles,字幕特效] 0 引言 SubStation Alpha(Sub Station Alpha) ...
- 性能测试基础---ant集成1
·Jmeter的命令行与ant等的集成.·为什么需要使用Jmeter的命令行模式(Non-GUI).·为了更好的利用负载机的资源.GUI模式会消耗更多的系统资源.·为了更好的掌握jmeter和其它工具 ...
- 爬虫篇-python爬虫中多线程的使用
queue介绍 queue是python的标准库,俗称队列.可以直接import引用,在python2.x中,模块名为Queue.python3直接queue即可 在python中,多个线程之间的数据 ...
- WTL 9.0的变化 - atlapp.h
忽然发现WTL更新到9.0.4140了,便对比了一下 8.1.12085. 先看看atlapp.h中有什么大的变动. 第61行: #if defined(_SYSINFOAPI_H_) &&a ...