ARM Linux(麒麟操作系统)安装Oracle数据库

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:ARM Linux(麒麟操作系统)安装Oracle数据库

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

Oracle在6月底发布了支持ARM cpu的oracle数据库版本19.9,下载页面,选择Oracle Database 19c for LINUX ARM (aarch64)
oracle-arm


安装技术文档参考:database-installation-guide-linux,其中描述目前for arm版本oracle只是认证了操作系统oracle linux(for arm) 8.6+
arm-liunx

在信创平台中没有oracle linux选项,为了让oracle数据库尽可能的运行在信创的硬件和系统上,我选择的麒麟V10版本进行测试安装测试(该版本未被oracle认证,仅供测试),在安装过程中遇到的几个主要坑分享下:
1. 执行runInstaller报错

[oracle@www.xifenfei.com db_1]$ ./runInstaller 
/u01/app/oracle/product/19c/db_1/perl/bin/perl: error while loading shared libraries: 
libnsl.so.1: cannot open shared object file: No such file or directory
[oracle@www.xifenfei.com db_1]$ perl -version

This is perl 5, version 28, subversion 3 (v5.28.3) built for aarch64-linux-thread-multi

Copyright 1987-2020, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

这个是由于oracle自带的perl版本依赖包操作系统中不具备,对数据库软件中的perl进行降级即可
2. 安装图形化界面报PRVG-0282 : failed to retrieve the operating system distribution ID错误
PRVG-0282


由于在该版本的cvu_prereq.xml文件中只是写了oel支持,现在的操作系统是Kylin Linux Advanced Server,不在他的列表里面,因此提示该错误,解决方案参考:19.x:Database software installation failed with ” PRVG-0282 : failed to retrieve the operating system distribution ID ” (Doc ID 2894095.1),设置CV_ASSUME_DISTID解决该问题

3. 编译报错类似:
Error in invoking target ‘clean rat_on part_on dm_on olap_on sdo_on rac_off dnfs_off’
Error in invoking target ‘mkldflags ntcontab.o nnfgt.o’
通过查看日志发现是类似以下错误
ar

确认是由于缺少了/opt/rh/devtoolset-8/root/usr/bin/ar程序导致,对其进行安装然后重试编译(出现错误类似一个个分析处理)
经过上述一系列处理,数据库软件终于顺利安装
20230708211250

4. dbca无法正常启动,静默方式直接退出,选择命令方式创建库

--准备好pfile文件,启动库到nomount
CREATE DATABASE armdb
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 
('/u01/app/oracle/oradata/armdb/redo01a.log') SIZE 200M BLOCKSIZE 512,
GROUP 2 ('/u01/app/oracle/oradata/armdb/redo02a.log') SIZE 200M BLOCKSIZE 512,
GROUP 3 ('/u01/app/oracle/oradata/armdb/redo03a.log') SIZE 200M BLOCKSIZE 512
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 8192
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/armdb/system01.dbf'
SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SYSAUX DATAFILE '/u01/app/oracle/oradata/armdb/sysaux01.dbf'
SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/armdb/users01.dbf'
SIZE 5M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '/u01/app/oracle/oradata/armdb/temp01.dbf'
SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/armdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;


--执行以下脚本
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
@?/sqlplus/admin/pupbld.sql

上述操作之后,在ARM平台的麒麟V10上安装oracle 数据库的事情基本上完成

[oracle@www.xifenfei.com ~]$ uname -a
Linux www.xifenfei.com.localdomain 4.19.90-24.4.v2101.ky10.aarch64 
#1 SMP Mon May 24 14:45:37 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
[oracle@www.xifenfei.com ~]$ cat /etc/os-release 
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Sword)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Sword)"
ANSI_COLOR="0;31"

[oracle@www.xifenfei.com ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 8 23:46:42 2023
Version 19.19.0.0.0

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0

SQL> select name,created ,PLATFORM_NAME from v$database;

NAME      CREATED
--------- ------------------
PLATFORM_NAME
--------------------------------------------------------------------------------
ARMDB     08-JUL-23
Linux OS (AARCH64)

本次测试是基于Oracle官方没有认证的麒麟V10进行,如果希望安装的顺利一些,稳定一些,建议选择Oracle linux(for ARM)8.6+版本