Oracle 12c (incl. Fusion Middleware)

March 25, 2017 Douwe Jan Reitsma

********************************************************************************
Oracle 12c on Linux (CentOS 7)
********************************************************************************

### Installation, configuration and updates; images used …:

-rwx——@ 1 admin staff 16939032 7 feb 2016
Oracle_VM_VirtualBox_Extension_Pack-5.0.14-105127.vbox-extpack
-rwx——@ 1 admin staff 832500826 29 jul 00:08 V138466-01.zip
-rwx——@ 1 admin staff 1562466603 31 jul 16:22 V138469-01.zip
-rwx——@ 1 admin staff 2155733491 29 jul 00:20 V138471-01_1of2.zip
-rwx——@ 1 admin staff 205218923 29 jul 00:10 V138471-01_2of2.zip
-rwx——@ 1 admin staff 1846486321 29 jul 00:06 V138472-01.zip
-rwx——@ 1 admin staff 1035274458 29 jul 00:08 V138473-01.zip
-rwx——@ 1 admin staff 839572767 29 jul 00:07 V138476-01.zip
-rwx——@ 1 admin staff 1287587389 29 jul 00:19 V138477-01.zip
-rwx——@ 1 admin staff 1971347961 29 jul 00:19 V262058-01_1of2.zip
-rwx——@ 1 admin staff 274988098 29 jul 00:11 V262058-01_2of2.zip
-rwx——@ 1 admin staff 666277942 29 jul 00:17 V266898-01.zip
-rwx——@ 1 admin staff 90468561 7 feb 2016 VirtualBox-5.0.14-105127-OSX.dmg
-rwx—— 1 admin staff 181352138 2 aug 17:49 jdk-8u101-linux-x64.tar.gz
-rwx—— 1 admin staff 181435897 2 aug 17:55 jdk-8u102-linux-x64.tar.gz
-rwx——@ 1 admin staff 1673544724 11 feb 21:06 linuxamd64_12102_database_1of2.zip
-rwx——@ 1 admin staff 1014530602 11 feb 21:01 linuxamd64_12102_database_2of2.zip

### Settings VirtualBox

Volume: LACIE_SHARE: /Volumes/LACIE SHARE
Network: NAT Network –> (from command-line !!!)
VBoxManage natnetwork add –netname NatNetwork –network “10.0.0.0/8” –enable –dhcp off
Private network settings from outside environment based on settings above
Network: Bridged Network –>
Settings from local filesystem used for ssh connection
No DNS (Usage of /etc/hosts file)
Naming: CentOS-7-020, CentOS-7-021, CentOS-7-030 and CentOS-7-031
IPadresses: 10.0.0.20, 21, 30 and 31 (NAT) (Bridged adresses are automatically assigned)
Hostname: hostnamectl status
hostnamectl set-hostname centos7020, 21, 30 and 31
X-system: $ yum install xclock (export DISPLAY=:10.0)
Todo: Connection failed messages (which are not correct, from Virtual Box)
Virus scanner, Access with key’s and Backup via NAS.

### Version details

– using a Git Repository
– Installing CentOS 7
– Installing Oracle 12c Release: 12.1.0
– Perform GIT Update if needed (download and install)

$ git –version

### Project location

douwejanreitsma@Douwes-MacBook-Pro-3 ~/Projects/ictinfra-project $ pwd
/Users/douwejanreitsma/Projects/ictinfra-project

### Refreshing the complete ‘ictinfra-project’ can be done through:

First check: >>> ssh nldourei1@<ip-address provider>

$ rm -rf Projects/ && mkdir Projects && chmod -R 770 Projects/ && cd Projects
$ git init && git remote add origin nldourei1@<ip-address provider>:/home/net/ict-infra.nl/git/ictinfra-project.git
$ git config –global user.name “Douwe Jan Reitsma”
$ git config –global user.email “douwejanreitsma@gmail.com”
$ git config –list
$ git clone ssh://nldourei1@<ip-address provider>:/home/net/ict-infra.nl/git/ictinfra-project.git/ or …
$ git clone nldourei1@<ip-address provider>:/home/net/ict-infra.nl/git/ictinfra-project.git/
$ cd ictinfra-project/
$ git branch
* master
$ git checkout develop
$ git branch
* develop
master
$ git config –global push.default matching

