Repository: hilverd/vagrant-ubuntu-oracle-xe
Branch: master
Commit: af2dc5c0874d
Files: 20
Total size: 22.5 KB
Directory structure:
gitextract_0crcgyjv/
├── .gitignore
├── LICENSE.txt
├── README.md
├── Vagrantfile
├── data-with-flyway/
│ ├── README.md
│ ├── flyway-SAMPLE.properties
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── resources/
│ └── database/
│ └── migrations/
│ ├── V1__Create_person_table.sql
│ ├── V2__Add_people.sql
│ └── V3__Ms_Bar_name_change.sql
├── flyway.sh
├── manifests/
│ └── base.pp
├── modules/
│ └── oracle/
│ ├── files/
│ │ ├── 60-oracle.conf
│ │ ├── S01shm_load
│ │ ├── chkconfig
│ │ ├── oracle-env.sh
│ │ └── xe.rsp
│ └── manifests/
│ └── init.pp
└── oracle-jdbc/
├── README.md
└── pom.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.project
.vagrant
flyway.properties
modules/oracle/files/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
modules/java
modules/maven
modules/stdlib
modules/wget
oracle-jdbc/ojdbc6.jar
target
================================================
FILE: LICENSE.txt
================================================
The MIT License (MIT)
Copyright (c) 2012-2014 Hilverd Reker
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# Oracle XE 11g on Ubuntu 12.04 using Vagrant
This project enables you to install Oracle 11g XE in a virtual machine running Ubuntu 12.04, using
[Vagrant] and [Puppet].
## Acknowledgements
This project was created based on the information in
[Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit] by Manish Raj, and the GitHub repository
[vagrant-oracle-xe] by Stefan Glase. The former explains how to install Oracle XE 11g on Ubuntu
12.04, without explicitly providing a Vagrant or provisioner configuration. The latter has the same
purpose as this project but uses Ubuntu 11.10.
Thanks to André Kelpe, Brandon Gresham, Charles Walker, Chris Thompson, Jeff Caddel, Joe FitzGerald,
Justin Harringa, Mark Crossfield, Matthew Buckett, Richard Kolb, and Steven Hsu for various
contributions.
## Requirements
* You need to have [Vagrant] installed.
* The host machine probably needs at least 4 GB of RAM (I have only tested 8 GB of RAM).
* As Oracle 11g XE is only available for 64-bit machines at the moment, the host machine needs to
have a 64-bit architecture.
* You may need to [enable virtualization] manually.
## Installation
* Check out this project:
git clone https://github.com/hilverd/vagrant-ubuntu-oracle-xe.git
* Install [vbguest]:
vagrant plugin install vagrant-vbguest
* Download [Oracle Database 11g Express Edition] for Linux x64. Place the file
`oracle-xe-11.2.0-1.0.x86_64.rpm.zip` in the directory `modules/oracle/files` of this
project. (Alternatively, you could keep the zip file in some other location and make a hard link
to it from `modules/oracle/files`.)
* *Optional:* To get [Flyway](http://flywaydb.org/) integration, download `ojdbc6.jar` for JDK 1.6 from
[Oracle Database 11g Release 2 11.2.0.4 JDBC Drivers](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html),
and place it in the directory `oracle-jdbc` of this project.
Migrations are in `data-with-flyway/src/main/resources/database/migrations`.
See `data-with-flyway/README.md` for more instructions.
Many thanks to [Nicholas Blair](https://github.com/nblair) for contributing this feature.
* Run `vagrant up` from the base directory of this project. The first time this will take a while -- up to 30 minutes on
my machine. Please note that building the VM involves downloading an Ubuntu 12.04
[base box](http://docs.vagrantup.com/v2/boxes.html) which is 323MB in size.
These steps are also shown in an [asciicast] made by Daekwon Kang:
[](https://asciinema.org/a/8438)
## Connecting
You should now be able to
[connect](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) to
the new database at `localhost:1521/XE` as `system` with password `manager`. For example, if you
have `sqlplus` installed on the host machine you can do
sqlplus system/manager@//localhost:1521/XE
To make sqlplus behave like other tools (history, arrow keys etc.) you can do this:
rlwrap sqlplus system/manager@//localhost:1521/XE
You might need to add an entry to your `tnsnames.ora` file first:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
## Troubleshooting
### Errors when Unzipping
If you get an error containing `/usr/bin/unzip -o oracle-xe-11.2.0-1.0.x86_64.rpm.zip returned 2` during `vagrant up`, then the zip file you have downloaded is probably corrupted. This can be fixed by re-downloading, replacing the corrupted file, and running `vagrant reload --provision`.
### Memory
It is important to assign enough memory to the virtual machine, otherwise you will get an error
ORA-00845: MEMORY_TARGET not supported on this system
during the configuration stage. In the `Vagrantfile` 512 MB is assigned. Lower values may also work,
as long as (I believe) 2 GB of virtual memory is available for Oracle, swap is included in this
calculation.
### Concurrent Connections
If you want to raise the limit of the number of concurrent connections, say to 200, then according
to [How many connections can Oracle Express Edition (XE) handle?] you should run
ALTER SYSTEM SET processes=200 scope=spfile
and restart the database.
## Alternatives
You may also want to consider a Docker-based solution such as
[docker-oracle-xe-11g](https://github.com/alexei-led/docker-oracle-xe-11g).
[Vagrant]: http://www.vagrantup.com/
[Puppet]: http://puppetlabs.com/
[Oracle Database 11g Express Edition]: https://www.oracle.com/database/technologies/xe-prior-releases.html
[Oracle Database 11g EE Documentation]: http://docs.oracle.com/cd/E17781_01/index.htm
[Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit]: http://meandmyubuntulinux.blogspot.co.uk/2012/05/installing-oracle-11g-r2-express.html
[vagrant-oracle-xe]: https://github.com/codescape/vagrant-oracle-xe
[vbguest]: https://github.com/dotless-de/vagrant-vbguest
[asciicast]: https://asciinema.org/a/8438
[How many connections can Oracle Express Edition (XE) handle?]: http://stackoverflow.com/questions/906541/how-many-connections-can-oracle-express-edition-xe-handle
[enable virtualization]: http://www.sysprobs.com/disable-enable-virtualization-technology-bios
================================================
FILE: Vagrantfile
================================================
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.box = "hashicorp/precise64"
config.vm.box_url = "https://vagrantcloud.com/hashicorp/precise64"
config.vm.hostname = "oracle"
# share this project under /home/vagrant/vagrant-ubuntu-oracle-xe
config.vm.synced_folder ".", "/home/vagrant/vagrant-ubuntu-oracle-xe", :mount_options => ["dmode=777","fmode=666"]
# Forward Oracle port
config.vm.network :forwarded_port, guest: 1521, host: 1521
# Provider-specific configuration so you can fine-tune various backing
# providers for Vagrant. These expose provider-specific options.
config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM
vb.customize ["modifyvm", :id,
"--name", "oracle",
# Oracle claims to need 512MB of memory available minimum
"--memory", "512",
# Enable DNS behind NAT
"--natdnshostresolver1", "on"]
end
# This is just an example, adjust as needed
config.vm.provision :shell, :inline => "echo \"America/New_York\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata"
config.vbguest.auto_update = true
$install_puppet_modules = <<SCRIPT
if [ -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then
mkdir -p /etc/puppet/modules
puppet module list | grep -q puppetlabs-java || puppet module install puppetlabs-java
puppet module list | grep -q maestrodev-maven || puppet module install maestrodev-maven
fi
SCRIPT
config.vm.provision "shell", inline: $install_puppet_modules
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "base.pp"
puppet.options = "--verbose --trace"
end
# Run the Maven goals for data-with-flyway
config.vm.provision "shell", path: "flyway.sh"
end
================================================
FILE: data-with-flyway/README.md
================================================
## Data With Flyway
This sub-project contains a means for creating tables and inserting data into the Oracle Express database.
Given you have followed all of the instructions on the parent project's README, this project is executed automatically
by Puppet during (re)provisioning.
If you want to add more tables and/or data to the Oracle Express instance, create files in
src/main/resources/database/migrations
following the examples provided. The included examples are originally from the
[Flyway Getting Started documentation](http://flywaydb.org/getstarted/firststeps/maven.html), with some Oracle-specific
changes.
To learn more about adding migrations, read [Migrations & Versions](http://flywaydb.org/documentation/migration/) and
[Sql-based migrations](http://flywaydb.org/documentation/migration/sql.html).
After adding files in `src/main/resources/database/migrations`, a quick way to run the Flyway migrations is
vagrant ssh -c 'bash ~/vagrant-ubuntu-oracle-xe/flyway.sh'
### Running Flyway Manually on the Host
You could also run Flyway manually on the host, assuming Oracle XE is up and running in the VM. You will need to perform
the steps documented in the [README for oracle-jdbc](../oracle-jdbc/README.md) to install the Oracle JDBC driver in your
Maven repository on the host OS.
Once done, running additional migrations is as simple as:
mvn install flyway:migrate
If you want to drop the schema and start over from scratch:
mvn flyway:clean
More commands are documented at [http://flywaydb.org/documentation/maven/](http://flywaydb.org/documentation/maven/).
================================================
FILE: data-with-flyway/flyway-SAMPLE.properties
================================================
# pom.xml contains these very same options and values
# If you want to change any flyway options and run flyway manually,
# copy this file as 'flyway.properties' (which is gitignored) and the values
# in flyway.properties will take precedence.
# Set the fully-qualified name of the JDBC driver class
flyway.driver=oracle.jdbc.driver.OracleDriver
# Set the JDBC URL to connect to
flyway.url=jdbc:oracle:thin:@localhost:1521:xe
# Set the credentials used to connect
flyway.username=system
flyway.password=manager
# Set the names all schemas referenced in the migrations (schema names are CASE-SENSITIVE with Oracle)
flyway.schemas=MYSCHEMA
## Additional properties are available, see http://flywaydb.org/documentation/maven/migrate.html
================================================
FILE: data-with-flyway/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.hilverd</groupId>
<artifactId>data-with-flyway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Data with Flyway</name>
<description>A subproject for https://github.com/hilverd/vagrant-ubuntu-oracle-xe that provides a means for creating tables and inserting data into the Oracle Express instance it provides.</description>
<properties>
<!-- Default properties are used in the event 'flyway.properties' is not available -->
<flyway.driver>oracle.jdbc.driver.OracleDriver</flyway.driver>
<flyway.url>jdbc:oracle:thin:@localhost:1521:xe</flyway.url>
<flyway.user>system</flyway.user>
<flyway.password>manager</flyway.password>
<flyway.schemas>MYSCHEMA</flyway.schemas>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.1</version>
<configuration>
<locations>
<location>classpath:database/migrations</location>
</locations>
</configuration>
<dependencies>
<!-- This dependency is not in Maven Central. See ../oracle-jdbc/README.md for instructions -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: data-with-flyway/src/main/resources/database/migrations/V1__Create_person_table.sql
================================================
CREATE TABLE MYSCHEMA.PERSON (
ID NUMBER(10) not null,
NAME VARCHAR2(100) not null
);
ALTER TABLE PERSON ADD (
CONSTRAINT person_pk PRIMARY KEY (ID));
CREATE SEQUENCE person_seq;
CREATE OR REPLACE TRIGGER person_autoinc
BEFORE INSERT ON PERSON
FOR EACH ROW
BEGIN
SELECT person_seq.NEXTVAL
INTO :new.id
FROM dual;
END;
================================================
FILE: data-with-flyway/src/main/resources/database/migrations/V2__Add_people.sql
================================================
insert into MYSCHEMA.PERSON (NAME) values ('Axel');
insert into MYSCHEMA.PERSON (NAME) values ('Mr. Foo');
insert into MYSCHEMA.PERSON (NAME) values ('Ms. Bar');
================================================
FILE: data-with-flyway/src/main/resources/database/migrations/V3__Ms_Bar_name_change.sql
================================================
update MYSCHEMA.PERSON set name='Mrs. Foo' where id=3;
================================================
FILE: flyway.sh
================================================
#!/bin/bash
set -e
if [ ! -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then
echo 'Not running Flyway migrations as oracle-jdbc/ojdbc6.jar is not present.'
echo 'See README.md if you want to use Flyway.'
exit 0
fi
if [ ! -d /root/.m2/repository/com/oracle/ojdbc6 ]; then
# Install the Oracle JDBC driver in the local Maven repository
cd /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc
mvn install:install-file -Dfile=ojdbc6.jar -DpomFile=pom.xml
fi
# Run Flyway migrations
mvn -f /home/vagrant/vagrant-ubuntu-oracle-xe/data-with-flyway/pom.xml compile flyway:migrate
================================================
FILE: manifests/base.pp
================================================
node oracle {
include oracle::server
include oracle::swap
include oracle::xe
user { "vagrant":
groups => "dba",
# So that we let Oracle installer create the group
require => Service["oracle-xe"],
}
}
$a = file('/home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar', '/dev/null')
if ($a != '') {
# java/maven needed for flyway command
class { 'java':
distribution => 'jdk',
}
class { "maven::maven":
version => "3.2.2",
}
package { 'maven':
ensure => present,
}
}
================================================
FILE: modules/oracle/files/60-oracle.conf
================================================
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=107374183
================================================
FILE: modules/oracle/files/S01shm_load
================================================
#!/bin/sh
case "$1" in
start)
mkdir /var/lock/subsys 2>/dev/null
touch /var/lock/subsys/listener
rm -rf /dev/shm 2>/dev/null
mkdir /dev/shm 2>/dev/null
mount -t tmpfs shmfs -o size=2048m /dev/shm
;;
*)
echo error
exit 1
;;
esac
================================================
FILE: modules/oracle/files/chkconfig
================================================
#! /bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
# http://meandmyubuntulinux.blogspot.co.uk/2012/05/installing-oracle-11g-r2-express.html
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
================================================
FILE: modules/oracle/files/oracle-env.sh
================================================
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
================================================
FILE: modules/oracle/files/xe.rsp
================================================
ORACLE_LISTENER_PORT=1521
ORACLE_HTTP_PORT=0
ORACLE_PASSWORD=manager
ORACLE_CONFIRM_PASSWORD=manager
ORACLE_DBENABLE=y
================================================
FILE: modules/oracle/manifests/init.pp
================================================
class oracle::server {
exec { "apt-update":
command => "/usr/bin/apt-get -y update",
timeout => 3600;
}
package {
["alien", "bc", "libaio1", "unixodbc", "unzip", "rlwrap", "dos2unix"]:
ensure => installed;
}
exec { "procps":
refreshonly => true,
command => "/etc/init.d/procps start";
}
file {
"/tmp/chkconfig":
mode => "0755",
source => "puppet:///modules/oracle/chkconfig";
"/tmp/60-oracle.conf":
notify => Exec['procps'],
source => "puppet:///modules/oracle/60-oracle.conf";
"/tmp/S01shm_load":
mode => "0755",
source => "puppet:///modules/oracle/S01shm_load";
}
# If we're running on Windows, then Git may have converted line endings to CRLF upon cloning the
# repository. Here we use dos2unix to make sure that they are LF.
exec {
"dos2unix chkconfig":
command => "/usr/bin/dos2unix -n /tmp/chkconfig /sbin/chkconfig",
creates => "/sbin/chkconfig",
require => [File["/tmp/chkconfig"], Package["dos2unix"]];
"dos2unix 60-oracle.conf":
command => "/usr/bin/dos2unix -n /tmp/60-oracle.conf /etc/sysctl.d/60-oracle.conf",
creates => "/etc/sysctl.d/60-oracle.conf",
require => [File["/tmp/60-oracle.conf"], Package["dos2unix"]];
"dos2unix S01shm_load":
command => "/usr/bin/dos2unix -n /tmp/S01shm_load /etc/rc2.d/S01shm_load",
creates => "/etc/rc2.d/S01shm_load",
require => [File["/tmp/S01shm_load"], Package["dos2unix"]];
}
user {
"syslog":
ensure => present,
groups => ["syslog", "adm"];
}
group {
"puppet":
ensure => present;
}
exec { "set up shm":
command => "/etc/rc2.d/S01shm_load start",
require => Exec["dos2unix S01shm_load"],
user => root,
unless => "/bin/mount | grep /dev/shm 2>/dev/null";
}
Exec["apt-update"] -> Package <| |>
}
class oracle::swap {
exec {
"create swapfile":
# Needs to be 2 times the memory
command => "/bin/dd if=/dev/zero of=/swapfile bs=1M count=1024",
user => root,
creates => "/swapfile";
"set up swapfile":
command => "/sbin/mkswap /swapfile",
require => Exec["create swapfile"],
user => root,
unless => "/usr/bin/file /swapfile | grep 'swap file' 2>/dev/null";
"enable swapfile":
command => "/sbin/swapon /swapfile",
require => Exec["set up swapfile"],
user => root,
unless => "/bin/cat /proc/swaps | grep '^/swapfile' 2>/dev/null";
"add swapfile entry to fstab":
command => "/bin/echo >>/etc/fstab /swapfile swap swap defaults 0 0",
user => root,
unless => "/bin/grep '^/swapfile' /etc/fstab 2>/dev/null";
}
file {
"/swapfile":
mode => "600",
owner => root,
group => root,
require => Exec['create swapfile'];
}
}
class oracle::xe {
file {
"/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip":
source => "puppet:///modules/oracle/oracle-xe-11.2.0-1.0.x86_64.rpm.zip";
"/tmp/oracle-env.sh":
source => "puppet:///modules/oracle/oracle-env.sh";
"/tmp/xe.rsp.orig":
source => "puppet:///modules/oracle/xe.rsp";
"/bin/awk":
ensure => link,
target => "/usr/bin/awk";
"/var/lock/subsys":
ensure => directory;
"/var/lock/subsys/listener":
ensure => present;
}
exec {
"dos2unix oracle-env.sh":
command => "/usr/bin/dos2unix -n /tmp/oracle-env.sh /etc/profile.d/oracle-env.sh",
creates => "/etc/profile.d/oracle-env.sh",
require => [File["/tmp/oracle-env.sh"], Package["dos2unix"]];
"dos2unix xe.rsp":
command => "/usr/bin/dos2unix -n /tmp/xe.rsp.orig /tmp/xe.rsp",
creates => "/tmp/xe.rsp",
require => [File["/tmp/xe.rsp.orig"], Package["dos2unix"]];
}
exec {
"unzip xe":
command => "/usr/bin/unzip -o oracle-xe-11.2.0-1.0.x86_64.rpm.zip",
require => [Package["unzip"], File["/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip"]],
cwd => "/home/vagrant",
user => root,
creates => "/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm",
timeout => 3600,
unless => "/usr/bin/test -f /etc/default/oracle-xe";
"alien xe":
command => "/usr/bin/alien --to-deb --scripts Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm",
cwd => "/home/vagrant",
require => [Package["alien"], Exec["unzip xe"]],
creates => "/home/vagrant/oracle-xe_11.2.0-2_amd64.deb",
user => root,
timeout => 3600,
unless => "/usr/bin/test -f /etc/default/oracle-xe";
"configure xe":
command => "/etc/init.d/oracle-xe configure responseFile=/tmp/xe.rsp >> /tmp/xe-install.log",
timeout => 3600,
require => [Package["oracle-xe"],
Exec["dos2unix oracle-env.sh"],
Exec["dos2unix xe.rsp"],
File["/var/lock/subsys/listener"],
Exec["set up shm"],
Exec["enable swapfile"]],
creates => "/etc/default/oracle-xe";
}
package {
"oracle-xe":
provider => "dpkg",
ensure => latest,
require => [Exec["alien xe"]],
source => "/home/vagrant/oracle-xe_11.2.0-2_amd64.deb",
}
exec {
"run chkconfig":
command => "/sbin/chkconfig",
user => root,
require => Service["oracle-xe"];
}
service {
"oracle-xe":
ensure => "running",
require => [Package["oracle-xe"],
Exec["configure xe"],
Exec["dos2unix chkconfig"],
Exec["dos2unix 60-oracle.conf"]],
}
}
================================================
FILE: oracle-jdbc/README.md
================================================
## Oracle JDBC Driver
This folder is here to provide people that use this project a way to install Oracle JDBC driver in their
local Maven repository on the host.
### Installation (Manual)
You don't need to do this by hand; Puppet has instructions to run these steps automatically on the guest. These steps
are provided here for reference.
1. Go to [http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html)
2. Accept the license and download the `ojdbc6.jar` file under the *Oracle Database 11g Release 2 (11.2.0.4) JDBC
Drivers* heading ("Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support
in Oracle Object and Collection types.").
3. Execute the following maven command to place the jar in your local Maven repository (`~/.m2/repository`):
mvn install:install-file -Dfile=ojdbc6.jar -DpomFile=pom.xml
If you are running this command on Windows, since Windows' shell is terrible, you need to quote each argument
individually, like so:
mvn install:install-file '-Dfile=ojdbc6.jar' '-DpomFile=pom.xml'
================================================
FILE: oracle-jdbc/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
<name>Oracle 11G JDBC Driver</name>
<description>Oracle Database 11g Release 2 (11.2.0.4) JDBC Drivers</description>
</project>
gitextract_0crcgyjv/
├── .gitignore
├── LICENSE.txt
├── README.md
├── Vagrantfile
├── data-with-flyway/
│ ├── README.md
│ ├── flyway-SAMPLE.properties
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── resources/
│ └── database/
│ └── migrations/
│ ├── V1__Create_person_table.sql
│ ├── V2__Add_people.sql
│ └── V3__Ms_Bar_name_change.sql
├── flyway.sh
├── manifests/
│ └── base.pp
├── modules/
│ └── oracle/
│ ├── files/
│ │ ├── 60-oracle.conf
│ │ ├── S01shm_load
│ │ ├── chkconfig
│ │ ├── oracle-env.sh
│ │ └── xe.rsp
│ └── manifests/
│ └── init.pp
└── oracle-jdbc/
├── README.md
└── pom.xml
SYMBOL INDEX (1 symbols across 1 files) FILE: data-with-flyway/src/main/resources/database/migrations/V1__Create_person_table.sql type MYSCHEMA (line 1) | CREATE TABLE MYSCHEMA.PERSON (
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (25K chars).
[
{
"path": ".gitignore",
"chars": 181,
"preview": ".project\n.vagrant\n\nflyway.properties\n\nmodules/oracle/files/oracle-xe-11.2.0-1.0.x86_64.rpm.zip\nmodules/java\nmodules/mave"
},
{
"path": "LICENSE.txt",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2012-2014 Hilverd Reker\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "README.md",
"chars": 5358,
"preview": "# Oracle XE 11g on Ubuntu 12.04 using Vagrant\n\nThis project enables you to install Oracle 11g XE in a virtual machine ru"
},
{
"path": "Vagrantfile",
"chars": 2144,
"preview": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n # All Vagrant configuration is done here."
},
{
"path": "data-with-flyway/README.md",
"chars": 1609,
"preview": "## Data With Flyway\n\nThis sub-project contains a means for creating tables and inserting data into the Oracle Express da"
},
{
"path": "data-with-flyway/flyway-SAMPLE.properties",
"chars": 740,
"preview": "# pom.xml contains these very same options and values\n# If you want to change any flyway options and run flyway manually"
},
{
"path": "data-with-flyway/pom.xml",
"chars": 1576,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "data-with-flyway/src/main/resources/database/migrations/V1__Create_person_table.sql",
"chars": 343,
"preview": "CREATE TABLE MYSCHEMA.PERSON (\n ID NUMBER(10) not null,\n NAME VARCHAR2(100) not null\n);\n\nALTER TABLE PERSON ADD (\n"
},
{
"path": "data-with-flyway/src/main/resources/database/migrations/V2__Add_people.sql",
"chars": 161,
"preview": "insert into MYSCHEMA.PERSON (NAME) values ('Axel');\ninsert into MYSCHEMA.PERSON (NAME) values ('Mr. Foo');\ninsert into M"
},
{
"path": "data-with-flyway/src/main/resources/database/migrations/V3__Ms_Bar_name_change.sql",
"chars": 54,
"preview": "update MYSCHEMA.PERSON set name='Mrs. Foo' where id=3;"
},
{
"path": "flyway.sh",
"chars": 608,
"preview": "#!/bin/bash\n\nset -e\n\nif [ ! -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then\n echo 'Not running"
},
{
"path": "manifests/base.pp",
"chars": 540,
"preview": "node oracle {\n include oracle::server\n include oracle::swap\n include oracle::xe\n\n user { \"vagrant\":\n groups => \"d"
},
{
"path": "modules/oracle/files/60-oracle.conf",
"chars": 154,
"preview": "# Oracle 11g XE kernel parameters \nfs.file-max=6815744 \nnet.ipv4.ip_local_port_range=9000 65000 \nkernel.sem=250 32000"
},
{
"path": "modules/oracle/files/S01shm_load",
"chars": 270,
"preview": "#!/bin/sh\n\ncase \"$1\" in\n start)\n mkdir /var/lock/subsys 2>/dev/null\n touch /var/lock/subsys/listener\n rm -rf /"
},
{
"path": "modules/oracle/files/chkconfig",
"chars": 659,
"preview": "#! /bin/bash\n# Oracle 11gR2 XE installer chkconfig hack for Ubuntu\n# http://meandmyubuntulinux.blogspot.co.uk/2012/05/in"
},
{
"path": "modules/oracle/files/oracle-env.sh",
"chars": 248,
"preview": "export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe\nexport ORACLE_SID=XE\nexport NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`"
},
{
"path": "modules/oracle/files/xe.rsp",
"chars": 119,
"preview": "ORACLE_LISTENER_PORT=1521\nORACLE_HTTP_PORT=0\nORACLE_PASSWORD=manager\nORACLE_CONFIRM_PASSWORD=manager\nORACLE_DBENABLE=y\n"
},
{
"path": "modules/oracle/manifests/init.pp",
"chars": 5539,
"preview": "class oracle::server {\n exec { \"apt-update\":\n command => \"/usr/bin/apt-get -y update\",\n timeout => 3600;\n }\n\n p"
},
{
"path": "oracle-jdbc/README.md",
"chars": 1189,
"preview": "## Oracle JDBC Driver\n\nThis folder is here to provide people that use this project a way to install Oracle JDBC driver i"
},
{
"path": "oracle-jdbc/pom.xml",
"chars": 461,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
}
]
About this extraction
This page contains the full source code of the hilverd/vagrant-ubuntu-oracle-xe GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 20 files (22.5 KB), approximately 7.0k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.