Linux RH5平台下使用Oracle ASM创建数据库

简介:

Linux RH5平台下使用Oracle ASM创建数据库

实验环境

操作系统: linux 5.4

实验目标


Linux RH5平台下使用Oracle ASM创建数据库


实验步骤

一、安装配置先决条件

1.安装oracleasm支持包

创建asm数据库,首先需要ASMLib驱动程序包,可以从相关的网站下载到和操作系统对应的rpm文件,分别为oracleasm-support-2.0.3-1、oracleasm-2.6.18-8.el5-2.0.4-1.el5、oracleasmlib-2.0.3-1.el5。

# rpm -Uvh oracleasm*.rpm

# rpm -qa|grep oracleasm
oracleasm-support-2.0.3-1
oracleasm-2.6.18-8.el5-2.0.4-1.el5
oracleasmlib-2.0.3-1.el5

2.添加磁盘

关闭VMware,添加一块磁盘并格式化。

# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


[root@server oracleasmlib]# fdisk -l

Disk /dev/sda: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2088 16667437+ 8e Linux LVM

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898+ 83 Linux

3.启动rawdevices

# start_udev
Starting udev: [ OK ]

4.配置oracleasm

以root用户登陆,执行
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface [oracle]:
Default group to own the driver interface [dba]:
Start Oracle ASM library driver on boot (y/n) [y]:
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks:
[ OK ]

# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
#
[root@server oracleasmlib]# /etc/init.d/oracleasm listdisks
VOL1
[root@server oracleasmlib]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:
[ OK ]

二、创建ASM实例

1.创建初始化文件

$ su – oracle
$ cd $ORACLE_HOME/dbs
$ vi init+ASM.ora

*.asm_diskstring='ORCL:VOL*'
*.background_dump_dest='/oracle/admin/+ASM/bdump'
*.core_dump_dest='/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/oracle/admin/+ASM/udump'

2.创建密码文件

$ su – oracle
$ cd $ORACLE_HOME/dbs
$ orapwd file=orapw+ASM password=dba

3. 创建目录结构
$ su – oracle
$ cd $ORACLE_HOME/dbs
$ mkdir –p $ORALCE_BASE/admin/+ASM/udump
$ mkdir –p $ORALCE_BASE/admin/+ASM/bdump
$ mkdir –p $ORALCE_BASE/admin/+ASM/cdump

4. 启动实例
$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba
SQL> startup
ASM instance started

Total System Global Area 100663296 bytes
Fixed Size 777616 bytes
Variable Size 99885680 bytes
Database Buffers 0 bytes
Redo Buffers 0 bytes
ORA-15110: no diskgroups mounted

因为我们是首次启动asm实例,还没有创建diskgroup,所以显示15110错误是正常的。

如果启动实例的时候碰到如下报错:
ORA-29701: unable to connect to Cluster Manager
那么请检查/etc/inittab 文件,看看是否有下面这行
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
如果没有请添加,如果被注释了请取消注释。


5.用dbca 创建实例数据 选择asm安装

途中需要执行这两个脚本

使用root用户来执行该脚本,分别执行/opt/app/oracle/oraInventory/orainstRoot.sh和/opt/app/oracle/product/10.2.0/db_1/root.sh














本文转自东方之子736651CTO博客,原文链接:http://blog.51cto.com/ecloud/1184003 ,如需转载请自行联系原作者



相关文章
|
Oracle 关系型数据库 MySQL
Oracle Linux 8.10 编译安装sysbench
Oracle Linux 8.10 编译安装sysbench
640 34
|
Oracle Cloud Native 关系型数据库
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
684 11
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
|
前端开发 Java 关系型数据库
基于ssm的考研图书电子商务平台,附源码+数据库+论文
考研图书电子商务平台是一个基于Java的B/S架构系统,适用于Windows环境。该平台设有管理员和用户权限,管理员可管理商品、用户、留言板及订单,用户可管理收货地址、订单、收藏及购买商品。技术框架包括前端Vue+HTML+JavaScript+CSS+LayUI,后端SSM,数据库为MySQL。项目包含17个数据库表,支持Maven构建。提供演示视频和详细文档,支持免费远程调试安装,确保顺利运行。
359 13
基于ssm的考研图书电子商务平台,附源码+数据库+论文
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
744 0
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle 关系型数据库 MySQL
Oracle linux 8 二进制安装 MySQL 8.4企业版
Oracle linux 8 二进制安装 MySQL 8.4企业版
760 1
|
前端开发 Java 关系型数据库
基于ssm的培训学校教学管理平台,附源码+数据库+论文
金旗帜文化培训学校网站项目包含管理员、教师和用户三种角色,各角色功能通过用例图展示。技术框架采用Java语言,B/S架构,前端为Vue+HTML+CSS+LayUI,后端为SSM,数据库为MySQL,运行环境为JDK8+Tomcat8.5。项目含12张数据库表,非前后端分离,支持演示视频与截图查看。购买后提供免费安装调试服务,确保顺利运行。
333 14
|
前端开发 Java 关系型数据库
基于ssm的培训学校教学管理平台,附源码+数据库+论文
该项目为一培训学校教学管理平台,涵盖管理员、教师和学生三大功能模块。管理员可进行系统全面管理,包括学生、教师、课程等信息的增删改查;教师能管理个人中心、课程及选课信息;学生则可管理个人中心及选课信息。技术框架采用Java编程语言,基于B/S架构,前端使用Vue+HTML+JavaScript+CSS+LayUI,后端采用SSM框架,数据库为MySQL。项目运行环境为JDK8+MySQL5.7+Tomcat8.5,支持远程调试安装。演示视频与详细文档截图均提供下载链接。
|
Oracle 关系型数据库 Linux
MyEMS开源系统安装之CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux
本指南介绍如何在CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux服务器上部署MyEMS开源能源管理系统。内容涵盖系统准备、数据库配置、多个MyEMS服务(如myems-api、myems-admin、myems-modbus-tcp等)的安装与配置,以及Nginx服务器设置和防火墙规则调整。通过完成所有步骤,您将能够访问MyEMS Admin UI和Web UI,默认端口分别为8001和80,初始登录凭据已提供。
1068 0
|
Oracle 关系型数据库 Linux
linux8安装oracle 11g遇到的问题记录
Oracle 11g在Linux 8上安装时会遇到link编译环节的问题。官方建议忽略安装中的链接错误,安装完成后应用DBPSU 11.2.0.4.240716补丁及一次性补丁33991024,再重新编译二进制文件,并配置监听器和数据库。但因11g已退出服务期,这些补丁需付费获取。网上信息显示22年1月的PSU补丁也可解决问题,找到该补丁后按常规方式打补丁即可。如有需求或疑问可咨询我。
1149 20
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
549 10
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版