Skip to content
Douglas Hawthorne edited this page Feb 5, 2021 · 2 revisions

Oracle Database Builds

Overview

This repository is for my benefit of creating patched database installation. You are welcome to use under the MIT Licence

Table Of Contents

Licensing

NOTE: This software is provided under the MIT Licence.

Releases

Current releases are:

  • V2.0 for 19C EE and 18C XE database installations
  • V1.0 for 18C XE database installation

Set-up

Site Preparation

You will need to prepare three (3) servers:

  1. Ansible controller
  2. Target systems
  3. NFS server

Ansible Controller

I use Ubuntu Server 20.04 running on a VM (see "Ubuntu Server: Basic installation" for more details, if you want to mirror my configuration.

Use the procedure, "Installing Ansible", to set up the Ansible controller your particular system.

Ansible Version 2.10

This software has NOT been tested successfully using an Ansible 2.10 controller. Indeed, I encountered so many issues that I installed an Ansible 2.9 controller for use with OL7 systems.

Target System

I have used two (2) target operating systems onto which I installed the database software. The installation manuals are:

  1. "Oracle® Linux 8 Installing Oracle Linux"
  2. "Oracle® Linux 7 Installation Guide"

SUDO Privileges on Target System

NOTE: You will need SUDO privileges on the target system where you want to install this software as several commands require ROOT privilege!

Ensure SSH Connectivity

On the Ansible 2.9 controller, ensure that you have SSH connectivity with the target servers. That is, use ssh-copy-id command to copy your public key from the Ansible 2.9 controller to the target servers:

ssh-copy-id host1

Accept the SSH host keys, and enter your password.

NFS Server

I use an NFS with a hard-coded address of 192.168.1.253. This address is set in the oracle-db-builds/inventory/group_vars/all.yml file through the nfs_sfotware_loc variable. You may want to change this to match your environment.

The NFS server in my environment is a NAS device. I created a share called Software on that device. This share has the following sub-directories:

  1. database
  2. Patches
  3. OPatch

You will need the following files and directory structure:

  • Software
    • database
      • LINUX.X64_193000_db_home.zip
      • oracle-database-xe-18c-1.0-1.x86_64.rpm
    • Patches
      • p31720396_190000_Linux-x86-64.zip
    • OPatch
      • p6880880_190000_Linux-x86-64.zip

NOTE: You will need an Oracle Support licence to download the last two (2) files. The first two (2) are provided free-of-charge by Oracle from Technical Resources.

Download Software

On the Ansible 2.9 controller, clone the release into your home directory.

NOTE: If you clone this software elsewhere, be sure to update the log_path setting in the ansible.cfg configuration file to match the new location.

Set Target Server Names

Edit the file oracle-db-build/inventory/hosts.

The Ansible playbook uses the inventoey group name to determine which version of the version of software to install. That is, put all hosts that will have Oracle 19C EE software in the V19C group. (Don't forget the ':' at the end of the host name.

Database Configuration Settings

The database configuration settings are found in the corresponding host variable file.

XE Settings

To set the configuration for an XE database on host1.example.com (for example), copy the contents of xe.yaocm.id.au.yml into host1.example.com.yml as shown below:

cd ~/oracle-db-build/inventory/host_vars
cp xe.yaocm.id.au.yml host1.example.com.yml

No changes are necessary in the current release.

19C Settings

To set the configuration for an XE database on host1.example.com (for example), copy the contents of goldengate1.yaocm.id.au.yml into host1.example.com.yml as shown below:

cd ~/oracle-db-build/inventory/host_vars
cp goldengate1.yaocm.id.au.yml host1.example.com.yml

Edit host1.example.com.yml to make the necessary changes. The settings should be self-explanatory. If you want a more detailed description, review the template file, ~/oracle-db-build/templates/db_install.rsp.j2.

Provide Missing Files

This distribution has two (2) missing files:

  1. Oracle passwords
  2. Ansible log directory

Set the Oracle Passwords

On the Ansible 2.9 controller, run the following commands to create the password file:

cd ~/oracle-db-build
mkdir passwords
cat >passwords/oracle.yml <<DONE
---
pw_all:         "pw1"
pw_sys:         "pw2"
pw_system:      "pw3"
pw_pdbadmin:    "pw4"
xe_password:    "pw5"
...
DONE

NOTE: You must change pw1, pw2, pw3, and pw4 to any password you want as long as there are:

  • at least one (1) special character,
  • at least one (1) uppercase letter,
  • at least one (1) lowercase letter,
  • at least one (1) digit, and
  • at least eight (8) characters in all.

NOTE: If pw1 is a non-empty string, pw2, pw3, and pw4 are ignored by the database installer.

NOTE: You must change pw5 to any password you want as long as there are:

  • no special characters,
  • at least one (1) uppercase letter,
  • at least one (1) lowercase letter,
  • at least one (1) digit, and
  • at least eight (8) characters in all.

NOTE: If your password does not meet all of these criteria for the XE software, the installation will go into an infinite loop! (See issue #8).

Create Logging Directory

On the Ansible 2.9 Controller, run the following commands to create a directory to store the log from the Ansible commands:

cd ~/oracle-db-build
mkdir logs

NOTE: You can change this directory in the configuration file, oracle-db-build/ansible.cfg by changing the value of the log_path parameter.

Usage Scenarios

Install and Create the XE Database

Run the following command on the Ansible 2.9 controller:

cd ~/oracle-db-build
ansible-playbook -K sites.yml --limit XE

You will be prompted for the password you use to SUDO on the target OL7 system.

Install and Create the GoldenGate Databases

Run the following command on the Ansible 2.9 controller:

cd ~/oracle-db-build
ansible-playbook -K sites.yml --limit @goldengate.txt

You will be prompted for the password you use to SUDO on the target OL8 system.

Raising Issues

Please raise any issues through the issues page. I will attend to these when I can. (See MIT Licence).