A few semester back I finished database design course at university. While the theory part was all about database design the lab part focused more on database manipulation. Or in simpler words it was all about SQL. Now if you want an RDBMS software what choices do you get? A lot! Oracle, Microsoft SQL Server, MySQL etc etc. The list will just rage on these days. Our lab instructor however insisted on using Oracle, and that bugged me out because I carry a macbook to the lab for lab works and – there’s no MacOS version by Oracle for the Oracle Database Express. But, we’re in the age of VM’s and who cares what OS you’re using? Use a VM, job done! Now should you install an entire OS on VM for that? Well, it’s overkill. That’s why Docker comes in, it creates a Linux VM where you can deploy install test and do whatever you want with your applications. The overhead is really negligible as if you’re natively running Oracle Server on your machine. Let’s see how to install Oracle Database Express 11g on your shiny Mac via Docker.
What you need
- Your Mac(iMac, Mac Mini, Mac Pro, Macbook Pro, Macbook Air or whatever Mac Apple is going to release after I publish this post)
- Make sure your machine has enough RAM to power a VM. Anything above 4GB is fine.
- Make sure again you’re running the Latest Version of MacOS
- Docker Toolbox + Kitematic
- And yes you need some time. Grab some coffee or Doritos if you want to.
First : Download Docker Toolbox and install it
Download Docker Toolbox + Kitematic dmg form this LINK . You know how to install from dmg images on your mac so I’m just skipping this part.
A note : MacOS may block the installer from running saying it’s unidentified. Just allow it from “Security and Privacy” in System Prefs.
Docker is a command line based tool and we don’t want to get pinned down with large commands, Kitematic, with it’s GUI makes life easier for us and helps completely forget that Docker needs cli. At least for our purpose!
If Docker shows some error like it’s unable to create the VM, install Oracle Virtual Box. A quick google will give you the link. First time installation will take a while so have patience. You’ve coffee and Doritos right?
When it’s ready you’ll get this Window. You can create an account if you want, or skip for now. I’d suggest opening an account. Has some benefits.
Next Part : Download and install Oracle Database Express 11g Image
You don’t need to look further! Just type in the name and Kitematic will find out the image for you(if it’s available).
Well well, a lot of choices , I mean images. So which one to choose? I’ll go with the marked one (because I’ve used it, tested, works.) – created by “wnameless”. Click on create and let the wait flow through you. Kitematic will download and install the image for you. Easy. You just need to wait.
Aaaaaaaaand we’re ready!
Kitematic has done the hardwork for us, now it’s time to get to work.
Now we need to start the server. Just click on start. Wait Until you see Unauthorized in Web Preview. The server needs some time to set in. Once you see it, click on the button beside right to web preview.
Oracle Database Express will now open in your system default web browser. You can copy paste the address to another browser if you want to!
Now you need a username and password. As the Docker image doc goes, you need to use these credentials.
username : system
password : oracle
Now this should be working pretty nice but it doesn’t. From my experience I’ve found that you can’t login this way. What you need to this , enter the credentials and when it asks again for credentials , cancel it, then refresh the page. It works this way. If you find a workaround, feel free to leave a comment. May help others (and me too!)
Hail the Oracle Database
So we’re in and this is what Oracle Database system looks.
Now what happens if you accidentally close the window? No problem, just open it from Docker again. Funny thing is , this time it won’t bother you with that login issue.
Let’s create an user and configure system admin for database
You now need an user account to work with the database and also need admin privilege to create user and workspaces for them. Now who’s the admin? You’re, and you’ve the login credentials we mentioned above.
Click on Application Express to begin with. Login with username : system and password : oracle.
For first time use, create a new user, a database and give the user a password. Now what if you’ve worked for some time then logged out and want to get back where you left off. Follow the instruction the the image, click on that button, enter the username and password you used when creating the user and you should be right back where you left off. Cool!
So let’s just wrap it. It was a long procedure, I hope you didn’t run out of coffee and Doritos.