Apple M1上的Oracle 12c坞站设置

Oracle 12c docker setup on Apple M1(Apple M1上的Oracle 12c坞站设置)
本文介绍了Apple M1上的Oracle 12c坞站设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在M1 Mac上的docker中运行Oracle数据库。我尝试了store/oracle/database-enterprise:12.2.0.1-slimcontainer-registry.oracle.com/database/enterprise:12.2.0.1-slim中的图像,但收到相同的错误。

docker run -d -it --name oracle -v $(pwd)/db/oradata:/ORCL store/oracle/database-enterprise:12.2.0.1-slim

我还尝试了非超薄版本,并向docker命令提供了--platform linux/amd64。结果相同。

以下是docker logs -f oracle

的结果
Setup Oracle Database
Oracle Database 12.2.0.1 Setup
Sat Jul 31 18:44:14 UTC 2021

Check parameters ......
log file is : /home/oracle/setup/log/paramChk.log
paramChk.sh is done at 1 sec

untar DB bits ......
log file is : /home/oracle/setup/log/untarDB.log
untarDB.sh is done at 29 sec

config DB ......
log file is : /home/oracle/setup/log/configDB.log
Sat Jul 31 18:44:42 UTC 2021
Start Docker DB configuration
Call configDBora.sh to configure database
Sat Jul 31 18:44:42 UTC 2021
Configure DB as oracle user
Setup Database directories ...

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jul 31 18:44:43 2021

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

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: Enter password: 
ERROR:
ORA-12547: TNS:lost contact


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
update password

Enter password for SYS: 
create pdb : ORCLPDB1

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jul 31 18:44:43 2021

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

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
Reset Database parameters

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jul 31 18:44:43 2021

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

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: Enter password: 
ERROR:
ORA-12547: TNS:lost contact


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-JUL-2021 18:44:44

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/989db909d8df/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-JUL-2021 18:44:44
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/989db909d8df/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

DONE!
Remove password info
Docker DB configuration is complete !
ERROR : config DB failed, please check log /home/oracle/setup/log/configDB.log for details!
OS process OFSD (ospid 188) idle for 30 seconds, exiting
2017-08-09T10:36:20.752530+00:00
ARCH: Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
JIT: pid 563 requesting stop
2017-08-09T10:36:20.815635+00:00
Stopping background process VKTM
2017-08-09T10:36:26.581058+00:00
Instance shutdown complete (OS id: 563)
/usr/bin/tail: inotify cannot be used, reverting to polling: Function not implemented

是M1还是我的配置有问题

推荐答案

M1 Mac上的Oracle数据库

这是一个很棒的..Oracle数据库在MacOS上不受支持,但是,随着Docker对Linux进行虚拟化,它可能会受支持。不幸的是,尽管Docker支持M1 Mac ARM虚拟化,但Oracle数据库严重依赖于Docker和Rosetta 2无法处理的一些低级内核调用。这使我们找到了唯一可以在本地运行的解决方案:使用完全模拟(一台虚拟机)。

  1. 使用HomeBrew安装Lima。LIMA是一种针对Linux的非官方MacOS子系统,支持运行不同架构的VM(如在ARM MacOS上运行x86操作系统):
brew install lima
  1. 创建新的Imish Ubuntu(默认)虚拟机:
limactl start
  1. 选择打开编辑器以覆盖配置
  2. 使用默认编辑器(Vi)将ARCH字段修改为(i要进入插入模式,请进行更改,ESC要进入命令模式,:wq要退出并保存)。
arch: "x86_64"
  1. 运行新创建的默认Lima VM,并将目录更改为新VM的主目录。(除非另有说明,否则所有超过该值的命令都应在新启动的外壳中运行)。
lima
cd ~
  1. 在Lima VM中安装Docker for Ubuntu。
  2. 将您的用户添加到停靠组,并激活更改,以便能够在没有超级用户访问权限的情况下运行停靠命令:
sudo usermod -aG docker $USER
newgrp docker
  1. 从坞站集线器运行图像
docker login
docker run -d -p 1521:1521 --name oracle store/oracle/database-enterprise:12.2.0.1
  1. 使用默认值连接
username/password@SID: sys/Oradoc_db1@ORCLCDB

这篇关于Apple M1上的Oracle 12c坞站设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)