Oracle Install - quick notes


Quick notes - will format etc later. This for 12.2 but will amend for 19c


sudo su -

yum install oracle-database-server-12cR2-preinstall

yum install oracle-database-preinstall-19c

https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/index_src.html

https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html

https://oracle-base.com/articles/12c/oracle-db-12cr1-installation-on-oracle-linux-7

yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-font-utils xorg-x11-fonts-Type1

yum install xclock


groupadd -g 54327 asmdba

groupadd -g 54328 asmoper

groupadd -g 54329 asmadmin

useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba,dba grid

mkdir --parents /u01/app/12.2.0/gridhome

chown --recursive grid:oinstall /u01

usermod -a -G asmdba oracle

mkdir --parents /u01/app/oracle/product/12.2.0/dbhome_1

passwd oracle

mkdir --parents /u99/media/software/cubic

chown --recursive oracle:oinstall /u99/media

cd /u99/media/software

mkdir database

chown oracle:oinstall database

cd /backup

mkdir --parents /oracle/archlogs

cd /oracle

mkdir database_backups

cd archlogs

mkdir ngtapp

mkdir ngtods

cd ../database_backups

mkdir ngtapp

mkdir ngtods

cd ngtapp

mkdir logs

chown --recursive oracle:oinstall /backup

COPY THE SOURCE FILES ACROSS

INSTALL ASM

cd /u01/app/12.2.0/gridhome
cp /u99/media/software/database/linuxx64_12201_grid_home.zip .

unzip linuxx64_12201_grid_home.zip

chown -R grid:oinstall /u01/app/12.2.0/gridhome

df -h | grep tmp

/dev/mapper/VGroot-LVtmp 9.8G 37M 9.2G 1% /tmp

cat /proc/meminfo check for 16GB of swap space

/etc/hostname
This will return the hostname of the server

cat /etc/sysconfig/selinux need to grep for SELINUX=enforcing and SELINUXTYPE=targeted and stop of not correct

vi /etc/security/limits.conf

append to bottom of file

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

systemctl disable firewalld

cat /sys/kernel/mm/transparent_hugepage/enabled should be always madvise [never]
cat /etc/default/grub look for transparent_hugepage=never

su - root
cd /u01/app/12.2.0/gridhome/cv/rpm/
rpm -qi cvuqdisk

export CVUQDISK_GRP=oinstall
rpm -iv cvuqdisk-1.0.10-1.rpm


Prior to installing grid software

exit
sudo su - grid

cd /u01/app/12.2.0/gridhome
./runcluvfy.sh stage -pre crsinst -n auzaetngtods01

INSTALL GRID

as root
passwd grid

Create Mobaxterm session logging in directly as grid
export LC_ALL=C
xclock

sudo su - grid
cd /u01/app/12.2.0/gridhome/
./gridSetup.sh

'Configure Oracle grid infrastructure for standalone server (Oracle restart)'

Install Oracle software

su - oracle
mkdir /u99/media/software/database/DATABASE
cp /u99/media/software/database/linuxx64_12201_database.zip /u99/media/software/database/DATABASE
cd /u99/media/software/database/DATABASE
unzip linuxx64_12201_database.zip

export LC_ALL=C
cd database
./runInstaller

'install database software only'

'single instance database installation'

Enterprise edition

Change software location back to '/u01/app/oracle/product/12.2.0/dbhome_1'



ASMCMD - a better du


This is from here - very useful.

https://blog.pythian.com/amcmd-better-du/

Copied here as I often find links disappear.

#!/bin/bash
#
# du of each subdirectory in a directory for ASM
#

D=$1

if [[ -z $D ]]
then

 echo "Please provide a directory !"
 exit 1
fi
(for DIR in `asmcmd ls ${D}`
 do
     echo ${DIR} `asmcmd du ${D}/${DIR} | tail -1`
 done) | awk -v D="$D" ' BEGIN {  printf("\n\t\t%40s\n\n", D " subdirectories size")           ;
                                  printf("%25s%16s%16s\n", "Subdir", "Used MB", "Mirror MB")   ;
                                  printf("%25s%16s%16s\n", "------", "-------", "---------")   ;}
                               {
                                  printf("%25s%16s%16s\n", $1, $2, $3)                         ;
                                  use += $2                                                    ;
                                  mir += $3                                                    ;
                               }
                         END   { printf("\n\n%25s%16s%16s\n", "------", "-------", "---------");
                                 printf("%25s%16s%16s\n\n", "Total", use, mir)                 ;} '



[oracle@db01 ~]$ ./asmdu.sh +FRA_UMB/APPS/ARCHIVELOG
               
 +FRA_UMB/APPS/ARCHIVELOG subdirectories size

               Subdir                    Used MB      Mirror MB
               ------                        -------          ---------
              2020_01_14/           88738          177476
              2020_01_15/          109232          218464
              2020_01_16/          111426          222852
              2020_01_17/          110174          220348
              2020_01_18/          108460          216920
              2020_01_19/          103562          207124
              2020_01_20/          105086          210172
              2020_01_21/           52428          104856

                ------                    -------            ---------
                Total                   789106         1578212


Oracle Critical Patch Update(s)

Posting this as reminder -



January 14, 2020
Oracle Critical Patch Update for January 2020

The Critical Patch Update for January 2020 was released on January 14th, 2020. Oracle strongly recommends applying the patches as soon as possible.

If you are new to this process, please review Oracle's Security Fixing Policies and the Critical Patch Update Advisory. After reviewing these resources, if you are unable to determine if you require a software update, or how to apply it, please contact Oracle Support.

The Critical Patch Update Advisory is the starting point for relevant information. It includes the list of products affected, pointers to obtain the patches, a summary of the security vulnerabilities for each product suite, and links to other important documents. Supported products that are not listed in the "Affected Products and Components" section of the advisory do not require new patches to be applied.

Also, it is essential to review the Critical Patch Update supporting documentation referenced in the Advisory before applying patches, as this is where you can find important pertinent information.

Critical Patch Update Advisories are available at the following location:

Oracle Technology Network:

https://www.oracle.com/security-alerts/

Oracle Cloud Customers should review:

https://www.oracle.com/security-alerts/#cloud

The Critical Patch Update Advisory for January 2020 is available at the following location:

Oracle Technology Network:
https://www.oracle.com/security-alerts/cpujan2020.html


April 2020

Important information can also be found at:

https://blogs.oracle.com/oraclesecurity/

Oracle's Security Fixing Policies are available at the following location:

https://www.oracle.com/corporate/security-practices/assurance/vulnerability/security-fixing.html

The next four dates for Critical Patch Updates are:

April 14, 2020
July 14, 2020
October 20, 2020
January 19, 2021

Thank you,
Customer Support of Oracle Corporation
https://www.oracle.com/support/contact/index.html


This is useful -

Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases (Doc ID 2118136.2)




Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

I was able to login to an Oracle Cloud machine with the public IP using Putty but when connecting using MobaXterm had issues with the graphical output e.g. xclock or the Oracle Installer.

Made some changes to the sshd_config file to allow X11Forwarding for the graphical output and changed PasswordAuthentication to "no".


Using a private authentication key to access the servers so the password should not be needed.

Putty worked as expected but MobaXterm came back with

Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

Edited the /etc/ssh/sshd_config file and c
hanged PasswordAuthentication and ChallengeResponseAuthentication to yes and restarted the sshd daemon.


#/bin/systemctl restart sshd.service

Connecting now as expected.

Thinking this needs more investigation - strange that Putty and MobaXterm behave differently.