How to configure a development box based on Linux

Download and Install

https://yum.oracle.com/oracle-linux-isos.html

Machine: 500GB HD, 4 CPUs, Network: Auto

Partitions /boot 3G /scratch 20G / 477G (as LVM ext4) Server with GUI

First, install Epel Repo

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Then install the relevant software

systemctl stop firewalld
systemctl disable firewalld
yum update -y
yum install -y htop openbox tint2 iotop tigervnc-server terminator emacs rlwrap sshpass
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-3.el7.x86_64.rpm
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm

Disable SELinux

sudo vim /etc/selinux/config
SELINUX=disabled

Set Oracle user password

passwd oracle
# drop unnecesary users
# userdel -r upgradeboy

Install Guest Additions

yum install -y perl gcc make bzip2
# from https://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/x86_64/index.html
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/x86_64/getPackage/kernel-uek-5.4.17-2136.302.7.2.el7uek.x86_64.rpm
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/x86_64/getPackage/kernel-uek-debug-devel-5.4.17-2136.302.7.2.el7uek.x86_64.rpm
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/x86_64/getPackage/kernel-uek-devel-5.4.17-2136.302.7.2.el7uek.x86_64.rpm
# ensure it worked
ls -l /usr/src/kernels/$(uname -r)
mount -r /dev/cdrom /media
/media/VBoxLinuxAdditions.run
reboot -h now

Change GRUB timeout

vim /etc/default/grub

cat /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"


grub2-mkconfig -o /boot/grub2/grub.cfg

update permissions

visudo 
usermod -a -G wheel oracle

create a VNC to install Oracle Homes

mkdir -p ~/.vnc
cat > ~/.vnc/xstartup <<EOF
#!/bin/sh
DISPLAY=:1
exec /usr/bin/openbox-session &
exec tint2 &
EOF
vncserver :1 -geometry 1920x1080

Installing Oracle Homes

cd /databases/roee/product/23x/dbhome_1
./runInstaller &
#for readonly
bin/roohctl -enable

Installing Home from backups

export ORACLE_HOME=/databases/ee/product/122x/dbhome_1
export ORACLE_BASE=/databases/orabase

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/databases/orabase" ORACLE_HOME="/databases/ee/product/122x/dbhome_1" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall OSBACKUPDBA_GROUP=oinstall OSRACDBA_GROUP=oinstall -defaultHomeName
export ORACLE_HOME=/databases/ee/product/12102x/dbhome_1
export ORACLE_BASE=/databases/orabase

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/databases/orabase" ORACLE_HOME="/databases/ee/product/12102x/dbhome_1" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall OSBACKUPDBA_GROUP=oinstall OSRACDBA_GROUP=oinstall -defaultHomeName
export ORACLE_HOME=/databases/ee/product/11204x/dbhome_1
export ORACLE_BASE=/databases/orabase

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/databases/orabase" ORACLE_HOME="/databases/ee/product/11204x/dbhome_1" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall OSBACKUPDBA_GROUP=oinstall OSRACDBA_GROUP=oinstall -defaultHomeName

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/ladbi/cloning-an-oracle-home.html#GUID-494E59C3-C381-4A35-8ABE-F6E5DBF29032