Install Docker Community Edition (CE) using the instructions from the Docker website. If you are running older Windows OS (and home edition), you might have to install Docker Toolbox instead.
Open a terminal or commandline interface.
Download the docker-oracle-xe-11g image by executing the following command. More documentation on the image can be found here.
docker pull sath89/oracle-xe-11g
Run the docker-oracle image by executing the following
command. The identifier myoracle
is the name you give to
this running instance/container.
docker run -d --name=myoracle -p 8080:8080 -p 1521:1521 sath89/oracle-xe-11g
Note that the container is running without an interactive shell. Attach an interactive shell to the container using the following command
docker exec -it myoracle bash
Jump forward to the Test If Your Installation Works section and follow the instructions there. The oracle sys admin password is oracle.
You may exit the interactive shell by typing
exit
You may stop/start the container using
docker stop myoracle
It might sound trivial, but installing a commercial DBMS software is actually a valuable experience that job interviewers do appreciate!
You will need to use a DBMS to try out the SQL commands and queries when we start learning the SQL query language and when you work on the SQL homework assignment. While SQL is a standard, every vendor implements it with some quirks. For this course, we standardize on the free Oracle DBMS Express edition.
It is best to install the software NOW during the first week of the semester when you have less homework and more free time.
Go to the Oracle DBMS Download Page.
Download and install the win32/win64 version using the installation instructions for windows.
Check the installation instructions for linux to see if the version is compatible with Oracle.
If it is compatible, go to the Oracle DBMS Download Page., download and install the linux version using the same installation instructions.
Download & install VirtualBox
Download the iso image for CentOS Linux version 7.1 using the link http://mirror.ancl.hawaii.edu/linux/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso
Login using the username and password that you configured.
Open the Firefox browser and download the linux 64 bit version of Oracle 11g XE You might have to click on the network icon on the top right to turn networking when you login for the first time.
~/.bashrcx`
source ~/.bashrc
Start the command line shell as the system admin using the command:
sqlplus sys as sysdba
Enter the password that you gave while configuring Oracle earlier. You will now be placed in a SQL environment that only understands SQL commands.
Create a regular user account in Oracle using the SQL command:
create user USERNAME identified by PASSWORD;
Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password. If you had error executing the above with a message about resetlogs, then execute the following SQL command and try again:
alter database open resetlogs
Grant privileges to the user account using the SQL command:
grant connect, resource to USERNAME;
Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.
Exit the sys admin shell using the SQL command:
exit;
Start the commandline shell as a regular user using the command:
sqlplus
You will be prompted for a username and password. Once authenticated, you will be able to type in the standard SQL commands learned in class.
CREATE TABLE prod(id int, name char(40));
INSERT INTO prod VALUES (1, 'apple');
SELECT * FROM prod;