Notes for installing Oracle 19c EE on OraLinux 7
There are not precise instructions but principal notes about installing Oracle 19C Server in OL7
as root:
1) Check full_hostname in /etc/hostname
2) Add server to /etc/hosts (#ipadrress hostname short_hostname)
ping myhostname
If the oraInst.loc file does not exist (first Oracle installation) and group not exists (grep oinstall /etc/group (if exists: oinstall:x:54321:grid,oracle)) :
3) create oinstall group: /usr/sbin/groupadd -g 54321 oinstall
4) create dba group: /usr/sbin/groupadd -g 54322 dba
5) create oracle user: /usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba oracle
id oracle: uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
set password for oracle: passwd oracle
6) set resource limits to oracle user:
In /etc/security/limits.conf add something as:
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
and maybe other limits (see oracle doc for complete list of resiurce limits)
7) Check and set Kernel parameters:
Check: https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/minimum-parameter-settings-for-installation.html#GUID-CDEB89D1-4D48-41D9-9AC2-6AD9B0E944E3
Set: in /etc/sysctl.d/97-oracle-database-sysctl.conf
fs.file-max = 6815744
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
and any needed params
/sbin/sysctl --system
/sbin/sysctl -a
reboot
8) Disable Transparent Huge Pages:
cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/enabled
[always] never
In /etc/default/grub:
RUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet numa=off transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"
(about numa=off: https://iopscience.iop.org/article/10.1088/1742-6596/664/9/092010 and https://iopscience.iop.org/article/10.1088/1742-6596/664/9/092010/pdf)
then run: grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
cat /sys/kernel/mm/transparent_hugepage/enabled
always [never]
9) install required packages:
yum install bc
yum install compat-libstdc++-33
optional but recommended: yum install -y unixODBC
and so on (see oracle installation documentation)
10) install additional packages:
gcc
gcc-c++
gcc-info
gcc-locale
gcc48
gcc48-info
gcc48-locale
gcc48-c++
(see oracle doc)
11) install JDK if Java connections will be needed
12) create folder according OFA
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1/
13) set right permissions
for example:
chgrp oinstall /u01
chmod 775 /u01
chgrp oinstall /u01/app
chmod 775 /u01/app
chown -R oracle:oinstall /u01/app/oracle
OR simple:
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1/
chown -R oracle:oinstall /u01
chmod -R 775 /u01
be carefull with permission! oracle user need to read/write in /u01/app folder. and maybe other installer users need these permissions.
14) unzip distrib (db_home.zip - this is image-based distro) into this folder:
cd /u01/app/oracle/product/19.0.0/dbhome_1/
unzip -oq /tmp/ora_db_home.zip
read about image-based installation: https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/about-image-based-database-installation.html#GUID-0315AA15-1C03-4E96-B801-3A8E5F5D4B39
15) install xauth xclcok
16) check that X11 works for oracle user
Disabling SELinux and stoping firewall is not needed for me but may be these are critical factors under some circumstances.
login via ssh as oracle:
1) set oracle umask to 022
2) TMP=/tmp TMPDIR=/tmp export TMP TMPDIR
3) Unsetting Oracle Installation Owner Environment Variables: ORA_CRS_HOME, ORACLE_HOME, TNS_ADMIN and so on
4) For multihome environment read install doc carefully (ORACLE_HOSTNAME)
4) cd to Oracle home folder
5) run ./Installer
6) choose UTF charset, not-container DB, provide root credentials for runing root script
7) back up the root.sh script after you complete an installation
8) set ORACLE_HOME and ORACLE_SID env_vars
for EM working you need to run listener (you can do it as oracle user after server rebooting)
9) toggle EM to Flash mode: read here
10) Find and Recompiling All Invalid Objects:
SELECT owner, object_type, object_name
FROM dba_objects
WHERE status = 'INVALID'
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/recompiling-all-invalid-objects.html#GUID-1023C5FB-B409-4F16-BCA1-C14CB9B7E625
11) Note about Default SGA Permissions: https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/change-in-default-sga-permissions-for-oracle-database.html
PS: if we install on RHEL8(OL8) then we need: export CV_ASSUME_DISTID=OEL7.3 (/8/8.3)