本文介紹了Apple M1上的Oracle 12c塢站設(shè)置的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我正嘗試在M1 Mac上的docker中運(yùn)行Oracle數(shù)據(jù)庫。我嘗試了store/oracle/database-enterprise:12.2.0.1-slim
和container-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
。結(jié)果相同。
以下是docker logs -f oracle
的結(jié)果
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數(shù)據(jù)庫
這是一個很棒的..Oracle數(shù)據(jù)庫在MacOS上不受支持,但是,隨著Docker對Linux進(jìn)行虛擬化,它可能會受支持。不幸的是,盡管Docker支持M1 Mac ARM虛擬化,但Oracle數(shù)據(jù)庫嚴(yán)重依賴于Docker和Rosetta 2無法處理的一些低級內(nèi)核調(diào)用。這使我們找到了唯一可以在本地運(yùn)行的解決方案:使用完全模擬(一臺虛擬機(jī))。
-
使用HomeBrew安裝Lima。LIMA是一種針對Linux的非官方MacOS子系統(tǒng),支持運(yùn)行不同架構(gòu)的VM(如在ARM MacOS上運(yùn)行x86操作系統(tǒng)):
brew install lima
-
創(chuàng)建新的Imish Ubuntu(默認(rèn))虛擬機(jī):
limactl start
-
選擇打開編輯器以覆蓋配置。
使用默認(rèn)編輯器(Vi)將ARCH字段修改為(
i
要進(jìn)入插入模式,請進(jìn)行更改,ESC
要進(jìn)入命令模式,:wq
要退出并保存)。
arch: "x86_64"
-
運(yùn)行新創(chuàng)建的默認(rèn)Lima VM,并將目錄更改為新VM的主目錄。(除非另有說明,否則所有超過該值的命令都應(yīng)在新啟動的外殼中運(yùn)行)。
lima
cd ~
-
在Lima VM中安裝Docker for Ubuntu。
將您的用戶添加到停靠組,并激活更改,以便能夠在沒有超級用戶訪問權(quán)限的情況下運(yùn)行停靠命令:
sudo usermod -aG docker $USER
newgrp docker
-
從塢站集線器運(yùn)行圖像
docker login
docker run -d -p 1521:1521 --name oracle store/oracle/database-enterprise:12.2.0.1
-
使用默認(rèn)值連接
username/password@SID: sys/Oradoc_db1@ORCLCDB
這篇關(guān)于Apple M1上的Oracle 12c塢站設(shè)置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,