Mac OS M2 오라클 설치(도커이용)

정병웅·2023년 4월 17일
1

DataBase

목록 보기
1/2

맥북 에어를 구입한 이후 개인 스터디를 진행하며, 앞으로 프로젝트도 만들기 위해 디비를 구성하는데 mac os에서는 도커로 오라클을 설치 하는 것 같아서 제대로 알지는 못하지만 방식이라도 알기위해 정리해본다,,,헤헿

도커 설치

https://www.docker.com/products/docker-desktop/

위의 경로에 접속하면 도커 설치를 진행 할 수 있는데, apple chip이라고 하는 곳을 선택해서 다운로드를 진행한다.

다운로드를 하고 나면 도커 관련 UI가 뜨는데,,,음,,,우선 어느정도 메인 화면이 나올때까지 진행 후 메인 화면이 나오면 종료한 뒤, 터미널을 실행한다.

터미널 오라클 11g 설치 진행

1. 설치할 오라클 리스트업 확인

jeongbyeong-ung@jeongbyeong-ung-ui-MacBookAir ~ % docker search oracle-xe-11g
NAME                                 DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
oracleinanutshell/oracle-xe-11g                                                      267                  
wnameless/oracle-xe-11g-r2           Oracle Express Edition 11g Release 2 on Ubun…   95                   
orangehrm/oracle-xe-11g               docker container with Oracle Express Editio…   17                   [OK]
christophesurmont/oracle-xe-11g      Clone of the wnameless/oracle-xe-11g.           7                    
jaspeen/oracle-xe-11g                Fork from sath89/docker-oracle-xe-11g - smal…   6                    [OK]
thebookpeople/oracle-xe-11g                                                          5                    
ukhomeofficedigital/oracle-xe-11g    Oracle Database Express Edition 11g Container   4                    [OK]
wscherphof/oracle-xe-11g-r2          Oracle® Database Express Edition 11g Release…   3                    
acktsw/oracle-xe-11g                 fork from https://hub.docker.com/r/sath89/or…   3                    [OK]
webdizz/oracle-xe-11g-sa             This is a simple image based on sath89/oracl…   1                    [OK]
activeeon/oracle-xe-11g                                                              0                    
gaesi/oracle-xe-11g                  Based on: oracleinanutshell/oracle-xe-11g       0                    
dotcms/oracle-xe-11g                                                                 0                    
larmic/oracle-xe-11g                 Using wnameless/oracle-xe-11g with created u…   0                    
zeroturnaround/oracle-xe-11g                                                         0                    
nritholtz/oracle-xe-11g              nritholtz/oracle-xe-11g                         0                    
loads/oracle-xe-11g-r2                                                               0                    
jark/oracle-xe-11g-r2-cdc                                                            0                    
andyrbell/oracle-xe-11g-centos       Oracle Express Edition 11g Release 2 on Cent…   0                    
toneloc01/oracle-xe-11g              Out-of-the-box oralce xe image from ubuntu 1…   0                    
switchsoftware/oracle-xe-11g                                                         0                    
yuxialuo/oracle-xe-11g-r2-cdc-demo                                                   0                    
paliari/oracle-xe-11g                                                                0                    
aerisconsulting/oracle-xe-11g        Oracle Express 11g R2 on Ubuntu 16.04 LTS (b…   0                    
avuletica/oracle-xe-11g-r2           Dockerfile of Oracle Database Express Editio…   0                    

-> docker search oracle-xe-11g 명령어를 입력하면 아래 설치 가능 리스트가 뜨는데 이중 stars를 가장 많이 받은 것을 선택하면 된다.

2. 오라클 11g 설치

jeongbyeong-ung@jeongbyeong-ung-ui-MacBookAir ~ % docker pull oracleinanutshell/oracle-xe-11g
Using default tag: latest
latest: Pulling from oracleinanutshell/oracle-xe-11g
6cf436f81810: Pull complete 
987088a85b96: Pull complete 
b4624b3efe06: Pull complete 
d42beb8ded59: Pull complete 
15522cc0fb47: Pull complete 
f747bf1d551d: Pull complete 
Digest: sha256:8b740e77d4b90add693fedb22938f340821e89665fb58ecaeeb0dace853b9ee5
Status: Downloaded newer image for oracleinanutshell/oracle-xe-11g:latest
docker.io/oracleinanutshell/oracle-xe-11g:latest

-> docker 명령어를 입력하여 설치 진행
docker pull [이미지 이름]

3. 설치 후 구성 진행

jeongbyeong-ung@jeongbyeong-ung-ui-MacBookAir ~ % docker run -d --name oracle-xe-11g -p 1521:1521 oracleinanutshell/oracle-xe-11g
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
584429aefebfd09f965987f44e82a15ef6560e03d4f6e10efc4711835203327d

-> docker 명령어를 입력해서 오라클 디비 포트를 구성하고, 실행한다.
docker run -d --name [컨테이너 이름] -p [로컬포트]:[도커 oracle포트][이미지 명]
-> warning이 뜨는데 아마 리눅스 플랫폼과 mac os 플랫폼 차이때문에 경고를 출력하는거 같은데,,,프로세스는 정상적으로 뜬다,,,뭐지,,,?

4. 실행 확인

jeongbyeong-ung@jeongbyeong-ung-ui-MacBookAir ~ % docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED              STATUS              PORTS                                      NAMES
584429aefebf   oracleinanutshell/oracle-xe-11g   "/bin/sh -c '/usr/sb…"   About a minute ago   Up About a minute   22/tcp, 8080/tcp, 0.0.0.0:1521->1521/tcp   oracle-xe-11g
jeongbyeong-ung@jeongbyeong-ung-ui-MacBookAir ~ % docker ps   
CONTAINER ID   IMAGE                             COMMAND                  CREATED              STATUS              PORTS                                      NAMES
584429aefebf   oracleinanutshell/oracle-xe-11g   "/bin/sh -c '/usr/sb…"   About a minute ago   Up About a minute   22/tcp, 8080/tcp, 0.0.0.0:1521->1521/tcp   oracle-xe-11g

-> docker ps -a를 입력 하면 모든 프로세스를 출력 하고, ps 만 입력하면 현재 실행 중인 프로세스만 출력한다.

이 방법으로 설치 된줄 알았는데,,,,찾아보니 macOS의 m2칩은 안되는거같다,,,지원이 안된다나 뭐라나,,,혹시 아는사람은 알려주세요,,plz,,,

profile
인생은 IT 노가다

2개의 댓글

comment-user-thumbnail
2023년 8월 18일

colima를 사용해서 해보세요!

1개의 답글