18.) Review grade Flashcards

1
Q

ˢᶜʰᵉᵈᵘˡᵉ ᵃ ʳᵉᵒᶜᶜᵘʳʳᶦⁿᵍ ʲᵒᵇ ᵗʰᵃᵗ ᵉˣᵉᶜᵘᵗᵉˢ ᵃ ˢᶜʳᶦᵖᵗ ᶠʳᵒᵐ ʰᵗᵗᵖˢ://* ᵗʰᵃᵗ ʳᵘⁿˢ ʰᵒᵘʳˡʸ ᵇᵉᵗʷᵉᵉⁿ ⁷ ᵃⁿᵈ ⁹ ᵒⁿ ᵃˡˡ ᵈᵃʸˢ ᵉˣᶜᵉᵖᵗ ˢᵃᵗᵘʳᵈᵃʸ ᵃⁿᵈ ˢᵘⁿᵈᵃʸ

A
$ curl https://* >> /home/run.sh
$ chmod +x /home/run.sh
$ crontab -e
0 19-21 * * * /home/run.sh
$ crontab -l
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Restore graphical target persistently to be multi-user.target

A
$ systemctl get-default
# systemctl set-default multi-user.target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

get a script from a server

A

$ wget https://*

$ chmod +x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Create a 2GB partition

A
# parted /dev/vdb mklabel msdos
# parted /dev/vdb mkpart primary 1GiB 3 GiB
# parted /dev/vdb set 1 lvm on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Create a logical volume vol_home on /dev/vdb. Call VG extra_storage

A
# pvcreate /dev/vdb1
# vgcreate extra_storage /dev/vdb1
# lvcreate -L 1GiB -n vol_home extra_storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Make the newly create /dev/vdb vol_home XFS formatted and mount it on /home-directories

A
# mkdir /home-directories
# ᵐᵏᶠˢ ⁻ᵗ ˣᶠˢ /ᵈᵉᵛ/ᵉˣᵗʳᵃ⁻ˢᵗᵒʳᵃᵍᵉ/ᵛᵒˡ⁻ʰᵒᵐᵉ
# ˡˢᵇˡᵏ ⁻ᵒ ᵁᵁᴵᴰ /ᵈᵉᵛ/ᵉˣᵗʳᵃ⁻ˢᵗᵒʳᵃᵍᵉ/ᵛᵒˡ⁻ʰᵒᵐᵉ
►ᶠˢᵗᵃᵇ > ᵁᵁᴵᴰ /ʰᵒᵐᵉ⁻ᵈᶦʳᵉᶜᵗᵒʳᶦᵉˢ ˣᶠˢ ᵈᵉᶠᵃᵘˡᵗˢ ⁰ ⁰
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

mount nfs share servera:/share onto /local-share

A

►fstab > servera:/share /local-share xfs rw,sync defaults 0 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Create a new 512MiB swap on /dev/vdc

A
# parted /dev/vdc mklabel msdos
# ᵖᵃʳᵗᵉᵈ /ᵈᵉᵛ/ᵛᵈᶜ ᵐᵏᵖᵃʳᵗ ᵖʳᶦᵐᵃʳʸ ˡᶦⁿᵘˣ⁻ˢʷᵃᵖ ¹ᴹᶦᴮ ⁵¹³ᴹᶦᴮ
# ᵐᵏˢʷᵃᵖ /ᵈᵉᵛ/ᵛᵈᶜ¹
ᶠˢᵗᵃᵇ > ᵁᵁᴵᴰ⁼ˣ   ˢʷᵃᵖ   ˢʷᵃᵖ   ᵈᵉᶠᵃᵘˡᵗˢ ⁰ ⁰
# swapon -a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ˢᵉᵗ ˢᵉʳᵛᵉʳᵇ ᵗᵒ ᵃᵘᵗᵒ ᵐᵒᵘⁿᵗ /ʰᵒᵐᵉ/ᵖʳᵒ ʷʰᵉⁿ ᵗʰᵉ ᵘˢᵉʳ ˡᵒᵍˢ ᶦⁿ ᵘˢᶦⁿᵍ /ʰᵒᵐᵉ⁻ᵈᶦʳ/ᵖʳᵒ

A
# yum install autofs
►vi /etc/auto.master.d/pro.autofs  
/- /etc/auto.pro5
►vi /etc/auto.pro5 > 
/localhome/pro5 -rw serva.x.x.com:/home-dir/pro5
# systemctl restart autofs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

configure ‘web’ container to start automatically with the server as ‘containers’ user

A

$ mkdir -p ~/.config/systemd/user
$ cd ~/.config/systemd/user
$ podman generate systemd –name web –files –new
$ podman stop -a | podman rm -a
$ systemctl –user daemon-reload
$ systemctl –user enable –now container-web.service
$ loginctl enable-linger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly