Skip to content

Oracle XE & APEX build script along with images for popular cloud platforms

License

Notifications You must be signed in to change notification settings

tomck/oraclexe-apex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnalyticsThis document is best viewed in flatdoc format

Oracle XE & APEX

The goal of this project is to make it easy for developers to quickly build and/or launch a fully functional instance of Oracle XE and APEX. The scripts provided in this project handle the automatic build.

Note: Currently this build is not recommended for production us as it lacks backup scripts, SSL encryption for APEX, etc. These features will be implemented in future releases.

For more information and to signup for our email list go to oraopensource.com. You can follow the related blogs on this project here.

If you need additional help, there is a How-To video for this installation which walks you through the entire process.

Current Software Versions

App Version Description
Oracle XE 11.2.0.2.0
SQLcl 4.1.0 Release Candidate Command line SQL (beta)
APEX 5.0.0.00.31 Currently supports APEX 5.x and APEX 4.x releases. Just reference the appropriate file in config.properties
ORDS 3.0.0.121.10.23
Tomcat 7.0.57
Node-oracledb 0.3.1 Node.js driver for Oracle: https://github.com/oracle/node-oracledb

Supported OS's

This script currently works on the following Linux distributions

OS Version
CentOS 7.0.1406
Fedora 21
Oracle Enterprise Linux 7.0
Debian 8.0

Deployment Options

Option Description
Native Build This is the default option and assumes thats you will be running this script on the machine that it will be installed on. Common uses of this is to run in a VM or cloud machine.
Vagrant Vagrant is a tool for building development environments. Some additional configuration is required when running this script with Vagrant. These changes are noted in the documentation
Prebuilt Images Due to licensing issues, we can not provide a prebuilt image or appliance. As such you will need to manually build the VM yourself with the provided scripts.

If you are using Amazon AWS EC2, please be sure to follow the configuration steps listed here.

Build

You can build your own VM with the following instructions.

Download

###Native Build

#Ensure user is currently root
if [ "$(whoami)" != "root" ]; then
  sudo -i
fi

cd /tmp

#Install Git
if [ -n "$(command -v yum)" ]; then
  #RHEL type OS
  yum install git -y
else
  #Debian type OS
  apt-get install git-core
fi

git clone https://github.com/OraOpenSource/oraclexe-apex.git
cd oraclexe-apex

###Vagrant Run the following on your host machine (you will need git installed on your host machine):

git clone https://github.com/OraOpenSource/oraclexe-apex.git
cd oraclexe-apex

Configure

If doing a Vagrant install can modify config.properties in your local text editor.

#Look for "CHANGEME" in this file
#Hints for vi:
#Type:<esc key>?CHANGEME   to search for CHANGEME
#Once done modifying an entry, hit <esc> and type: n  to search for next entry
#Read below for help on modifying this file
vi config.properties

Files

Due to licensing requirements, you must download the Oracle installation files and modify the following parameters in the config file with the location of these files.

Parameter Desc
OOS_ORACLE_FILE_URL Download: http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html
OOS_APEX_FILE_URL Download: http://download.oracleapex.com
OOS_ORDS_FILE_URL Download: http://www.oracle.com/technetwork/developer-tools/rest-data-services/overview/index.html
OOS_SQLCL_FILE_URL Download: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html

This is an optional file

These can be references to files on a web server or to the location on the server. Some examples:

#Assuming the file resided on myserver.com
OOS_ORACLE_FILE_URL=http://myserver.com/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
#Assuming the file is placed in the /tmp folder on the machine
OOS_ORACLE_FILE_URL=file:///tmp/oracle-xe-11.2.0-1.0.x86_64.rpm.zip

You can copy files from your local machine to the remote server easily using scp. Example:

scp oracle-xe-11.2.0-1.0.x86_64.rpm.zip username@servername.com:/tmp

####Files-Vagrant Vagrant automatically maps your current folder to /vagrant on its VM. You can copy your files to the subdirectory files in oraclexe_apex (on your host machine) and reference them with /vagrant/files/<filename>. The files subdirectory has been added to .gitignore to exclude the installation files from version control.

Example:

OOS_ORACLE_FILE_URL=file:///vagrant/files/oracle-xe-11.2.0-1.0.x86_64.rpm.zip

Modules

You can optionally chose which modules you want installed. This install supports the following optional modules which can be modified in config.properties

Module Default Description
OOS_MODULE_ORACLE Y Install Oracle XE
OOS_MODULE_APEX Y Install's APEX and all of it's components (Tomcat, ORDS, etc)

APEX

There are additional APEX configurations that you may want to make in the scripts/apex_config.sql file. You can run them later on or manually configure them in the APEX admin account.

###Vagrant By default you don't need to configure anything, however you may want to modify various things about your Vagrant machine. To do so, modify Vagrantfile.

Build

To build the server run the following commands. It is very important that you run it starting from the same folder that it resides in.

###Native Install

. build.sh

###Vagrant

vagrant up

How to connect

Oracle / SQL*Plus / SQLcl

There are many different ways to connect to Oracle with SQL*Plus. The How to Connect to Oracle document covers them.

Username Password Description
OOS_USER oracle User you can use to develop with right away
SYS oracle
SYSTEM oracle
APEX_PUBLIC_USER oracle

To start/stop/restart Oracle run the following commands:

/etc/init.d/oracle-xe start
/etc/init.d/oracle-xe stop
/etc/init.d/oracle-xe restart

APEX

To connect to APEX go to http://<server_name>/ and it will direct you to the APEX login page.

Workspace Username Password Description
INTERNAL admin Oracle1! Workspace administrator account
OOS_USER oos_user oracle You can start developing on this account. It is linked to OOS_USER schema

APEX Web Listener

This project uses Node4ORDS as a web listener. The Node4ORDS project provides the ability to serve static content and will provide additional web server functionality. Please read its documentation for more information.

Node4ORDS is installed in /opt/node4ords. It can be controlled by:

systemctl start node4ords
systemctl stop node4ords

Static content can be put in /var/www/public/ and referenced by http://<server_name>/public/<filepath>. More information about the web listener configuration can be found at the Node4ORDS project page.

ORDS

Oracle REST Data Services (ORDS) allows web servers (such as Tomcat) to connect serve up APEX pages. It is located in /ords

The APEX images are stored in /ords/apex_images

Since ORDS is a module that is added to Tomcat, there is no direct stop/stop commands for it. To restart ORDS, restart Tomcat.

Tomcat Manager

This server uses Apache Tomcat as the web container for ORDS. By default, the firewall restricts public access to the Tomcat server directly. Note: To access APEX, you do not need to reference Tomcat directly (via port 8080 by default). Connecting to Tomcat is only required for additional debugging or configuration.

If you do want to make it accessible run:

service firewalld start
firewall-cmd --zone=public --add-service=tomcat

You can then access Tomcat Manager via http://<server_name>:8080/manager or Application Express via http://<server_name>:8080/ords

Username Password Description
tomcat oracle Admin account

By default the admin account is tomcat/oracle

To disable Tomcat firewall access run: note: if you don't disable it, the next time the server is rebooted it will be disabled.

firewall-cmd --zone=public --remove-service=tomcat

Tomcat is located in /usr/share/tomcat/. Tomcat can be controlled by:

systemctl stop tomcat
systemctl start tomcat

Port Configurations

The default port settings are as follows:

Port Service Open Description
22 SSH Yes
80 Node.js Yes HTTP Server
1521 Oracle SQL connection Optional (default: No)
8080 Tomcat Optional (default: No)
8081 PL/SQL Gateway No Disabled by default

Open Optional ports can be configured inconfig.properties in the FIREWALL section. If you want to modify the firewall settings after running the build script, open scripts/firewalld.sh and look for examples on how to open (both temporarily and permanently).

To start/stop the Firewall:

systemctl start firewalld
systemctl stop firewalld

Vagrant Port Mapping

The following ports are mapped to the host and can be configured in Vagrantfile:

Port Host Port Service Description
22 50022 SSH An additional port may be assigned by Vagrant.
80 50080 Node.js HTTP Server
1521 50521 Oracle SQL connection The port is mapped but usable only if permitted by firewall rules **.
** See [Port Configurations](#port-configurations).

Other

OS Utility Scripts

When setting up a new server their are some common things that you may want to do such as creating a new user, disabling root SSH access, etc. Though these tasks are outside the goal of this project, we've created a new folder utils/os to store some of these common scripts which may help when setting up a new server.

Oracle Utility Scrpts

This install uses some common Oracle scripts that may be useful to run at a later time. For example, the oracle_create_user.sql, creates a user with all the necessary privileges to start using. For more info, go to the oracle folder.

Editing server files locally

To make it easier to edit files on the server (and avoid using vi), Remote-Atom (ratom) is installed by default. This requires that you have the Atom text editor on your desktop and have installed the ratom.

When you connect to the server use the following connection string:

ssh -R 52698:localhost:52698 <username>@<server_name_or_ip_address>

Note: Port 52698 is the default port and can be changed in the plugins settings in Atom

Once you're connected, to edit a file locally, simply type:

ratom <myfile>

The file will then appear in your Atom editor.

About

Oracle XE & APEX build script along with images for popular cloud platforms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 84.8%
  • PLSQL 15.2%