Run and Test Oracle 18c XE Database
with VirtualBox and Vagrant
$ vagrant up
The default database connection parameters are:
- Hostname: localhost
- Port: 1521
- SID: XE
- PDB: XEPDB1
- EM Express port: 5500
- Password: open
.env
file
https://github.com/oracle/vagrant-projects/tree/main/OracleDatabase/18.4.0-XE
Login as oracle user using:
$ sudo su - oracle
Add the following to the end of oracle user's .bashrc:
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
export ORACLE_SID=XE
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
and type
source ~/.bashrc
Exit and go to the following site and download sql-developer: https://www.oracle.com/tools/downloads/sqldev-downloads.html
Install the .rpm and run the setup script:
$ sudo dnf -y install sqldeveloper-20.4.1.407.0006-20.4.1-407.0006.noarch.rpm
$ cd /opt/sqldeveloper/
$ ./sqldeveloper.sh
For HiDPI displays, append to /opt/oracle-sqldeveloper/sqldeveloper/bin/sqldeveloper.conf the following: AddVMOption -Dsun.java2d.uiScale=2
Login as oracle user using:
$ sudo su - oracle
How to add a non-system database user (so you don't have to see system tables): In a terminal type:
$ sqlplus sys as sysdba
Enter the lines:
SQL> alter session set "_ORACLE_SCRIPT"=true;
Create a local user called whatever you want. Type the password for the user in the following line after "identified by"
SQL> create user wury identified by 12345;
Grant your user admin privileges:
SQL> grant all privileges to wury;
Then exit the command prompt:
SQL> exit;
Build docker image
$ docker build -t ora-test .
Run
$ docker run --rm ora-test