Recently, I came to know about Docker from my friends and I tried installing Oracle Database through Docker, this blog post is a small note on installing Oracle database 11gR2 on Linux machine. I am writing this thinking it would be easy for myself for future references and others who seek for such blog posts.
Installing Oracle Database 11g R2 with Docker on Linux is pretty easy and saves time and effort. In a matter of few minutes, you will have your Oracle database up and running and you can use it at your ease.
I did this installation on Fedora 25, and no matter what distro you are using it is totally same across all.
To install Oracle Database 11g R2 with Docker, proceed with following steps:
A. Docker Installation
Installing docker is easy and quick. I installed Docker Community Edition (CE) on Fedora. You can find the installation instruction step by step for your system in Docker’s official documentation. Click here
In my case, I followed the following steps for fedora:
setting up the repository
dnf-plugins-core package as it provides commands to manage repositories
sudo dnf -y install dnf-plugins-core
lets setup the stable repository
sudo dnf config-manager \ --add-repo \ https://download.docker.com/linux/fedora/docker-ce.repo
enable egde repository(optional)
sudo dnf config-manager --enable docker-ce-edge
Installing Docker CE
first, lets update the dnf package index
sudo dnf makecache fast
now, lets proceed by installing latest version of Docker
sudo dnf install docker-ce
sudo systemctl start docker
We can verify if Docker CE is installed correctly by running the
sudo docker run hello-world
By now, we will have Docker installed in our system. We need to use
sudo to run Docker Commands. If you have any errors or need full details please refer to Docker’s official site.
B. Oracle Database 11g R2 Installation
For installing Oracle Database on Docker, I followed these instruction from Github repo.
docker pull wnameless/oracle-xe-11g
or for older Ubuntu 14.04.4
docker pull wnameless/oracle-xe-11g:14.04.4
docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
to make ports 22 and 1521 opened
You might need to stop running Docker while proceeding installing Oracle installation commands
docker stop [OPTIONS] CONTAINER [CONTAINER...]
docker stop container_name
to list containers
sudo docker container ls
if wanted to connect remotely,
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
Now, start your Docker,
sudo systemctl start docker
Loging with SSH
ssh [email protected] -p 49160 password: admin
Connecting with Database
hostname: localhost port: 49161 sid: xe username: system password: oracle
Password for SYS and SYSTEM
And now, your are good to go, and start using Oracle Database 11g R2 on your linux machine with Docker.
To access database, you need to login with
ssh [email protected] -p 49160
in new session.
sqlplus command can be used to start doing database operations.
I am learning Oracle recently, I might write more about Oracle Databases and some useful notes. Do check back later. :)
Posts you might like
Setup Git in your computer in few quick steps, be it on Linux (Ubuntu, Fedora, Redhat, Arch etc) or Mac or Windows read more
all you need to know starting from very basic to advanced level of administrating Oracle Database 11g R2 edition. Also, this will be a supplement resource for TU Bsc CSIT... read more
Now, you don't need a credit/debit card to buy Viber Out Credits in Viber to make call to different numbers even when they don't have viber. read more
Github's navbar is black now! And yeah it didn't appeal me. More design changes coming soon. read more
Nepal Telecom just launched 4g service for the first time in Nepal today. To actiate 4G in your mobile follow these steps read more
Clash Royale gaming app becomes app of the year in app store. Read who made to the top 10 best games of the year 2016. read more
Prisma a fancy photo editing app becomes app of the year in app store. Read who made to the top 10 best apps of the year 2016. read more
Explaining to you, how you can configure DNS for sub domains in site5 site to github page sites in easiest manner. read more
The most used and liked technological products and innovations either developed in Nepal or the general public platforms that have brought major changes in the lifestyle of Nepalese people. Also,... read more
Remove 360cn Chinese malware from your computer in easiest manner read more
Live stream to facebook from your laptop or desktop computer in easiest way using OBS read more
fbstatic-a.akamaihd.net is a Content Delivery Network(CDN) used by facebook read more
You might have got irritated everytime seeing two windows of Sublime Text Editor being opened every time you open Sublime. Here is a quick fix to it. read more