quinta-feira, 11 de julho de 2024

[ORACLE] How to create a test environment with Oracle 23ai running on MacBook Pro M3 Pro.

Hello everyone.

How are you going?

I've finally surrendered to the Macbook's allure for work. 

And my first challange was to run the Oracle 23ai in my Mac.

So, let's get started!

First, we need to install the homebrew.

/bin/bash -c 
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 

We don't have an installer to Oracle 23ai for the Mac M3. 


So, I'm use Colima + Docker + QEMU to emulate x86_64 arch and run the Oracle 23ai. 


Colima is an open source container runtime for macOS with minimal configuration. In addition,

QEMU was an open source software virtualization tool that performs hardware emulation. 


Now, we need to install Docker, Docker-compose, Colima and reinstall QEMU.

   

   brew update


   brew install docker


   brew install docker-compose

 

   brew install colima


   brew reinstall qemu


* Yes, I forgot to take the screenshots 


We are to install Rosetta, as well.


   oftwareupdate --install-rosetta


According Apple, "Rosetta is not an app that you open or interact with. Rosetta works

automatically in the background whenever you use an app that was built only for Mac

computers with an Intel processor. It translates the app for use with Apple silicon."


Check the colima status.


   colima help




Stop and delete the old profile.


   colima stop


   colima delete


And start Colima with the parameters bellow:


   colima start --cpu 4 --memory 10 --arch x86_64 --vm-type vz --vz-rosetta


   Where:

      --vm-type=vz             ==> Virtual machine type.

      --vz-rosetta                ==> Enable Rosetta for amd64 emulation.

      --mount-type=virtiofs ==> Volume Mount Driver for vz.

      --arch x86_64            ==> Architecture (x86_64).


   colima status




The default VM created by Colima has 2 CPUs, 60GB storage and 2GB memory runing

Ubuntu.




Access the Colima console:

   colima ssh


   # Check if Colima is using the new profile

   docker context ls




Finally, create a docker container running Oracle 23ai:


 docker run -d -it --name Orcl23ai /
    -p 1527:1521 /
    -p 5507:5500 /
    -p 8087:8080 /
    -p 8447:8443 
    -e ORACLE_PWD=E 
    container-registry.oracle.com/database/free:latest



Check the container and database.

   docker ps --format "table {{.ID}}\t{{.Status}}\t{{.Names}}\t{{.Ports}}"

   docker exec -it Orcl23ai /bin/bash


And thats it. As simple as that.

If you can watch this installation, you can see these videos from my friend Eduardo Claro:

You can also consult the documentation here - it's for Oracle Autonomous Database Free Container Image, but the process is the same.

I hope it helps you.

Regards
Mario

Nenhum comentário:

Postar um comentário

Isso te ajudou? Comente...

Postagem em destaque

[ORACLE] Quick tips: Autonomous Health Framework (AHF) files cleanup.

Hello everyone.   How are you doing?   Today, I going to show you a quick tip about the AHF - Autonomous Health Framework.   In case your au...