Step By Step install Oracle 19cR2 Database on OEL 7.6 (64-Bit)

Basic Installation

  • Boot from the DVD. Use the up arrow to pick the “Install Oracle Linux 7.0” option and hit the return key.
  • Select the appropriate language and select the “Set keyboard to default layout for selected language” option, then click the “Continue” button.

Click the “I want to proceed.” button on the pre release software warning screen.

  • You are presented with the “Installation Summary” screen. You must complete any marked items before you can continue with the installation. Depending on your requirements, you may also want to alter the default settings by clicking on the relevant links.

 

  • Click the “Installation Destination” link.
  • If you are happy to use automatic partitioning of the whole disk, click the “Done” button to return to the previous screen.

 

 

  • If you want to modify the partitioning configuration, click the “Continue” button and work through the partitioning screens.
  • It would be advisable to click on the “Software Selection” link and pick the following options if you want a GUI console.
    • Base Environment > Server with GUI
    • Add-ons for Selected Environment > Compatibility Libraries
    • Add-ons for Selected Environment > Development Tools

    Once you have completed your selections, click the “Done” button.

  • Once you have completed your alterations to the default configuration, click the “Begin Installation” button.
  • Click the “Root Password” link.

Enter the root password and click the “Done” button.

  • Click the “User Creation” link.
  • Enter the user details and select the “Make this user administrator” option, then click the “Done” button.

Wait for the installation to complete. When prompted, click the “Reboot” button.

Click the “License Information” link. Check the “I accept the license agreement” checkbox and click the “Done” button. When you return to the previous screen, click the “Finish Configuration” button.

 

Decide if you want to use Kdump and click the “Forward” button.

Decide if you want to set up software updates and click the “Forward” button. If you chose not to register with ULN, you will need to confirm you decision also.

Click the “Forward” button.

 

  • Finish Updates Setup
  • On the sign-in screen, click on the user you want to log in as
  • Enter the password and click the “Sign In” button.
  • Accept the language by clicking the “Next” button.
  • Accept the input sources by clicking the “Next” button.
  • Click the “Start using Oracle Linux Server” button.Thank You
  • Install Vmware tools to do some internal works.

  • While installing Oracle 19c binaries on OEL 7.6. First, we need to download the software then unzip it on oracle home and start runInstaller from the software location.
  • Select a “Set Up Software Only” and click next.
  • Select on “Single instance database Installation” and click on next.
  • Select on “Enterprise Edition” and click on next .
  • Put the Oracle Base and click on next
  • Put the “Inventory Directory” and click on next
  • Select appropriate group and click on next

  • Provide the root password if you want to run the scripts automatically.
  • Check the prerequisite for installation
  • Review the summary page and click on install
  • After Installation progress completed.
  • To complete the installation on click on close.

Load bash profile then run dbca

  • Log in as the Oracle software owner.
  • Go to a command prompt.
  • Type dbca.
  • You see a splash screen and another screen with options

Select Create a Database option to create a new Db

  • Select the Create a Database option.

    You are presented with the option of using a default configuration or an advanced one.

  • If you Select the Advanced option.
  • Click Next.

You’ll see output. Optional database templates are shown:

  • General Purpose
  • Data Warehouse
  • Custom Database

 

As i selected the Typical configuration provide Location of Datafile and FRA then provide password

Set the Oracle Home and connect to Sqlplus

we are successfully completed binary installation and Database installation of Oracle 19c

Catch Me On:- Hariprasath Rajaram 

Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hariprasathdba Facebook:https://www.facebook.com/HariPrasathdba                      FB Group:https://www.facebook.com/groups/894402327369506/             FB Page: https://www.facebook.com/dbahariprasath/?               Twitter: https://twitter.com/hariprasathdba

Installing Oracle Client In Silent Mode Using Response File

Though GUI is a preferable method to do client installation, But sometimes DBAs might be not to be able to xmanager to enable GUI for the server. In that case, installation using response file will be useful.

In this example, we will do the installation of Oracle client 11.2.0.4 version.

1. Download Oracle client software from oracle portal.- 

2. Copy and unzip the software in the server

3. Update the response file.

4. Now do the installation silently.

COMMAND – ./runInstaller -ignoreSysPrereqs -showProgress -silent -responseFile /software/client/response/client_install.rsp

 

[oracle@abhi Desktop]$ df -h
Filesystem   Size   Used   Avail   Use%   Mounted on
/dev/sda2    15G    12G    2.5G    83%      /
tmpfs        1.5G   188K   1.5G    1%       /dev/shm
/dev/sda1    2.0G   81M    1.8G    5%       /boot
/dev/sda5    3.9G   93M    3.6G    3%       /home
/dev/sda3    5.8G   211M   5.3G    4%       /tmp
/dev/sda7    20G    15G    3.7G    81%      /u01
.host:/      183G   26G    158G    14%      /mnt/hgfs