### Repairing ambiguous settings, made earlier

Deleting Remote Branche (because of warning: refname ‘origin’ is ambiguous.)
$ git push origin –delete origin

### Some command examples (in the correct order)

$ git status
$ git branch -a
$ git checkout develop
$ git pull -a
$ git commit -m “Documents” Documents
$ git push
$ git checkout master
$ git pull -a
$ git merge develop
$ git push
$ git checkout develop
$ git status

### Some yum (and other) examples (to do)

$ yum repolist
$ yum -y install epel-release
$ yum repolist
$ yum install fail2ban -y
$ cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
$ cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.org
$ systemctl restart fail2ban.service
$ cat /etc/fail2ban/jail.conf
$ ll /etc/sudoers
$ visudo
$ exit
$ vi /etc/ssh/sshd_config
$ history
$ /sbin/service sshd stop
$ /sbin/service sshd start
$ /sbin/service sshd status
$ ifconfig
$ yum install tree
$ yum install gnome-packagekit-updater
$ gpk-update-viewer
$ yum update

### Oracle Info needed for Setup

SID names:
ITIST020 (centos7020.ict-infra.nl) 10.0.0.20/8 192.168.1.20/16
ITIST021 (centos7021.ict-infra.nl) 10.0.0.21/8 192.168.1.21/16
ITIST030 (centos7030.ict-infra.nl) 10.0.0.30/8 192.168.1.30/16
ITIST031 (centos7031.ict-infra.nl) 10.0.0.31/8 192.168.1.31/16

Directories:
/appl/oracle/checkpoints
/appl/oracle/diag
/appl/oracle/oraInventory (orainstRoot.sh)
/appl/oracle/product/12.1.0/dbhome_1 (12.1.0)
/appl/oracle/product/agent

/data/oracle/${ORACLE_SID}/orafra/archive
/data/oracle/${ORACLE_SID}/orafra/orarman

