Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Oracle 19c Install using RPM with vagrant+ansible

Hi

In this post we will see how to install Oracle 19c Database using RPM method with Vagrant Virtual box and via ansible playbook.

Pre-reqs

You need to have vagrant installed in your machine.

Steps:

  1. Download the repository for Vagrant and Ansible playbook here
  2. Download 19c database rpm from Oracle downloads and copy into your working folder
  3. simply run "vagrant up", this will create a virtual box and install oracle, create/configure a database

Here is the vagrant log file that build virtualbox for you.

C:\Users\gandhi\Documents\Ansible-Workshop\vagrantansibleoracle19c>vagrant up
Bringing machine 'oracledb' up with 'virtualbox' provider...
==> oracledb: Checking if box 'elastic/oraclelinux-7-x86_64' is up to date...
==> oracledb: Clearing any previously set forwarded ports...
==> oracledb: Clearing any previously set network interfaces...
==> oracledb: Preparing network interfaces based on configuration...
oracledb: Adapter 1: nat
==> oracledb: Forwarding ports...
oracledb: 22 (guest) => 2222 (host) (adapter 1)
==> oracledb: Running 'pre-boot' VM customizations...
==> oracledb: Booting VM...
==> oracledb: Waiting for machine to boot. This may take a few minutes...
oracledb: SSH address: 127.0.0.1:2222
oracledb: SSH username: vagrant
oracledb: SSH auth method: private key
==> oracledb: Machine booted and ready!
[oracledb] GuestAdditions 5.2.16 running --- OK.
==> oracledb: Checking for guest additions in VM...
==> oracledb: Setting hostname...
==> oracledb: Mounting shared folders...
oracledb: /vagrant => C:/Users/gandhi/Documents/Ansible-Workshop/vagrantansibleoracle19c
==> oracledb: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> oracledb: flag to force provisioning. Provisioners marked to run always will still run.

Playbook Log, run "vagrant provision" if you want to provision only.

C:\Users\gandhi\Documents\Ansible-Workshop\vagrantansibleoracle19c>vagrant provision
==> oracledb: Running provisioner: ansible_local...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.3.2.0).

Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
oracledb: Running ansible-playbook...

PLAY [oracledb] ****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [oracledb]

TASK [Update /etc/hosts from inventory] ****************************************
ok: [oracledb] => (item=oracledb)

TASK [Create Disk Partion] *****************************************************
ok: [oracledb]

TASK [Format Partition] ********************************************************
ok: [oracledb]

TASK [Mount the Partition] *****************************************************
ok: [oracledb]

TASK [copy rpm file to server] *************************************************
changed: [oracledb]

TASK [download pre-reqs] *******************************************************
changed: [oracledb]

TASK [install pre-reqs rpm] ****************************************************
changed: [oracledb]

TASK [provide permission to create folder /opt/oracle] *************************
changed: [oracledb]

TASK [install oracle database software rpm] ************************************
[WARNING]: Consider using file module with owner rather than running chown
changed: [oracledb]

TASK [create database using configure script] **********************************

changed: [oracledb]

PLAY RECAP *********************************************************************
oracledb                   : ok=10   changed=5    unreachable=0    failed=0

Configure Oracle Database using pre-defined script that comes with RPM

[root@oracledb19c init.d]# /etc/init.d/oracledb_ORCLCDB-19c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete

40% complete
43% complete
46% complete
Completing Database Creation51% complete

54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB1.log" for further details.

Oracle 19c database is ready and log on to it and practice .

Thanks

Suresh

Comments are closed.