How to install Oracle Database on Mac
OS Sierra 10.12 or above
ORACLE
DATABASE
you want to create an application using oracle database ina Mac OS you
_might stumble in the isu of how to install the database and which tools to
‘The first response you gets via VirtualBox, Its one way to do it but it’s a
very heavy solution. You will have o install the software, download Oracle
Database Virtual Machine which is around 7 Go and finally configure ports
‘And don’ forget system requirements you have to fill to be able to execute
the virtual machine, They ean be found here
|hups://www oracle comy technerwork/database/enterprise-
cdition/databaseappdev.vm-161299,htzal
‘Datiase Virus Box Appanc Vl Machine
Regurerents
All this make the virtual machine a hard choice.
2 6 [wee] @SQL developer to connect to it
Iwill des
ribe steps to get Oracle running with Docker container.
Install Docker
First download Docker for Mae from the official website
‘You will need to create an account to do so Is rally fast and you need to
only enter a Docker ID, a passward and email, You will need it to install
‘more tools from Docker and manage you container.
Once you download the Dockerdmg file, double click on it and you
wil just
have to drag and drop the icon into the Application folder.
Now go to the application folder and run docker
‘You will see the docker icon on top right in your screen,
a You can check ifit's running by
clicking on it
Ovemnovew
‘Or you can launch the command below in a terminal
docker versionThe is several tasks you can do like run Kitematie which Iwill introduce
later.
Store the Oracle Database Image in your Docker
Now you need a Database to store in your docker
Several database images are avilable in dockerin this tutorial, tase
truevoly/orace-12c image, You can use iif it’s sil avalable, Otherwise
you can search for oracle-12-cimages in docker website
Ima terminal run this command to store the database image in your docker.
extol aes
The following message is printed once i's done
Status: Downloacled newer for truevoly/oracle-12clatest
Create the container
The container will allow you to store the database locally
The frst step isto create a folder forthe image
nidir ~/oracle-data
Now we create a container and mount i inthe latest folder using the oracle
12cimag
docker run -@ -p 8090:8080 -p 152121521 -v
forsee data/:7ubl/app/oracle truetaty/
A hash will be generated at the end ofthe execution
You can check ifthe container is running with this commandUse Kitematic to manage the container
kitematic is a legacy desktop solution that helps you manage docker
containers with a user interface
‘You can download it here htps://titematic.com/docs.
Once it's installed open it and you will see the running container inside
Create databases in command line
‘You can use the terminal to connect tothe database but it's better use a
e's easier to manage this way.
you still want to use command lines, it's accesible in kitematc.
you click to EXEC button, a terminal will pen.
You can connect to sqlplus with this command
salplus systen/oracleg//localhest:1821/x¢
Use
and databases are the same in orace-12c, so you can reate them inUse SQL developer
‘You can download sql developer from here. Decompress the zp fle and put
it in Application folder,
[Now open you SQI. developer,
‘You can tes the connection to your oracle database using the username
system and password oracle. Choose any connection name, You ean use
the default hostname, port and SID.
‘The connections established,
For example, you can rum this script in Sql developer to create a new
database named TEST,
‘CREATE USER TEST IDENTIFIED BY passtest DEFAULT TABLESPACE
LUSERS TEMPORARY TABLESPACE temp QUOTA 250M on USERS;
GRANT CONNECT, RESOURCE, DBA TO TEST,
(GRANT CREATE SESSION TO TEST;
GRANT CREATE TABLE TO TEST;
GRANT CREATE VIEW TO TEST,
GRANT CREATE ANY TRIGGER TO TEST;
GRANT CREATE ANY PROCEDURE TO TEST;
GRANT CREATE SEQUENCE TO TEST;
(GRANT CREATE SYNONYM TO TEST;
Fee! free to comment and clap if you find this article interesting.
Follow Mohamed Fofuna to get notified of my next post.
& con
g Mohamed Fofana
semenMore From Medium
sprin
boot
Secure a Spring Boot REST API
With JSON Web Token
Discover Medium
Sy
Howto use Java High Level Rest. _ Improve Java Code Coverage and
Client with Spring Boot to talk to Quality with Unit Tests and JaCoCo
AWS Elasticsearch Onn
Make Medium yours