/data/oracle/${ORACLE_SID}/oradata/datafiles/*.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog1/control01.ctl
/data/oracle/${ORACLE_SID}/oradata/redolog1/control03.ctl
/data/oracle/${ORACLE_SID}/oradata/redolog1/redo01a.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog1/redo02a.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog1/redo03a.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog1/redo04a.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog2/control02.ctl
/data/oracle/${ORACLE_SID}/oradata/redolog2/control04.ctl
/data/oracle/${ORACLE_SID}/oradata/redolog2/redo01b.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog2/redo02b.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog2/redo03b.dbf
/data/oracle/${ORACLE_SID}/oradata/redolog2/redo04b.dbf
/data/oracle/${ORACLE_SID}/oradata/undo/temp01.dbf
/data/oracle/${ORACLE_SID}/oradata/undo/undo01.dbf

Users and groups:
oracle:install
oracle:dba

Docu. locations:
On company PC —> ~/Projects/ictinfra-project/Configurations/TransIP
~/Projects/ictinfra-project/Configurations/VirtualboxVM

On private PC —> ~/Projects/ictinfra-project/Configurations/TransIP
~/Projects/ictinfra-project/Configurations/VirtualboxVM

On LaCie Share —> ~/Configurations/TransIP
~/Configurations/VirtualboxVM

### https://wiki.centos.org/HowTos/Oracle12onCentos7
### ITIST020 (centos7020.ict-infra.nl) 10.0.0.20/8 192.168.1.20/16
### ITIST021 (centos7021.ict-infra.nl) 10.0.0.21/8 192.168.1.21/16

[root@centos7020 ~]# hostnamectl
Static hostname: centos7020.ict-infra.nl
Icon name: computer-vm
Chassis: vm
Machine ID: e31853b254794b168cc6f92f8f2239d1
Boot ID: 64faf87f1da2419b9c340c3e8b6e425d
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.10.1.el7.x86_64
Architecture: x86-64
[root@centos7020 ~]# cat /etc/hostname
centos7020.ict-infra.nl

[root@centos7020 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@centos7020 ~]# firewall-cmd –state
running
[root@centos7020 ~]# yum update -y
No packages marked for update

[root@centos7020 ~]# ll /opt/tempinstalloracle.12.1.0

-rwxrwxrwx. 1 root root 123340 Feb 11 21:00 HowTos:Oracle12onCentos7 – CentOS Wiki.pdf
-rwxrwxrwx. 1 root root 1673544724 Feb 11 21:06 linuxamd64_12102_database_1of2.zip
-rwxrwxrwx. 1 root root 1014530602 Feb 11 21:01 linuxamd64_12102_database_2of2.zip
-rwxrwxrwx. 1 root root 16939032 Feb 7 14:25 Oracle_VM_VirtualBox_Extension_Pack-5.0.14-105127.
vbox-extpack
-rwxrwxrwx. 1 root root 35629 Feb 11 20:53 Screen Shot 2016-02-11 at 20.53.31.png
-rwxrwxrwx. 1 root root 90468561 Feb 7 14:16 VirtualBox-5.0.14-105127-OSX.dmg

[root@centos7020 ~]# groupadd oinstall
[root@centos7020 ~]# groupadd dba
[root@centos7020 ~]# useradd -g oinstall -G dba oracle
[root@centos7020 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

[root@centos7020 ~]# vi /etc/sysctl.conf en add …
#
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1987162112
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048586
#

check …
[root@centos7020 ~]# sysctl -p
[root@centos7020 ~]# sysctl -a

[root@centos7020 ~]# vi /etc/security/limits.conf and add …
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

[root@centos7020 tempinstalloracle.12.1.0.20]# pwd
/opt/tempinstalloracle.12.1.0
[root@centos7020 tempinstalloracle.12.1.0.20]# mkdir /stage
[root@centos7020 tempinstalloracle.12.1.0.20]# yum install -y zip unzip
Nothing to do

[root@centos7020 tempinstalloracle.12.1.0.20]# unzip linuxamd64_12102_database_1of2.zip -d /stage/
[root@centos7020 tempinstalloracle.12.1.0.20]# unzip linuxamd64_12102_database_2of2.zip -d /stage/
[root@centos7020 tempinstalloracle.12.1.0.20]# chown -R oracle:oinstall /stage/

Oracle Base: /appl/oracle
Oracle software location: /appl/oracle/product/12.1.0/dbhome_1
Database file location: /data/oracle/ITIST020/
Globaldatabase name: ITIST020.ict-infra.nl

[root@centos7020 tempinstalloracle.12.1.0.20]# mkdir -p /appl/oracle
[root@centos7020 tempinstalloracle.12.1.0.20]# mkdir -p /appl/oracle/product/12.1.0/dbhome_1
[root@centos7020 tempinstalloracle.12.1.0.20]# mkdir -p /data/oracle/ITIST020/
[root@centos7020 tempinstalloracle.12.1.0.20]# chown -R oracle:oinstall /appl/oracle/
[root@centos7020 tempinstalloracle.12.1.0.20]# chown -R oracle:oinstall /data/oracle/
[root@centos7020 tempinstalloracle.12.1.0.20]# chmod -R 775 /appl/oracle/
[root@centos7020 tempinstalloracle.12.1.0.20]# chmod -R 775 /data/oracle/
[root@centos7020 tempinstalloracle.12.1.0.20]# chmod g+s /appl/oracle/
[root@centos7020 tempinstalloracle.12.1.0.20]# chmod g+s /data/oracle/

[root@centos7020 tempinstalloracle.12.1.0.20]#
yum install -y binutils.x86_64 compatlibcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64
yum install -y glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64
yum install -y libaio-devel.i686 libaiodevel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64
yum install -y libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64
yum install -y libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64
yum install -y compat-libcap1-1.10-7.el7 libaio-devel-0.3.109-13.el7

yum groupinstall -y “X Window System”
yum update
No packages marked for update

Shutdown VirtualboxVM and make a backup copy of the image (before continuing) first !!!

douwejanreitsma@Douwes-MacBook-Pro-3 / $ ssh -X -y oracle@192.168.1.20
oracle@192.168.1.20’s password:
Last login: Tue Feb 23 15:27:02 2016 from 192.168.1.101

[oracle@centos7020 ~]$ /stage/database/runInstaller

Starting Oracle Universal Installer…

Checking Temp space: must be greater than 500 MB. Actual 19522 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3275 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-02-23_03-28-51PM.
Please wait …[oracle@centos7020 ~]$

[oracle@centos7020 ~]$ You can find the log of this install session at:
/appl/oracle/oraInventory/logs/installActions.log

[dreitsma@centos7020 ~]$ su –
Password:
Last login: Tue Feb 23 14:24:46 CET 2016 on pts/0
[root@centos7020 ~]# /appl/oracle/oraInventory/orainstRoot.sh
Changing permissions of /appl/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /appl/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@centos7020 ~]# /appl/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /appl/oracle/product/12.1.0/dbhome_1

Enter the full pathname of the local bin directory [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …

Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@centos7020 ~]# ll /usr/local/bin
total 20
-rwxr-xr-x. 1 oracle root 6583 Feb 23 17:05 coraenv
-rwxr-xr-x. 1 oracle root 2445 Feb 23 17:05 dbhome
-rwxr-xr-x. 1 oracle root 7012 Feb 23 17:05 oraenv

Remove Passwords below after installation has been finished !!!
********************************************************************************
********************************************************************************
My Oracle support:
‘xxx’

Admin passwords (sys, system, weblogic):
‘yyy’

Other passwords (linux and common):
‘zzz’
********************************************************************************
********************************************************************************

Screen information:

douwe@ict-infra.nl
create and configure a database
server class
single instance database installation
typical install
/appl/oracle
/appl/oracle/product/12.1.0/dbhome_1
/data/oracle/ITIST020
pdbITIST020
/appl/oracle/oraInventory | oinstall

prerequisite checks

summary
save response file
dbITIST020.rsp
install product
execute configuration scripts (see above)
DBCA failed (reason unknown)

finish

********************************************************************************
To Do:
********************************************************************************

1) Start DBCA manually and use advanced configuration …
Use AL32UTF8 characterset (2 differen screens)
National = default –> AL16UTF16

2) Create pfile from spfile

3) Enlarge File system and Swapfile after appending an extra 32GB disk in VirtuaBox.

4) Configure Listener

# tnsnames.ora Network Configuration File: /appl/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ITIST020 =
(ADDRESS = (PROTOCOL = TCP)(HOST = centos7020)(PORT = 1521))

ITIST020 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.20)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ITIST020.ict-infra.nl)
)
)

ITIST021 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.21)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ITIST021.ict-infra.nl)
)
)

### https://wiki.centos.org/HowTos/Oracle12onCentos7
### ITIST020 (centos7020.ict-infra.nl) 10.0.0.20/8 192.168.1.20/16
### ITIST021 (centos7021.ict-infra.nl) 10.0.0.21/8 192.168.1.21/16

5) Configure Java

[root@centos7020 share]# cd /appl
[root@centos7020 appl]# ln -s /appl/jdk1.8.0_102 java
[root@centos7020 appl]# ll

lrwxrwxrwx. 1 root root 18 Aug 2 20:32 java -> /appl/jdk1.8.0_102
drwxr-xr-x. 8 10 143 4096 Jun 23 03:56 jdk1.8.0_102

[root@centos7020 share]# cd /bin
[root@centos7020 bin]# ll | grep java

lrwxrwxrwx. 1 root root 22 Feb 14 16:34 java -> /etc/alternatives/java

[root@centos7020 bin]# rm java
rm: remove symbolic link ‘java’? y

[root@centos7020 ~]# java -version
java version “1.8.0_102”
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

[root@centos7020 ~]# tail /etc/profile

export JAVA_HOME=/appl/java
export PATH=$PATH:/appl/java/bin
echo $JAVA_HOME
$JAVA_HOME/bin/java -version
echo $PATH
which java

6) Configure Oracle

[oracle@centos7020 images]$ cat ~/.bashrc

# User specific aliases and functions

export ORACLE_SID=ITIST020
export ORAENV_ASK=NO
. oraenv

********************************************************************************
To Do: corrective
********************************************************************************

[root@centos7020 ~]# fdisk -l
Disk /dev/sda: 34.4 GB, 34359738368 bytes, 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00078b30

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 67108863 33041408 8e Linux LVM

Disk /dev/sdb: 34.4 GB, 34359738368 bytes, 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd5c7f4c8

Device Boot Start End Blocks Id System
/dev/sdb1 2048 1050623 524288 82 Linux swap / Solaris

Disk /dev/mapper/centos_centos7020-root: 30.3 GB, 30349983744 bytes, 59277312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos_centos7020-swap: 3435 MB, 3435134976 bytes, 6709248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@centos7020 ~]# swapon -s
Filename Type Size Used Priority
/dev/sdb1 partition 524284 0 -1
/dev/dm-1 partition 3354620 0 -2
[root@centos7020 ~]# swapoff /dev/sdb1

[root@centos7020 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@centos7020 ~]# vgdisplay
— Volume group —
VG Name centos_centos7020
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 31.51 GiB
PE Size 4.00 MiB
Total PE 8066
Alloc PE / Size 8055 / 31.46 GiB
Free PE / Size 11 / 44.00 MiB
VG UUID lef1rP-7dLK-Sruz-1mLi-9ELb-lHnl-HB084A

[root@centos7020 ~]# lvdisplay
— Logical volume —
LV Path /dev/centos_centos7020/swap
LV Name swap
VG Name centos_centos7020
LV UUID Zya6eM-hnLP-hzZU-KR1e-Vl1B-OoJa-KCIGch
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:45 +0100
LV Status available
# open 2
LV Size 3.20 GiB
Current LE 819
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:1

— Logical volume —
LV Path /dev/centos_centos7020/root
LV Name root
VG Name centos_centos7020
LV UUID gtLFfa-eQ8D-dXhI-QEcy-V5Pf-jklG-GKvn8u
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:46 +0100
LV Status available
# open 1
LV Size 28.27 GiB
Current LE 7236
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:0

[root@centos7020 ~]# lvextend -L+44M /dev/centos_centos7020/root
Size of logical volume centos_centos7020/root changed from 28.27 GiB (7236 extents) to 28.31 GiB (7247 extents).
Logical volume root successfully resized.
[root@centos7020 ~]# xfs_growfs /dev/centos_centos7020/root
meta-data=/dev/mapper/centos_centos7020-root isize=256 agcount=4, agsize=1852416 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=7409664, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=3618, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7409664 to 7420928

[root@centos7020 ~]# fdisk -l

Disk /dev/sda: 34.4 GB, 34359738368 bytes, 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00078b30

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 67108863 33041408 8e Linux LVM

Disk /dev/sdb: 34.4 GB, 34359738368 bytes, 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd5c7f4c8

Device Boot Start End Blocks Id System

Disk /dev/mapper/centos_centos7020-root: 30.4 GB, 30396121088 bytes, 59367424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos_centos7020-swap: 3435 MB, 3435134976 bytes, 6709248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@centos7020 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_centos7020-root 29G 20G 8.6G 70% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 100K 1.9G 1% /dev/shm
tmpfs 1.9G 8.8M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 497M 263M 235M 53% /boot
tmpfs 380M 24K 380M 1% /run/user/1001
tmpfs 380M 0 380M 0% /run/user/1000

[root@centos7020 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-67108863, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-67108863, default 67108863):
Using default value 67108863
Partition 1 of type Linux and of size 32 GiB is set

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition ‘Linux’ to ‘Linux LVM’

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@centos7020 ~]# partprobe

[root@centos7020 ~]# pvcreate /dev/sdb1
Can’t open /dev/sdb1 exclusively. Mounted filesystem?
[root@centos7020 ~]# cat /proc/partitions
major minor #blocks name

8 0 33554432 sda
8 1 512000 sda1
8 2 33041408 sda2
8 16 33554432 sdb
8 17 33553408 sdb1
11 0 1048575 sr0
253 0 29683712 dm-0
253 1 3354624 dm-1

[root@centos7020 ~]# ls /dev/mpath/*
ls: cannot access /dev/mpath/*: No such file or directory

[root@centos7020 ~]# dmsetup status
centos_centos7020-swap: 0 6709248 linear
centos_centos7020-root: 0 59367424 linear

[root@centos7020 ~]# dmsetup ls
centos_centos7020-swap (253:1)
centos_centos7020-root (253:0)

[root@centos7020 ~]# /sbin/dmsetup remove_all

[root@centos7020 ~]# pvcreate /dev/sdb1
Can’t open /dev/sdb1 exclusively. Mounted filesystem?

[root@centos7020 ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Feb 11 20:41:48 2016
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk’
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos_centos7020-root / xfs defaults 0 0
UUID=938b6d3f-0cd4-4043-ba3a-3063dc3e0c6a /boot xfs defaults 0 0
/dev/mapper/centos_centos7020-swap swap swap defaults 0 0
/dev/sdb1 swap swap defaults 0 0

[root@centos7020 ~]# umount swap
umount: swap: mountpoint not found

[root@centos7020 ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Feb 11 20:41:48 2016
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk’
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos_centos7020-root / xfs defaults 0 0
UUID=938b6d3f-0cd4-4043-ba3a-3063dc3e0c6a /boot xfs defaults 0 0
/dev/mapper/centos_centos7020-swap swap swap defaults 0 0
#/dev/sdb1 swap swap defaults 0 0

[root@centos7020 ~]# reboot
Connection to 192.168.1.20 closed by remote host.
Connection to 192.168.1.20 closed.
douwejanreitsma@Douwes-MacBook-Pro-3 / $ ssh -X -y dreitsma@192.168.1.20
dreitsma@192.168.1.20’s password:
Last login: Sat Jul 30 21:59:57 2016 from 192.168.1.29

[dreitsma@centos7020 ~]$ su –
Password:
Last login: Sat Jul 30 22:00:05 CEST 2016 on pts/0

[root@centos7020 ~]# pvcreate /dev/sdb1
WARNING: swap signature detected on /dev/sdb1 at offset 4086. Wipe it? [y/n]: y
Wiping swap signature on /dev/sdb1.
Physical volume “/dev/sdb1” successfully created

[root@centos7020 ~]# vgdisplay
— Volume group —
VG Name centos_centos7020
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 31.51 GiB
PE Size 4.00 MiB
Total PE 8066
Alloc PE / Size 8066 / 31.51 GiB
Free PE / Size 0 / 0
VG UUID lef1rP-7dLK-Sruz-1mLi-9ELb-lHnl-HB084A

[root@centos7020 ~]# vgextend centos_centos7020 /dev/sdb1
Volume group “centos_centos7020” successfully extended

[root@centos7020 ~]# vgdisplay
— Volume group —
VG Name centos_centos7020
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 63.50 GiB
PE Size 4.00 MiB
Total PE 16257
Alloc PE / Size 8066 / 31.51 GiB
Free PE / Size 8191 / 32.00 GiB
VG UUID lef1rP-7dLK-Sruz-1mLi-9ELb-lHnl-HB084A

[root@centos7020 ~]# lvdisplay
— Logical volume —
LV Path /dev/centos_centos7020/swap
LV Name swap
VG Name centos_centos7020
LV UUID Zya6eM-hnLP-hzZU-KR1e-Vl1B-OoJa-KCIGch
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:45 +0100
LV Status available
# open 2
LV Size 3.20 GiB
Current LE 819
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:1

— Logical volume —
LV Path /dev/centos_centos7020/root
LV Name root
VG Name centos_centos7020
LV UUID gtLFfa-eQ8D-dXhI-QEcy-V5Pf-jklG-GKvn8u
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:46 +0100
LV Status available
# open 1
LV Size 28.31 GiB
Current LE 7247
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:0

[root@centos7020 ~]# pvscan
PV /dev/sda2 VG centos_centos7020 lvm2 [31.51 GiB / 0 free]
PV /dev/sdb1 VG centos_centos7020 lvm2 [32.00 GiB / 32.00 GiB free]
Total: 2 [63.50 GiB] / in use: 2 [63.50 GiB] / in no VG: 0 [0 ]

[root@centos7020 ~]# lvextend -L+30G /dev/centos_centos7020/root
Size of logical volume centos_centos7020/root changed from 28.31 GiB (7247 extents) to 58.31 GiB (14927 extents).
Logical volume root successfully resized.

[root@centos7020 ~]# xfs_growfs /dev/centos_centos7020/root
meta-data=/dev/mapper/centos_centos7020-root isize=256 agcount=5, agsize=1852416 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=7420928, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=3618, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7420928 to 15285248

[root@centos7020 ~]# lvdisplay
— Logical volume —
LV Path /dev/centos_centos7020/swap
LV Name swap
VG Name centos_centos7020
LV UUID Zya6eM-hnLP-hzZU-KR1e-Vl1B-OoJa-KCIGch
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:45 +0100
LV Status available
# open 2
LV Size 3.20 GiB
Current LE 819
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:1

— Logical volume —
LV Path /dev/centos_centos7020/root
LV Name root
VG Name centos_centos7020
LV UUID gtLFfa-eQ8D-dXhI-QEcy-V5Pf-jklG-GKvn8u
LV Write Access read/write
LV Creation host, time centos7020.ict-infra.nl, 2016-02-11 20:41:46 +0100
LV Status available
# open 1
LV Size 58.31 GiB
Current LE 14927
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 253:0

[root@centos7020 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_centos7020-root 59G 20G 39G 34% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 84K 1.9G 1% /dev/shm
tmpfs 1.9G 8.7M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 497M 263M 235M 53% /boot
tmpfs 380M 20K 380M 1% /run/user/42
tmpfs 380M 0 380M 0% /run/user/1000

[root@centos7020 ~]# swapoff -v /dev/centos_centos7020/swap
swapoff /dev/centos_centos7020/swap

[root@centos7020 ~]# lvextend -L+512M /dev/centos_centos7020/swap
Size of logical volume centos_centos7020/swap changed from 3.70 GiB (947 extents) to 4.20 GiB (1075 extents).
Logical volume swap successfully resized.

[root@centos7020 ~]# mkswap /dev/centos_centos7020/swap
mkswap: /dev/centos_centos7020/swap: warning: wiping old swap signature.
Setting up swapspace version 1, size = 4403196 KiB
no label, UUID=e5e07cff-d3b0-466e-b006-0a22effb32ce

[root@centos7020 ~]# swapon -va
swapon /dev/mapper/centos_centos7020-swap
swapon: /dev/mapper/centos_centos7020-swap: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/mapper/centos_centos7020-swap: pagesize=4096, swapsize=4508876800, devsize=4508876800

[root@centos7020 ~]# cat /proc/swaps # free
Filename Type Size Used Priority
/dev/dm-1 partition 4403196 0 -1
[root@centos7020 ~]#

********************************************************************************
To Do: extra (fmw) setups for study purpose
********************************************************************************

User oracle has to be used because of common files …
Details can be retrieved: https://www.youtube.com/watch?v=yQNgo9YKR3I

### FMW Weblogic setup temporary notes …

douwejanreitsma:~ admin$ ssh -X -y oracle@192.168.1.20
[oracle@centos7020 ~]$ cd /tmp/images/
[oracle@centos7020 images]$ java -jar fmw_12.2.1.1.0_wls.jar
Launcher log file is /tmp/OraInstall2016-08-02_09-29-14PM/launcher2016-08-02_09-29-14PM.log.
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-08-02_10-09-38PM
Log: /tmp/OraInstall2016-08-02_10-09-38PM/install2016-08-02_10-09-38PM.log
Visit http://www.oracle.com/support/policies.html for Oracle Technical Support policies.
Logs successfully copied to /appl/oracle/oraInventory/logs.

### FMW Infrastructure setup temporary notes …

douwejanreitsma:~ admin$ ssh -X -y oracle@192.168.1.20
[oracle@centos7020 ~]$ cd /tmp/images/
[oracle@centos7020 images]$ java -jar fmw_12.2.1.1.0_infrastructure.jar
Launcher log file is /tmp/OraInstall2016-08-06_10-53-24AM/launcher2016-08-06_10-53-24AM.log.
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-08-06_10-53-24AM
Log: /tmp/OraInstall2016-08-06_10-53-24AM/install2016-08-06_10-53-24AM.log
Logs successfully copied to /appl/oracle/oraInventory/logs.

### FMW SOA Suite setup temporary notes …

douwejanreitsma:~ admin$ ssh -X -y oracle@192.168.1.20
[oracle@centos7020 ~]$ cd /tmp/images/
[oracle@centos7020 images]$ java -jar fmw_12.2.1.1.0_soa.jar
Launcher log file is /tmp/OraInstall2016-08-06_11-54-24AM/launcher2016-08-06_11-54-24AM.log.
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-08-06_11-54-24AM
Log: /tmp/OraInstall2016-08-06_11-54-24AM/install2016-08-06_11-54-24AM.log
Logs successfully copied to /appl/oracle/oraInventory/logs.

### Oracle 12c installation on Linux (CentOS 7) …

For this setup I’ve used the an existing environment.
linuxamd64_12102_database_1of2.zip | linuxamd64_12102_database_2of2.zip
In this environment, with the ‘dbca’ a new, simple, database has been created.
The filesystem (storage type) locations an character sets are the same as used earlier.
Details can be retrieved from accompanying screen shots.

********************************************************************************
Startup the listener (see: Repository creation temporary notes)
Startup the database (see: Repository creation temporary notes)
********************************************************************************

### FMW SOA Repository creation temporary notes …

douwejanreitsma:~ admin$ ssh -X -y oracle@192.168.1.20
The Oracle base has been set to /appl/oracle
[oracle@centos7020 ~]$ lsnrctl start
[oracle@centos7020 ~]$ sqlplus sys@ITIST020 as sysdba >>> Startup database

[oracle@centos7020 ~]$ cd /appl/oracle/product/12.2.1/fmwhome_1/oracle_common/bin/
[oracle@centos7020 bin]$ ./rcu
RCU Logfile: /tmp/RCU2016-08-06_19-47_1354956480/logs/rcu.log

### FMW SOA Domain creation temporary notes …

douwejanreitsma:~ admin$ ssh -X -y oracle@192.168.1.20
The Oracle base has been set to /appl/oracle
[oracle@centos7020 ~]$ lsnrctl start
[oracle@centos7020 ~]$ sqlplus sys@ITIST020 as sysdba >>> Startup database

[oracle@centos7020 ~]$ cd /appl/oracle/product/12.2.1/fmwhome_1/oracle_common/common/bin/
[oracle@centos7020 bin]$ ./config.sh
[oracle@centos7020 bin]$ cd ../../../user_projects/
[oracle@centos7020 user_projects]$ ll

drwxr-x—. 3 oracle oinstall 22 7 aug 12:06 applications
drwxr-x—. 6 oracle oinstall 71 7 aug 12:06 domains

[oracle@centos7020 user_projects]$ ll applications/

drwxr-x—. 2 oracle oinstall 19 7 aug 12:07 soa_domain

[oracle@centos7020 user_projects]$ ll domains/

drwxr-x—. 13 oracle oinstall 4096 2 aug 22:29 medrec
drwxr-x—. 13 oracle oinstall 4096 2 aug 22:30 medrec-spring
drwxr-x—. 20 oracle oinstall 4096 7 aug 12:09 soa_domain
drwxr-x—. 15 oracle oinstall 4096 2 aug 22:35 wl_server

cd /appl/oracle/product/12.2.1/fmwhome_1/user_projects/domains/soa_domain/
mkdir -p servers/admin_server/security

Make a file: ‘/admin_server/security/boot.properties’ and add 2 rows in it:
username=weblogic
password=

********************************************************************************
Startup the domain (the password and username will be encrypted):
nohup ./startWebLogic.sh &
********************************************************************************

Put a tail on nohup.out and wait for the domain to be started.

Note to correct …

The system is vulnerable to security attacks, since the server private key is available to the public.>

<7-aug-2016, 2:04:36,287 PM CEST> <7-aug-2016, 2:04:36,338 PM CEST>
[oracle@centos7020 soa_domain]$

Check the contents of the boot.properties file …

[oracle@centos7020 soa_domain]$ cat servers/admin_server/security/boot.properties

password={AES}vzOGht5RlMlaEJcotlvDEUxM+Dm0vVB/d/Cf1cUjyes=
username={AES}YOIliQrQHNS+AOL61XE743ybUcYk8Iq5Dv5TFZr7B2g=

********************************************************************************
Start the NodeManager from the bin directory …
nohup ./startNodeManager.sh &
********************************************************************************

Put a tail on nohup.out and wait for the NodeManager to be started.

Domain name mappings:
soa_domain -> /appl/oracle/product/12.2.1/fmwhome_1/user_projects/domains/soa_domain

### FMW URL’s (see also setup screens) …

http://centos7020.ict-infra.nl:7001/console
https://centos7020:7001/em (5500 = not avaiable)

********************************************************************************
Access the admin. console and start the SOA manager service …
on server for test. (some firewall corrections to be made)
********************************************************************************

192.168.1.20:7001/console
192.168.1.20:7001/em
192.168.1.20:7003/integration/worklistapp

Related Entries