Docker and Oracle 11gr2

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###

install the 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

Starting Docker###

sudo systemctl start docker

Verifying Installation

We can verify if Docker CE is installed correctly by running the hello-world image.

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.

installation

docker pull wnameless/oracle-xe-11g

or for older Ubuntu 14.04.4

docker pull wnameless/oracle-xe-11g:14.04.4

and,

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...]

example:

 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

 oracle

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


Withdrawing Google Adsense Payment to eSewa in Nepal via Western Union

Quick how to guide on withdrawing your Google Adsense payment via Western Union remittance payment in Nepal. read more

Online Shopping Sites in Nepal

A curated list of ecommerce sites currently operating in Nepal providing different online shopping experience to Nepalese in different sectors. read more

Google Photos is really awesome! My Story

Sharing a piece of my story on how Google Photos eased my photo management. read more

Git remote basic commands

Git and Github basics read more

NASA Space Apps Challenge 2017 Kathmandu Nepal

International Space Apps 2017 held in Kathmandu, Nepal, Why should you participate in hackathons like NASA Space Apps, about the event blog and more. read more

Setting up git on Linux/Mac

Setup Git in your computer in few quick steps, be it on Linux (Ubuntu, Fedora, Redhat, Arch etc) or Mac or Windows read more

Oracle Database 11g tutorials

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

Buy Viber Out Credit without Credit Card with eSewa

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 header goes black, more design changes rolling soon

Github's navbar is black now! And yeah it didn't appeal me. More design changes coming soon. read more

How to activate 4G in Nepal Telecom Prepaid/Postpaid with review [video]

Nepal Telecom just launched 4g service for the first time in Nepal today. To actiate 4G in your mobile follow these steps read more

10 Best Games of the Year 2016 | Clash Royale tops the list

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 becomes App of the Year | 10 Best Apps of the Year 2016

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

Configuring Github Pages for site5 sub domains

Explaining to you, how you can configure DNS for sub domains in site5 site to github page sites in easiest manner. read more

Top Trending Technological Innovations in Nepal

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

How to uninstall Chinese 360cn Software/malware from your Windows Computer

Remove 360cn Chinese malware from your computer in easiest manner read more

Install iOS 10 on your device

Install the biggest update from apple to your iphone, ipad or any iOS device, the new iOS 10 is out now to the public. Install it today. read more

Doing facebook live from your computer

Live stream to facebook from your laptop or desktop computer in easiest way using OBS read more

Internet setting for Nepal Telecom and Ncell in iphone

Internet/3g/GPRS/4G/LTE Configuration setting for Nepal Telecom(NTC) and Ncell in an iphone in easiest way read more

What is fbstatic-a.akamaihd.net?

fbstatic-a.akamaihd.net is a Content Delivery Network(CDN) used by facebook read more

How to download a photo album from your facebook

Download albums from facebook at once. read more

Disabling automatic loading of last session in Sublime Text Editor

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