[oracle@abhi Desktop]$ cd /mnt/hgfs/
[oracle@abhi hgfs]$ ls
hero
[oracle@abhi hgfs]$ cd hero/
[oracle@abhi hero]$ ls
database p13390677_112040_Linux-x86-64_2of7.zip
p13390677_112040_Linux-x86-64_1of7.zip
[oracle@abhi hero]$ cd database/
[oracle@abhi database]$ ;s
bash: syntax error near unexpected token `;'
[oracle@abhi database]$ ls
install response runInstaller stage
readme.html rpm sshsetup welcome.html
[oracle@abhi database]$ cd response/
[oracle@abhi response]$ pwd
/mnt/hgfs/hero/database/response
[oracle@abhi response]$ cp dbca.rsp dbca.rsp_bkp
[oracle@abhi response]$ cp db_install.rsp db_install.rsp_bkp
[oracle@abhi response]$ cp netca.rsp netca.rsp_bkp
[oracle@abhi response]$ ls
dbca.rsp db_install.rsp netca.rsp
dbca.rsp_bkp db_install.rsp_bkp netca.rsp_bkp
[oracle@abhi response]$ vi dbca.rsp
[oracle@abhi response]$ vi dbca.rsp
[oracle@abhi response]$ dbca -silent -responseFile /mnt/hgfs/hero/database/response/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/silent/silent.log" for further details.
[oracle@abhi response]$

[oracle@abhi response]$ ps -ef | grep pmon
oracle 4340 1 0 21:59 ? 00:00:00 ora_pmon_SILENTDB
oracle 7724 3428 0 22:05 pts/0 00:00:00 grep pmon

[oracle@abhi response]$ export ORACLE_SID=SILENTDB
[oracle@abhi response]$ !sq
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 11 22:12:40 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME                          OPEN_MODE
---------                 --------------------
SILENT                        READ WRITE
SQL> select file_name,tablespace_name from dba_data_files;

FILE_NAME                                     TABLESPACE_NAME
------------------------------         -----------------------
/u01/app/oracle/oradata/silent/users01.dbf         USERS

/u01/app/oracle/oradata/silent/undotbs01.dbf       UNDOTBS1

/u01/app/oracle/oradata/silent/sysaux01.dbf        SYSAUX

FILE_NAME                                  TABLESPACE_NAME
------------------------                 --------------------
/u01/app/oracle/oradata/silent/system01.dbf    SYSTEM

Thus the oracle silent mode installation completed successfully.

Catch Me On:- Hariprasath Rajaram 

Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/ Facebook:https://www.facebook.com/HariPrasathdba                       FB Group:https://www.facebook.com/groups/894402327369506/                   FB Page: https://www.facebook.com/dbahariprasath/? Twitter: https://twitter.com/hariprasathdba

Oracle Automation-Creating Oracle 12c Database Using Ansible Tool

Description:-

In this article we are going to see Oracle Automation-Oracle Database Creation Using Ansible Tool

Let’s start the Demo:-

Steps to create Oracle database using Ansible :-

Step 1:- Download the ansible modules from  github site.Click Here

Step 2:-Move the ZIP file to ansible server.

[root@ansible Desktop]# unzip ansible-oracle-master.zip
Archive: ansible-oracle-master.zip
1bbb35d690c102e23488537754ff8d1e0a99dc15
creating: ansible-oracle-master/
[root@ansible Desktop]# ls -lrt
total 4272
drwxrwxr-x. 8 ansible ansible 4096 Jun 26 2015 ansible-1.9.2
-rwxrw-rw-. 1 ansible ansible 75962 Jan 8 2018 ansible-oracle-modules-master.zip
-rwxrw-rw-. 1 ansible ansible 1642329 Jul 19 23:21 get-pip.py
-rwxrw-rw-. 1 ansible ansible 927525 Jul 25 02:59 ansible-1.9.2.tar.gz
-rwxrw-rw-. 1 ansible ansible 1357336 Jul 25 03:14 ansible-1.9.2-1.mga5.noarch.rpm
drwxr-xr-x. 7 root root 4096 Jul 30 11:12 ansible-oracle-master
drwxrwxr-x. 3 ansible ansible 4096 Jul 30 18:04 ansible-oracle-modules-master
-rwxrw-rw-. 1 ansible ansible 349507 Jul 30 22:33 ansible-oracle-master.zip

Step 3:- Create a single instance database on filesystem level

Sample file:- 

[root@ansible ]# cd ansible-oracle-master

[root@ansible ansible-oracle-master]# cat single-instance-db-on-fs.yml

[root@ansible ansible-oracle-master]#cat single-instance-db-on-fs.yml

- name: Host configuration
hosts: "{{ hostgroup }}"
become: yes
roles:
- common
- orahost
- cxoracle

- name: Database Server Installation & Database Creation
hosts: "{{ hostgroup }}"
become: yes
roles:
- oraswdb-install
- oradb-manage-db

- name: Database Server Installation & Database Creation
hosts: database-servers
user: oracle 
sudo: yes
roles:
- oraswdb-install
- oradb-create

Note :I have already installed all prerequisites and oracle binaries hence i am not using that role oraswdb-install

Step 4:- Go to  ansible-oracle-master/roles folder.Check oradb-create role is present for database creation.

[root@ansible ansible-oracle-master]# cd roles/
[root@ansible roles]# ls -lrt
total 0
drwxr-xr-x. 5 root root 61 Jul 30 11:12 oraswracdb-clone
drwxr-xr-x. 3 root root 21 Jul 30 11:12 orasw-meta
drwxr-xr-x. 5 root root 49 Jul 30 11:12 oraswgi-opatch
drwxr-xr-x. 6 root root 60 Jul 30 11:12 oraswgi-manage-patches
drwxr-xr-x. 5 root root 64 Jul 30 11:12 oraswgi-install
drwxr-xr-x. 6 root root 72 Jul 30 11:12 oraswgi-clone
drwxr-xr-x. 6 root root 60 Jul 30 11:12 oraswdb-manage-patches
drwxr-xr-x. 6 root root 60 Jul 30 11:12 oraswdb-install
drwxr-xr-x. 6 root root 61 Jul 30 11:12 orahost-storage
drwxr-xr-x. 4 root root 49 Jul 30 11:12 orahost-ssh
drwxr-xr-x. 5 root root 65 Jul 30 11:12 orahost-logrotate
drwxr-xr-x. 4 root root 49 Jul 30 11:12 orahost-cron
drwxr-xr-x. 7 root root 76 Jul 30 11:12 orahost
drwxr-xr-x. 5 root root 49 Jul 30 11:12 oraemagent-install
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-users
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-tablespace
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-services
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-roles
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-redo
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-pdb
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-parameters
drwxr-xr-x. 5 root root 44 Jul 30 11:12 oradb-manage-grants
drwxr-xr-x. 6 root root 76 Jul 30 11:12 oradb-manage-db
drwxr-xr-x. 5 root root 49 Jul 30 11:12 oradb-failover
drwxr-xr-x. 4 root root 33 Jul 30 11:12 oradb-delete
drwxr-xr-x. 5 root root 60 Jul 30 11:12 oradb-datapatch
drwxr-xr-x. 5 root root 49 Jul 30 11:12 oradb-create
drwxr-xr-x. 4 root root 49 Jul 30 11:12 oraasm-manage-diskgroups
drwxr-xr-x. 5 root root 49 Jul 30 11:12 oraasm-createdg
drwxr-xr-x. 4 root root 33 Jul 30 11:12 cxoracle
drwxr-xr-x. 5 root root 49 Jul 30 11:12 common

[root@ansible roles]# cd oradb-create
[root@ansible oradb-create]# ls -lrt
total 4
drwxr-xr-x. 2 root root 4096 Jul 30 11:12 templates
drwxr-xr-x. 2 root root 40 Jul 30 11:12 tasks
drwxr-xr-x. 2 root root 21 Jul 30 11:12 defaults
[root@ansible oradb-create]# ls -lrt templates/
total 332
-rwxr-xr-x. 1 root root 6119 Jul 30 11:12 netca.rsp.12.2.0.1.j2
-rw-r--r--. 1 root root 6131 Jul 30 11:12 netca.rsp.12.1.0.2.j2
-rw-r--r--. 1 root root 6131 Jul 30 11:12 netca.rsp.12.1.0.1.j2
-rwxr-xr-x. 1 root root 5954 Jul 30 11:12 netca.rsp.11.2.0.4.j2
-rwxr-xr-x. 1 root root 5954 Jul 30 11:12 netca.rsp.11.2.0.3.j2
-rw-r--r--. 1 root root 1283 Jul 30 11:12 dotprofile-db.j2
-rw-r--r--. 1 root root 29254 Jul 30 11:12 dbca-create-db.rsp.12.2.0.1.j2
-rwxr-xr-x. 1 root root 78121 Jul 30 11:12 dbca-create-db.rsp.12.1.0.2.j2
-rwxr-xr-x. 1 root root 78122 Jul 30 11:12 dbca-create-db.rsp.12.1.0.1.j2
-rwxr-xr-x. 1 root root 47467 Jul 30 11:12 dbca-create-db.rsp.11.2.0.4.j2
-rwxr-xr-x. 1 root root 47394 Jul 30 11:12 dbca-create-db.rsp.11.2.0.3.j2
[root@ansible oradb-create]# ls -lrt tasks/
total 8
-rwxr-xr-x. 1 root root 4014 Jul 30 11:12 main.yml
-rw-r--r--. 1 root root 706 Jul 30 11:12 listener.yml
[root@ansible oradb-create]# ls -lrt defaults
total 8
-rw-r--r--. 1 root root 6860 Jul 30 11:12 main.yml

Roles in ansible tool :-

Roles expect files to be in certain directory names. Roles must include at least one of these directories, however it is perfectly fine to exclude any which are not being used. When in use, each directory must contain a main.yml file, which contains the relevant content:

Role directory structure :-

roles/
   common/
     tasks/
     handlers/
     files/
     templates/
     vars/
     defaults/
     meta/
   webservers/
     tasks/
     defaults/
     meta/
  • tasks – contains the main list of tasks to be executed by the role.
  • defaults – default variables for the role 
  • templates- contains templates which can be deployed via this role.

Install tree rpm to see the execution of .yml file :-

[root@ansible roles]# yum install tree
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package tree.x86_64 0:1.6.0-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
tree x86_64 1.6.0-10.el7 ol7_latest 46 k

Transaction Summary
==========================================================================================================================
Install 1 Package
Total download size: 46 k
Installed size: 83 k
Is this ok [y/d/N]: y
Downloading packages:
tree-1.6.0-10.el7.x86_64.rpm SUCCESS

Step 5:- Run the tree command and see the execution of .yml files to create a database

[root@ansible roles]# tree oraswdb-install
oraswdb-install
├── defaults
│   └── main.yml
├── meta
│   └── main.yml
├── tasks
│   ├── 11.2.0.3.yml
│   ├── 11.2.0.4.yml
│   ├── 12.1.0.1.yml
│   ├── 12.1.0.2.yml
│   ├── 12.2.0.1.yml
│   ├── 18.3.0.0.yml
│   ├── curl.yml
│   ├── get_url.yml
│   ├── init.yml
│   ├── install-home-db.yml
│   ├── main.yml
│   ├── remove-home.yml
│   └── systemd.yml
└── templates
├── db-install.rsp.11.2.0.3.j2
├── db-install.rsp.11.2.0.4.j2
├── db-install.rsp.12.1.0.1.j2
├── db-install.rsp.12.1.0.2.j2
├── db-install.rsp.12.2.0.1.j2
├── db-install.rsp.18.3.0.0.j2
├── dbora.j2
├── dotprofile-home.j2
├── glogin.sql.j2
├── oracle-rdbms-service.j2
├── oraInst.loc.j2
└── run-db-install.sh.j2

4 directories, 27 files

Step 6:- I have copied the single-instance-db-on-fs.yml file and named as dbcreation.yml as per the host entry and environment.

Change the main.yml entry present in defaults directory  as below:-

[root@ansible ~]# cd /home/ansible/Desktop/ansible-oracle-master/roles/oradb-create/defaults

The below data is used to create a new database using ansible tool.

[root@ansible ansible-oracle-master]# cat dbcreation.yml 

- name: Database Server Installation & Database Creation
hosts: db
user: oracle 
sudo: yes
roles:
- oradb-create

Step 7:- Run the playbook dbcreation.yml file to create a database.

[root@ansible ansible-oracle-master]# ansible-playbook dbcreation.yml

PLAY [Database Server Installation & Database Creation] *******************************************************

GATHERING FACTS ***************************************************************
ok: [test]

TASK: [oradb-create | set fact] ***********************************************
ok: [test] => (item={'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'})

TASK: [oradb-create | listener | Create responsefile for listener configuration] ***
ok: [test] => (item={'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'})

TASK: [oradb-create | listener | Create listener] **************************************************
ok: [test] => (item={'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'})

TASK: [oradb-create | Check if database is already created] *************************************************************
changed: [test] => (item={'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'})

TASK: [oradb-create | Copy custom dbca Templates to ORACLE_HOME/assistants/dbca/templates] ***
skipping: [test] => (item=[{'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'}])

TASK: [oradb-create | Create responsefile for dbca] ****************************************************
ok: [test] => (item=[{'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'}, {u'cmd': u'grep orcl:/u01/app/oracle/product/12.1.0/dbhome_1 /etc/oratab |wc -l', u'end': u'2018-07-30 17:41:58.213870', u'stderr': u'', u'stdout': u'0', u'changed': True, u'rc': 0, 'item': {'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'}, u'warnings': [], u'delta': u'0:00:00.060829', 'invocation': {'module_name': u'shell', 'module_args': u'grep orcl:/u01/app/oracle/product/12.1.0/dbhome_1 /etc/oratab |wc -l'}, 'stdout_lines': [u'0'], u'start': u'2018-07-30 17:41:58.153041'}])

TASK: [oradb-create | Create database(s)] ******************************************

changed: [test] => (item=[{'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'}, {u'cmd': u'grep orcl:/u01/app/oracle/product/12.1.0/dbhome_1 /etc/oratab |wc -l', u'end': u'2018-07-30 17:41:58.213870', u'stderr': u'', u'stdout': u'0', u'changed': True, u'rc': 0, 'item': {'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'}, u'warnings': [], u'delta': u'0:00:00.060829', 'invocation': {'module_name': u'shell', 'module_args': u'grep orcl:/u01/app/oracle/product/12.1.0/dbhome_1 /etc/oratab |wc -l'}, 'stdout_lines': [u'0'], u'start': u'2018-07-30 17:41:58.153041'}])

TASK: [oradb-create | debug var=item] **************************************
ok: [test] => (item=[u'Copying database files', u'1% complete', u'3% complete', u'11% complete', u'18% complete', u'26% complete', u'37% complete', u'Creating and starting Oracle instance', u'40% complete', u'45% complete', u'50% complete', u'55% complete', u'56% complete', u'60% complete', u'62% complete', u'Completing Database Creation', u'66% complete', u'70% complete', u'73% complete', u'85% complete', u'96% complete', u'100% complete', u'Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.']) => {
"item": [
"Copying database files",
"1% complete",
"3% complete",
"11% complete",
"18% complete",
"26% complete",
"37% complete",
"Creating and starting Oracle instance",
"40% complete",
"45% complete",
"50% complete",
"55% complete",
"56% complete",
"60% complete",
"62% complete",
"Completing Database Creation",
"66% complete",
"70% complete",
"73% complete",
"85% complete",
"96% complete",
"100% complete",
"Look at the log file \"/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log\" for further details."
],
"var": {
"item": [
"Copying database files",
"1% complete",
"3% complete",
"11% complete",
"18% complete",
"26% complete",
"37% complete",
"Creating and starting Oracle instance",
"40% complete",
"45% complete",
"50% complete",
"55% complete",
"56% complete",
"60% complete",
"62% complete",
"Completing Database Creation",
"66% complete",
"70% complete",
"73% complete",
"85% complete",
"96% complete",
"100% complete",
"Look at the log file \"/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log\" for further details."
]
}
}

TASK: [oradb-create | Add dotprofile (1)] *****************************************
ok: [test] => (item={'oracle_init_params': '', 'oracle_db_type': 'SI', 'service_name': 'orcl_serv', 'listener_name': 'LISTENER_ORCL', 'storage_type': 'FS', 'oracle_db_passwd': 'oracle', 'home': 'dbhome_1', 'is_container': False, 'redolog_size_in_mb': 100, 'num_pdbs': 1, 'pdb_prefix': 'pdb', 'oracle_db_name': 'orcl', 'state': 'present', 'oracle_edition': 'EE', 'oracle_db_mem_totalmb': 1024, 'oracle_database_type': 'MULTIPURPOSE', 'oracle_version_db': '12.1.0.2'})

test : ok=10 changed=2 unreachable=0 failed=0

Step 8:- Check the database and listener status in remote host test.localdomain.com

[oracle@test ~]$ ps -ef|grep pmon
oracle 1943 1875 0 19:19 pts/5 00:00:00 grep --color=auto pmon
oracle 22982 1 0 Jul29 ? 00:00:04 ora_pmon_test
oracle 64776 1 0 18:15 ? 00:00:00 ora_pmon_orcl

[oracle@test ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 30-JUL-2018 19:20:35
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 26-JUL-2018 15:59:24
Uptime 4 days 3 hr. 21 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test.localdomain.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/test/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "test.localdomain.com" has 1 instance(s).
Instance "test", status READY, has 1 handler(s) for this service...
Service "testXDB.localdomain.com" has 1 instance(s).
Instance "test", status READY, has 1 handler(s) for this service...
The command completed successfully

 

Catch Me On:- Hariprasath Rajaram

Telegram:https://t.me/joinchat/I_f4DhGF_Zifr9YZvvMkRg
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba

Installation and Configuration of Ansible

Installation and Configuration of Ansible

Introduction to Ansible :-

Ansible is an agent-less IT automation tool developed in 2012 by Michael DeHaan, a former Red Hat associate. The Ansible design goals are : minimal, consistent, secure, highly reliable, and easy to learn.Ansible is Written on Python language.It also available as Open Source.

Why to use Ansible as automation tool ?

  • There are many other IT automation tools available, including more mature ones like Puppet and Chef, so why would we choose Ansible? The main reason is simplicity.
  • Ansible is using YAML syntax. It’s simple configuration language.
    Puppet and Chef are using Ruby Syntax. which is more difficult to learn.
  • Ansible is an agentless tool.Instead of install an agent on every target machine, Ansible just requires that target systems have Python (on Linux servers) or PowerShell (on Windows servers) and SSH.But puppet and chef have to install agent on each target machines.

Architecture Diagram :-

High Level Steps :-

  • Install Python software
  • Install PIP to install Cx_Oracle package to perform SQL commands
  • Install ansible rpm
  • Configure SSH to connect remote hosts
  • Run the ansible command to access remote hosts.

Step 1:- Check the Current version of Python in OEL 7:-

[root@ansible ~]$ python -V
Python 2.7.5

Note:- Minimum version of python 2.7.6 is needed to install ansible.

Step 2:- Download the Python 2.7.6 package

[root@ansible ansible]# wget -c https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz --no-check-certificate
--2018-07-19 02:16:25-- https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
Resolving www.python.org (www.python.org)... 151.101.184.223, 2a04:4e42:2c::223
Connecting to www.python.org (www.python.org)|151.101.184.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14725931 (14M) [application/octet-stream]
Saving to: ‘Python-2.7.6.tgz’

100%[============================================================================================================>] 14,725,931 240KB/s in 65s

2018-07-19 02:17:32 (221 KB/s) - ‘Python-2.7.6.tgz’ saved [14725931/14725931]


Step 3:- Unzip the downloaded python package

[root@ansible ~]$ tar -xvzf Python-2.7.6.tgz 

[root@ansible ~]$ cd Python-2.7.6

[ansible@ansible Python-2.7.6]$ ls -lrt
total 956
-rw-r--r--. 1 ansible ansible 12749 Nov 10 2013 LICENSE
drwxr-xr-x. 2 ansible ansible 4096 Nov 10 2013 Include
drwxr-xr-x. 2 ansible ansible 20 Nov 10 2013 Grammar
drwxr-xr-x. 22 ansible ansible 4096 Nov 10 2013 Demo
drwxr-xr-x. 46 ansible ansible 8192 Nov 10 2013 Lib
drwxr-xr-x. 22 ansible ansible 4096 Nov 10 2013 Tools
-rw-r--r--. 1 ansible ansible 97308 Nov 10 2013 setup.py
drwxr-xr-x. 5 ansible ansible 4096 Nov 10 2013 RISCOS
-rw-r--r--. 1 ansible ansible 53972 Nov 10 2013 README
drwxr-xr-x. 2 ansible ansible 4096 Nov 10 2013 Python
-rw-r--r--. 1 ansible ansible 34829 Nov 10 2013 pyconfig.h.in
drwxr-xr-x. 2 ansible ansible 4096 Nov 10 2013 PCbuild
drwxr-xr-x. 10 ansible ansible 4096 Nov 10 2013 PC
drwxr-xr-x. 2 ansible ansible 4096 Nov 10 2013 Parser
drwxr-xr-x. 3 ansible ansible 4096 Nov 10 2013 Objects
drwxr-xr-x. 9 ansible ansible 4096 Nov 10 2013 Modules
drwxr-xr-x. 5 ansible ansible 4096 Nov 10 2013 Misc
-rw-r--r--. 1 ansible ansible 44172 Nov 10 2013 Makefile.pre.in
drwxr-xr-x. 11 ansible ansible 4096 Nov 10 2013 Mac
-rwxr-xr-x. 1 ansible ansible 7122 Nov 10 2013 install-sh
-rw-r--r--. 1 ansible ansible 133573 Nov 10 2013 configure.ac
-rwxr-xr-x. 1 ansible ansible 426595 Nov 10 2013 configure
-rwxr-xr-x. 1 ansible ansible 35639 Nov 10 2013 config.sub
-rwxr-xr-x. 1 ansible ansible 44851 Nov 10 2013 config.guess
drwxr-xr-x. 16 ansible ansible 4096 Nov 10 2013 Doc

Step 4:- Configuring python 2.7.6 software

Create the below directory ‘/home/ansible/python’ and configure,install the software.

[ansible@ansible Python-2.7.6]# ./configure --prefix=/home/ansible/python

[ansible@ansible Python-2.7.6]# make

[ansible@ansible Python-2.7.6]# make install

After installation,the following files are created under ‘/home/ansible/python’

[ansible@ansible Python-2.7.6]# ls -lrt /home/ansible/python
total 4
drwxr-xr-x. 3 ansible ansible 22 Jul 19 21:10 include
drwxr-xr-x. 4 ansible ansible 59 Jul 19 21:10 lib
drwxr-xr-x. 3 ansible ansible 16 Jul 19 21:10 share
drwxr-xr-x. 2 ansible ansible 4096 Jul 19 21:10 bin

Now,check the new python version 2.7.6

[root@ansible ~]$ cd python/bin/
[root@ansible bin]$ python -V
Python 2.7.6

[root@ansible bin]# which python
/home/ansible/bin/python

Step 5:- Download PIP package

[root@ansible ~]$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1603k 100 1603k 0 0 164k 0 0:00:09 0:00:09 --:--:-- 222k

[root@ansible ansible]# python get-pip.py
Collecting pip
Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 709kB/s
Collecting wheel
Downloading https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 1.2MB/s
Installing collected packages: pip, wheel
Successfully installed pip-10.0.1 wheel-0.31.1

[root@ansible ansible]# python -m pip install cx_Oracle --upgrade
Collecting cx_Oracle
Downloading https://files.pythonhosted.org/packages/3b/09/6b10675a6db7c7da1b8d23225f0a95b2a45248c56a1e8f711d59809278d3/cx_Oracle-6.4.1-cp27-cp27mu-manylinux1_x86_64.whl (590kB)
100% |████████████████████████████████| 593kB 1.2MB/s
Installing collected packages: cx-Oracle
Successfully installed cx-Oracle-6.4.1

Check the PIP version :-

[root@ansible ansible]# pip -V
pip 10.0.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)

We need the Cx_Oracle Package for executing SQL’s , performing any task inside SQL prompt.

[root@ansible ansible]# python
Python 2.7.5 (default, Sep 5 2016, 02:30:38)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> exit()

Installation of Ansible software :-

Step 6:-To get Ansible for Linux, first ensure that the RHEL7 EPEL repository is installed:

[root@ansible ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.dwLJVq: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-11 ################################# [100%]

Step 7:- Once the repository is installed, install Ansible with yum:

[root@ansible ~]# yum install ansible

Step 8:- Check the ansible version and configuration file path

[root@ansible ~]$ ansible --version
ansible 2.6.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Sep 5 2016, 02:30:38) [GCC 4.8.5 20150623 (Red Hat 4.8.5-9)]

Step 9:- Configuring ansible hosts and create inventory file.

The ‘databaseservers‘ in the brackets indicates as group names to list number of remote hosts.

[root@ansible ~]# vi /etc/ansible/hosts

Added the below remote host entry to the /etc/ansible/hosts file

[database-servers]
demo.localdomain.com

Step 10:- List the remote hosts which are able to use ansible commands

[root@ansible ~]$ ansible --list-host all
hosts (1):
192.168.86.141

[ansible@ansible ~]$ ansible --list-host database-servers
hosts (1):
192.168.86.141

SSH Key creation :-

Step 11:- Create the SSH user equivalence in the ansible server.

[ansible@ansible ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ansible/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ansible/.ssh/id_rsa.
Your public key has been saved in /home/ansible/.ssh/id_rsa.pub.
The key fingerprint is:
3f:58:1b:ca:6c:2a:66:0d:63:ea:c3:18:a3:45:45:43 ansible@ansible.localdomain.com
The key's randomart image is:
+--[ RSA 2048]----+
| oE |
| .. |
| . |
| . |
| . S o |
|o . + o = o |
|.* o + * + |
|o + + .o . |
| ..+ .. |
+-----------------+

[ansible@ansible ~]$ cd .ssh/
[ansible@ansible .ssh]$ ls -lrt
total 8
-rw-r--r--. 1 ansible ansible 413 Jul 20 19:40 id_rsa.pub
-rw-------. 1 ansible ansible 1675 Jul 20 19:40 id_rsa

Step 12:- Copy the SSH key to the remote servers

[root@ansible .ssh]# ssh-copy-id root@demo.localdomain.com
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@demo.localdomain.com's password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh 'root@demo.localdomain.com'"
and check to make sure that only the key(s) you wanted were added.

Step 13:- Now,we are able to ping the remote hosts,

[root@ansible .ssh]# ansible all -m ping
demo.localdomain.com | SUCCESS => {
"changed": false,
"ping": "pong"

Step 14 :- To check the partitions on all remote hosts

[root@ansible ~]# ansible -m command -a "df -h" database-servers
demo.localdomain.com | SUCCESS | rc=0 >>
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root
36G 19G 16G 55% /
tmpfs 2.0G 276K 2.0G 1% /dev/shm
/dev/sda1 485M 82M 378M 18% /boot

Catch Me On:- Hariprasath Rajaram

Telegram:https://t.me/joinchat/I_f4DhGF_Zifr9YZvvMkRg
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba

Step by step Oracle EBS R12.1 Installation

ORACLE EBS R12.1 INSTALLATION

In this article we are going to perform Oracle EBS R12.1.1 Installation in OEL 6.4

Description:

1) Perform operating system pre-requisites for R12.1.1
2) Files required to Install EBS R12.1.1
3) Creating Staging Area
4) Installation of EBS R12.1.1

Perform operating system pre-requisites for R12.1.1:

STEP 1:

Install the required RPM’s:

RPM for Oracle EBS can be installed using yum.

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo

Using a text editor or vi command in terminal, edit the following entries in the file /etc/yum.repos.d/public-yum-ol6.repo

cat public-yum-ol6.repo

[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

Update all packages and then install the pre-install rpm by running the following yum commands:

yum clean all
yum update
yum install oracle-ebs-server-R12-preinstall

Note: Install the following RPM’s with minimum version of 2.17 or higher version, otherwise you will receive Error at Post validation installation. We can get the below RPM’s here.

glibc-devel-2.17-55.el6.i686

Note :

1: The openmotif package version must be 2.1.30 (for example, openmotif-2.2.3-10.RHEL4.5 is not supported).

2: This unzip package (available from EL 6 distribution) is only required for purposes of running Rapid Install to unzip the required EBS files as part of the installation and should be reverted after the install of EBS. Alternatively, users can backup the existing unzip 6.0 in /usr/bin, copy the unzip 5.5 from the EBS staging directory to /usr/bin for purposes of installing EBS, and then restore the unzip 6.0 when done.

mv /usr/bin/unzip /usr/bin/unzip-ver6

After installing the RPM’s, restart machine then run following command to link all libraries “ldconfig -v” to create necessary links and cache to the most recent shared libraries

ldconfig -v

STEP 2:

Change SELINUX as follows and Restart Machine to take changes to effect:

cat /etc/selinux/config
SELINUX=permissive

STEP 3:

Stop the iptables service:
service iptables stop

Stop the iptables service from starting when you restart the server:
chkconfig iptables off

STEP 4:

Configure Kernel parameters:

cat /etc/sysctl.conf

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
fs.aio-max-nr = 1048576
net.ipv4.tcp_tw_recycle = 0
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65535
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144

Run the following command to change the current kernel parameters:

sysctl -p

STEP 5:

Verify /etc/sysconfig/network file is formatted as follows:

cat /etc/sysconfig/network
HOSTNAME=ebsdb.doyensys.com

Add IP Address and hostname of the server in the /etc/hosts file as below:

cat /etc/hosts
127.0.0.1             localhost.localdomain   localhost
192.168.1.201    ebsdb.doyensys.com      ebsdb

STEP 6:

If the /etc/sysconfig/networking/profiles/default/network file exists, remove it:
ls: cannot access /etc/sysconfig/networking/profiles/default/networ*: No such file or directory

STEP 7:

Add the following lines to the “/etc/security/limits.conf” file:

cat /etc/security/limits.conf
* hard nofile 65535
* soft nofile 4096
* hard nproc 16386
* soft nproc 2047

STEP 8:

Create Oracle Inventory Directory:

mkdir -p /u01/app/oracle/oraInventory
cat /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

STEP 9:

Create Appropriate Users and Groups:

groupadd oinstall
groupadd dba
usermod -g oinstall -G dba oracle
passwd oracle
usermod -g oinstall -G dba applmgr
passwd applmgr

STEP 10:

Create Directory Structure and Change Ownership & Permissions:

cd /u01
ls -ltrh
mkdir dbebs
mkdir applebs
chmod -R 777 /u01/*ebs
chown -R oracle:dba /u01/dbebs
chown -R applmgr:dba /u01/applebs
chown -R oracle:oinstall /u01/app/
chmod -R 777 /u01/app/
ls -ltrh

Files required to Install EBS R12.1.1:

p11072566_R12_GENERIC.zip – Latest startCD(12.1.1.13)
V15679-01_1of3.zip, V15679-01_2of3.zip, V15679-01_3of3.zip, V15680-01_1of3.zip, V15680-01_2of3.zip, V15680-01_3of3.zip, V15681-01_1of3.zip, V15681-01_2of3.zip, V15681-01_3of3.zip, V15682-01_1of3.zip, V15682-01_2of3.zip, V15682-01_3of3.zip, V15683-01_1of3.zip, V15683-01_2of3.zip, V15683-01_3of3.zip, V15684-01_1of3.zip, V15684-01_2of3.zip, V15684-01_3of3.zip, V15685-01_1of3.zip, V15685-01_2of3.zip, V15685-01_3of3.zip, V15686-01_1of3.zip, V15686-01_2of3.zip, V15686-01_3of3.zip, V15687-01_1of3.zip, V15687-01_2of3.zip, V15687-01_3of3.zip, V15688-01_1of2.zip, V15688-01_2of2.zip, V15689-01.zip, V15690-01_1of3.zip, V15690-01_2of3.zip, V15690-01_3of3.zip, V15691-01_1of3.zip, V15691-01_2of3.zip, V15691-01_3of3.zip, V35224-01_1of3.zip, V35224-01_2of3.zip, V35224-01_3of3.zip.

Creating Staging Area:

Copy the above files into the server:

Unzip the startCD file and run the perl script to create the stage

cd /u01/Stage/startCD/Disk1/rapidwiz
perl adautostg.pl
Stage directory(here give your directory location example : /u01/Stage)
Enter the default option (option 1 )to stage all the required s/w

As root user execute the following command:
xhost +

Installation of EBS R12.1.1:

From the startCD execute rapidwiz:

cd /u01/Stage/startCD/Disk1/rapidwiz
./rapidwiz

Select Option 1, since we are doing the installation.

Provide oracle support e-mail & password if you wish to receive security updates. Here, I don’t need of the updates, so unchecked the tick mark.

Edit the ports, if you wish to change the default ports. Here I am going with the default ports.

Provide the appropriate details like Database SID, hostname with owner, groups of the installation directory for the database.

Provide the appropriate details like hostname with owner, groups of the installation directory for the application.

When all the pre-checks are successful, go ahead for the installation.

Once, the installation is complete, post-install validation run’s automatically. If it is successful, then installation is completed, else if any of the check is errored, check the log, fix-up the issue and retry.

Finally, place the cursor above the “Connect to Oracle Application Release 12.1.1” to get the Application front-end URL

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Description:

This article is about Oracle Database 12cR2 Installation in RHEL 7.4. In this article we are going to see all the prerequisite, oracle binary installation, post installation and database creation  to be done for Oracle 12cR2 Database.

Note:

The Hardware configuration for the server with memory of 8GB, swap 8GB and total hard disk capacity used is 250GB.

Kindly refer Here for RHEL 7.4 Installation in VMWare.

Pre-Install:

Step 1:

Change the hostname in the below file using any text editor if needed and reboot the server:

# cat /etc/hostname
prod101.oracledbwr.com

# shutdown -r now

Check the hostname once the server rebooted

# hostname

# cat /etc/hosts
192.168.1.211 prod101.oracledbwr.com prod101

Step 2:

Using any text editor, create or edit the /etc/sysctl.d/97-oracle-database-sysctl.conf file, and add or edit lines similar to:

# cat /etc/sysctl.d/97-oracle-database-sysctl.conf
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152                #shmall 40 percent of the size of physical memory in pages /proc/sys/kernel/shmall
kernel.shmmax = 4294967296   #shmmax Half the size of physical memory in bytes. Here we have 8GB of RAM
kernel.shmmni = 4096
kernel.panic_on_oops = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

To change the current values of the kernel parameters without reboot of server, execute the below command:
# /sbin/sysctl –system

Review the output. If the values are incorrect, edit the /etc/sysctl.d/97-oracle-database-sysctl.conf file, then enter this command again.

Confirm that the values are set correctly:
# /sbin/sysctl -a

Step 3:

Add the following lines to a file called “/etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf” file:

# cat /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728

Step 4:

The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages should be installed already.

binutils-2.23.52.0.1-12.el7 (x86_64)
compat-libcap1-1.10-3.el7 (x86_64)
glibc-2.17-36.el7 (i686)
glibc-2.17-36.el7 (x86_64)
glibc-devel-2.17-36.el7 (i686)
glibc-devel-2.17-36.el7 (x86_64)
ksh
libaio-0.3.109-9.el7 (i686)
libaio-0.3.109-9.el7 (x86_64)
libaio-devel-0.3.109-9.el7 (i686)
libaio-devel-0.3.109-9.el7 (x86_64)
libX11-1.6.0-2.1.el7 (i686)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (i686)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-1.el7 (i686)
libXi-1.7.2-1.el7 (x86_64)
libXtst-1.2.2-1.el7 (i686)
libXtst-1.2.2-1.el7 (x86_64)
libgcc-4.8.2-3.el7 (i686)
libgcc-4.8.2-3.el7 (x86_64)
libstdc++-4.8.2-3.el7 (i686)
libstdc++-4.8.2-3.el7 (x86_64)
libstdc++-devel-4.8.2-3.el7 (i686)
libstdc++-devel-4.8.2-3.el7 (x86_64)
libxcb-1.9-5.el7 (i686)
libxcb-1.9-5.el7 (x86_64)
make-3.82-19.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64) (for Oracle RAC and Oracle Clusterware)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-1.el7 (x86_64)

Verify the installed RPM’s by executing the following command:

# rpm -q binutils compat-libcap1 glibc-2.17 glibc-devel-2.17 ksh libaio libaio-devel libX11 \
libXau libXi libXtst libgcc libstdc++- libstdc++-devel libxcb make net-tools smartmontools sysstat

Step 5:

Create the required groups for Oracle Database 12cR2 Installation

# /usr/sbin/groupadd -g 54321 oinstall
# /usr/sbin/groupadd -g 54322 dba
# /usr/sbin/groupadd -g 54323 oper
# /usr/sbin/groupadd -g 54324 backupdba
# /usr/sbin/groupadd -g 54325 dgdba
# /usr/sbin/groupadd -g 54326 kmdba
# /usr/sbin/groupadd -g 54327 asmdba
# /usr/sbin/groupadd -g 54328 asmoper
# /usr/sbin/groupadd -g 54329 asmadmin
# /usr/sbin/groupadd -g 54330 racdba

Add “oracle” user with appropriate primary and secodary groups below

# /usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,asmoper,asmadmin oracle
# passwd oracle

Step 6:

Create oraInst.loc file to mention the group of inventory location

# cat /etc/oraInst.loc
inventory_loc=/oradb/app/oraInventory
inst_group=oinstall

Create necessary directories for Oracle Binaries installation and provide appropriate permissions:

mkdir -p /oradb/app/oraInventory
mkdir -p /oradb/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /oradb
chmod -R 775 /oradb

Step 7:

Set secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows

# cat /etc/selinux/config
SELINUX=permissive

Once the change is complete, restart the server or run the following command.

# setenforce Permissive

Step 8:

If we need to disable firewall in linux do the following:

# systemctl stop firewalld
# systemctl disable firewalld

Step 9:

As root user execute the following command:

xhost +

Step 10:

Login as oracle user set the following entry in .bash_profile

# su – oracle
# cat .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export LC_ALL=C
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Create an environment file for the database to be created with the following variables:

# cat /home/oracle/prod.env

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=prod101.oracledbwr.com
export ORACLE_UNQNAME=PROD_PROD1
export ORACLE_BASE=/oradb/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=PROD
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Oracle Installation:

Before starting the installation by “runInstaller” from the unzipped “linuxx64_12201_database.zip”, remember to set the display variable or “xhost +” as oracle user.

# su – oracle

#xhost +

Note:

Oracle as two options during the binary installation, first option is to install binary and create a database during the installation and the the second option is to install only the binaries. Here, we are going with the second option.

Step 1:

# pwd

/home/oracle

# unzip linuxx64_12201_database.zip

cd database

./runInstaller

Once, runInstaller is executed, the below GUI will started for Oracle 12cR2 Installation. In the first empty box provide your E-mail ID if you wish to receive updates from oracle, else uncheck and press “Next”.

Step 2:

As I said already, we are installing only the oracle binaries now. Hence, select “Install database software only” and press “Next”.

Step 3:

Since, we are going to install a standalone database, select option 1.

Step 4:

Select the appropriate option as per your licensing in the below screen and press “Next”.

Step 5:

Set the ORACLE_BASE and ORACLE_HOME directories for oracle binary installation as we already created during the Pre-install.

Step 6:

Select the appropriate groups created during the pre-install in the below screen and press “Next”.

Step 7:

Once, the pre-checks has been completed without any failures, start the installation by “Install” in the below screen.

See the progress of the oracle binaries installation below.

 

Post-Install:

Once the binaries are installed, when the below screen apprears run the “root.sh” from the newly installed ORACLE_HOME directory from the terminal and press ”OK” and “Close” the GUI from the next screen.

# /oradb/app/oracle/product/12.2.0.1/db_1/root.sh

Database Creation:

Once the oracle binaries are installed successfully, run the environment file which we created already during pre-install and start dbca for Database creation.

Step 1:

# pwd

/home/oracle

# . prod.env

# dbca

Here, since we are create a database for the first time in this server, almost all options are disabled except create database.

Step 2:

Select “Advanced Configuration” to create database custom configuration options like location of the database files, SGA & PGA and other parameters of the database.

Step 3:

Provide the Global database name and SID of the database. Also, uncheck “Create as Container database” since we create a normal database.

Step 4:

If you want place the datafiles in different directory other the default location, select option 2 and provide the directory.

Step 5:

Check “Specify Fast Recovery Area” to place the backups and select “Enable archiving”. Also, I am specifying custom location to place the archive logs. So, select “Edit archive mode parameters” and provide the location.

Step 6:

Provide the listener name and port# in the below screen.

Step 7:

Provide the appropriate SGA & PGA, processes, characterset from the below GUI.

Step 8:

Configure Enterprise Manager if needed, else uncheck and press “Next”.

Step 9:

Provide the password for administrative accounts.

Step 10:

Select “Create database” option and “All Initialization Parameters” to check the parameters of the database.

Step 11:

Click on Finish to start the database creation.

 

 

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

RHEL 7.4 Installation in VMWare Workstation

                                                            RHEL 7.4 Installation

Description:-

This is the article which will guide you step-by-step installation of Red Hat Enterprise Linux 7.4.
After Os installation we are going to install oracle binaries.

Let’s start the Demo:-
Step1:- Select the media either from DVD or ISO. Here, I use ISO for OS Installation.

Step2:-Here, select “Install Redhat Enterprise Linux 7.4” then press enter.

Step3:- Select the appropriate language for the OS Installation. Here I am going with the default one English.

Step 4:- In the Installation Summary, select your timezone in LOCALIZATION category and select software selection from SOFTWARE category.

Step5:- Then select “Server with GUI” and select the required RPM packages

Step6:-After RPM packages selection, Under SYSTEM category select “Installation Destination” for Mount Point Partitioning.

Step 7:-Now, select the Hard drive we need to partition and select “I will configure partitioning”.

Step 8:-When press DONE, the below partitioning page will appear. Then start the manual partitioning.

Step 9:-If you want OS to create the partitions automatically, select “Click here to create them automatically”, else select addition and partition as per your requirement.

Below the sample for Mount Point naming and size

Below is the mount point I created.

/boot – 1024MB  <— Mandatory

swap – 8GB            <— Mandatory

/         – 60GB          <— Mandatory

/oradb – 168GB (Remaining Space)    <— Optional for Oracle Home and Database files

Step 10:-Now press DONE and BEGIN INSTALLATION. Set the ROOT Password, meanwhile the packages will be installation.

Step 11:-Once the Installation is complete, select REBOOT to restart the server.

Step 12:-After restarting the server, accept the LICENSE INFORMATION from LICENSING category and FINISH CONFIGURATION.

Step 13:-Select the Language option as English

Step 14:-Select the Keyboard Layout

Step 15:-Select the privacy OFF button to switch OFF the Location

Step 16:- Select the time zone as UTC +05.30 as Chennai,India.

Step 17:-Skip this below step to avoid Connect your Online Accounts

Step 18:-Set Username to login as a oracle user

Step 19:-Set Password for the oracle user and confirm it.

Step 20:-Click Start using Red Hat Enterprise Linux Server.

Catch Me On:- Hariprasath Rajaram

LinkedIn:                  https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:                 https://www.facebook.com/HariPrasathdba
Facebook Group:   https://www.facebook.com/groups/894402327369506/
Facebook Page:      https://www.facebook.com/dbahariprasath/?
Twitter:                     https://twitter.com/hariprasathdba