RHCSA Flashcards
How to enable port forwarding
vi /etc/sysctl.conf # add line net.ipv4.ip_forward=1 # save file sysctl -p
Disk compression
VDO
Layered storage
Stratis
First thing in any script
!/bin/bash
Shell script user prompt for input
read VARIABLENAME
default exit codes for successful and unsuccessful
exit 0 = unsuccessful exit 1 = successful
Numerical calculations within a bash script
$((1+2))
How to call a variable in a bash script
$VARIABLE
How to create a local repo
create mount point (mkdir /repo)
add to /etc/fstab: /rhel8.iso /repo iso9660 defaults 0 0
mount -a
/etc/yum.repos.d [appstream] name=appstream enabled=1 baseurl=file:///repo/AppStream gpgcheck=0
2 things to never forget when using firewall-cmd
always run with and without permanent
always restart firewall-cmd after any changes
How to rename a file in linux
mv
set time zone
timedatectl set-timezone
How to modify boot and kernel options
/etc/default/grub (most commonly worked with, timeout time, etc, feeds changes to grub2-mkconfig)
/boot/grub2/grub.cfg (final product of grub2-mkconfig)
***Executing change to bootloader: grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-set-default will change which kernal boots 0 is the first
GRUB_TIMEOUT_STYLE=hidden
Packages required for Stratis
stratisd, stratis-cli
Packages required for VDO
vdo, kmod-kvdo
If having issues with stratis, how to wipe disk
wipefs -a /disk
fstab configuration for stratis
UUID /mountpoint xfs x-systemd.requires=stratisd.service
ALWAYS USE UUID
lsblk -o=UUID /dev/stratis/mypool/myfs
fstab option required for vdo
x-systemd.requires=vdo.service
Where and how to set up nfs export on nfs server
/etc/exports
/dir 10.1.1.1(rw)
exportfs -av
NFS packages
autofs, nfs-utils, nfs-server
NFS firewall services
nfs, mountd, rpc-bind
How to check available mount points for remote device
showmount -e 10.1.1.1
NFS fstab setup
option = _netdev
file system type = nfs
Samba share options
_netdev, username=user, password=password
yum install samba, yum install samba-client