OLE cheat sheet
OLE · Keep the key ideas within reach.
Oracle Linux Installation, Deployment, and System Configuration
Installation media: Oracle Linux ISOs include both UEK and RHCK kernels; select the desired kernel at boot by choosing the corresponding GRUB menu entry.
Kickstart files automate installation; use the
inst.ks=boot parameter to specify a URL or path to the kickstart file.The
oracle-database-preinstall-*package applies recommended kernel parameters and user/group settings for Oracle Database./etc/oracle-releaseand/etc/os-releaseidentify the Oracle Linux version;uname -rshows the running kernel (UEK vs RHCK).oraclelinux-releaseandoraclelinux-release-el8(or el9) packages provide repository definitions; do not remove them.System configuration after install:
timedatectlfor timezone/NTP,localectlfor locale/keyboard,hostnamectlfor hostname.sos reportcollects system configuration and logs for support; stored in/var/tmp/sosreport-*./etc/sysconfig/contains network and service configuration files;nmcliandnmtuimanage NetworkManager connections.
Package Management with RPM and DNF/YUM, Oracle Linux Repositories and ULN
RPM queries:
rpm -qalists installed packages;rpm -qi pkgshows info;rpm -ql pkglists files;rpm -qf /pathfinds owning package.RPM verification:
rpm -V pkgchecks file attributes;rpm -Vaverifies all packages.DNF commands:
dnf install,remove,update,search,info,provides,history,repoquery.dnf module listanddnf module enable/installmanage AppStream modules; module streams select versions.Oracle Linux yum repositories:
ol8_baseos_latest,ol8_appstream,ol8_addons,ol8_UEKR7,ol8_UEKR6; enable/disable withdnf config-manager --enable/--disable.ULN (Unbreakable Linux Network) requires a support subscription; register with
uln_registeroruln_register --server=...; channels are managed viauln-channel.dnf repolistshows enabled repositories;dnf clean allclears cached metadata;dnf makecacherefreshes metadata.yumis a symlink todnfon Oracle Linux 8+; configuration in/etc/dnf/dnf.confand/etc/yum.repos.d/*.repo.
Storage Administration: LVM, Filesystems, Mount Configuration, and Disk Management
LVM stack: physical volumes (
pvcreate), volume groups (vgcreate), logical volumes (lvcreate -L size -n name vg).Extend LV:
lvextend -L +size /dev/vg/lvthenxfs_growfs /mountorresize2fs /dev/vg/lvfor ext4.lsblk,blkid,fdisk -l,parted -llist block devices, filesystem UUIDs, and partition tables./etc/fstabfields: device, mount point, fstype, options, dump, fsck order; use UUID= or LABEL= for persistent mounts.mount -amounts all fstab entries;findmnt --verifychecks fstab syntax;systemctl daemon-reloadafter fstab changes.XFS cannot be shrunk; ext4 can be resized with
resize2fs. XFS grow usesxfs_growfs.df -hshows filesystem usage;du -shshows directory usage;lvs,vgs,pvsdisplay LVM status.Swap:
mkswap /dev/vg/swap,swapon, and add to fstab withswapfstype.
Network Configuration and Services Management with NetworkManager and systemd
nmcli connection showlists connections;nmcli device statusshows device state;nmcli con up/down nameactivates/deactivates.Create connection:
nmcli con add type ethernet ifname eth0 con-name myconn ipv4.method manual ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.dns 192.0.2.53.nmcli con mod myconn ipv4.dns "8.8.8.8 1.1.1.1"; apply withnmcli con up myconn.Configuration files stored in
/etc/NetworkManager/system-connections/;nmcli con reloadrereads them.systemctlmanages services:start,stop,restart,enable,disable,status,is-active,is-enabled.systemctl list-units --type=servicelists services;systemctl list-unit-filesshows enablement state.ss -tulpnshows listening ports and owning processes;ip addr,ip routedisplay addresses and routes.hostnamectl set-hostname namesets static hostname;NetworkManagerdispatcher scripts run on network events.
User and Group Administration, Permissions, and Access Control
useradd,usermod,userdel -r,groupadd,groupmod,groupdelmanage accounts; defaults in/etc/default/useraddand/etc/login.defs.passwd,chage -l user,chage -M days usermanage password aging;chage -d 0 userforces change at next login./etc/passwd,/etc/shadow,/etc/group,/etc/gshadowstore account data; usevipw/vigrfor safe editing.Permission bits:
chmod ugo+rwx, symbolic or octal (e.g., 755).chown user:group filechanges ownership.Special bits: setuid (4), setgid (2), sticky (1).
chmod 4755 filesets setuid;chmod 1777 dirsets sticky.umaskvalue determines default permissions: files 666 & ~umask, directories 777 & ~umask.ACLs:
setfacl -m u:user:rw file,getfacl file; default ACLs on directories withsetfacl -d.sudoconfiguration in/etc/sudoers(edit withvisudo);sudo -llists allowed commands.
Kernel and Boot Management: GRUB 2, Kernel Modules, and Boot Troubleshooting
GRUB 2 configuration:
/boot/grub2/grub.cfg(BIOS) or/boot/efi/EFI/oracle/grub.cfg(UEFI); regenerate withgrub2-mkconfig -o /boot/grub2/grub.cfg.Default kernel:
grub2-set-default 0orgrub2-set-default 'Oracle Linux Server (UEK)'; verify withgrub2-editenv list.Kernel parameters: edit
/etc/default/grub(GRUB_CMDLINE_LINUX), then rungrub2-mkconfig.lsmod,modinfo module,modprobe module,rmmod modulemanage kernel modules; persistent modules in/etc/modules-load.d/.dracut -fregenerates initramfs; required after kernel or storage driver changes.Boot troubleshooting:
systemctl rescueorsystemctl emergency; addrd.breakorinit=/bin/bashto kernel cmdline for recovery.journalctl -b -1shows previous boot logs;journalctl -kshows kernel messages.uname -rshows running kernel;rpm -qa kernel-ueklists installed UEK kernels.
System Monitoring, Logging, and Performance Troubleshooting
top,htop,vmstat 1,iostat -x 1,mpstat -P ALL 1,pidstatmonitor CPU, memory, I/O, and per-process stats.free -hshows memory;sar -u 1 5(sysstat) shows historical CPU;sar -rmemory;sar -ddisk.journalctl -u service,journalctl -p err,journalctl --since "1 hour ago"query systemd journal.Rsyslog configuration:
/etc/rsyslog.confand/etc/rsyslog.d/*.conf; logs in/var/log/(messages, secure, cron).logrotateconfiguration in/etc/logrotate.confand/etc/logrotate.d/; test withlogrotate -d.df -ichecks inode usage;lsof +D /pathshows open files;fuser -v /mountshows processes using a mount.dmesg -Tshows kernel ring buffer with timestamps;dmesg -wfollows.systemd-analyze blameshows boot time per unit;systemd-analyze critical-chainshows dependency chain.
Security Administration: SELinux, firewalld, and System Hardening
SELinux modes: enforcing, permissive, disabled; set in
/etc/selinux/config; runtime withsetenforce 1|0; check withgetenforce.sestatusshows mode, policy, and booleans;getsebool -a,setsebool -P boolean onmanage booleans.File contexts:
ls -Z,chcon,restorecon -Rv /path; persistent mapping withsemanage fcontext -a -t type '/path(/.*)?'.ausearch -m avc -ts recentandsealert -a /var/log/audit/audit.logdiagnose SELinux denials.firewalld:
firewall-cmd --state,--get-active-zones,--add-service=http --permanent,--reload.Open ports:
firewall-cmd --add-port=8080/tcp --permanent; list with--list-all; zones in/etc/firewalld/zones/.fail2banorpam_faillocklock accounts after failed logins; configure in/etc/security/faillock.conf.sshd_confighardening:PermitRootLogin no,PasswordAuthentication no,AllowUsers,MaxAuthTries; restartsshd.
Shell Scripting and Task Automation with cron and systemd Timers
Script header:
#!/bin/bash; make executable withchmod +x script; run with./scriptorbash script.Variables:
VAR=value(no spaces); use"$VAR"; command substitution$(command); arithmetic$((expression)).Conditionals:
if [ condition ]; then ...; fi; test operators-f,-d,-eq,-ne,-z;[[ ]]for pattern matching.Loops:
for i in list; do ...; done;while read line; do ...; done < file;casestatement for multiple branches.cron: user crontab with
crontab -e; formatmin hour day month weekday command; system cron in/etc/cron.d/,/etc/cron.daily/.cron environment is minimal; set PATH and use absolute paths; output mailed to owner unless redirected.
systemd timer:
.timerunit withOnCalendar=orOnBootSec=; enable withsystemctl enable --now mytimer.timer; checksystemctl list-timers.Timer unit pairs with
.serviceunit of same name;Persistent=trueruns missed jobs after downtime.
Oracle Linux-Specific Technologies: UEK, Ksplice, btrfs, and Oracle Cloud Tooling
UEK (Unbreakable Enterprise Kernel) is Oracle's kernel, default on Oracle Linux; RHCK (Red Hat Compatible Kernel) is available as an alternative.
UEK packages:
kernel-uek,kernel-uek-devel,kernel-uek-headers; install withdnf install kernel-uek.Ksplice applies kernel updates without reboot; requires ULN or Oracle Linux yum server access and the
kspliceclient.Ksplice commands:
uptrack-upgrade -yapplies updates;uptrack-showlists effective patches;uptrack-uname -rshows effective kernel.Btrfs is available in Oracle Linux (Technology Preview in some releases); create with
mkfs.btrfs, mount, manage subvolumes withbtrfs subvolume create.Btrfs snapshots:
btrfs subvolume snapshot /mnt/data /mnt/snap; send/receive for replication.Oracle Cloud Infrastructure (OCI) tooling:
ociCLI, instance metadata service athttp://169.254.169.254/opc/v1/.OCI utilities:
oci-metadata(or curl metadata endpoints) retrieves instance details;oci os object putmanages Object Storage.