sandervanvugt

RHCSA march23 all days

Mar 16th, 2023
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.16 KB | None | 0 0
  1. [root@server1 rhcsa]# history
  2. 1 dnf install git -y
  3. 2 vim countdown
  4. 3 chmod +x countdown
  5. 4 ./countdown 16
  6. 5 ./countdown 16 lab
  7. 7 ip a
  8. 8 tar czvf /root/archive.tgx /etc
  9. 9 ls -l
  10. 10 mv archive.tgx archive.tgz
  11. 11 ls
  12. 12 grep -v '^$' /etc/dnsmasq.conf
  13. 13 grep -v '^$' /etc/dnsmasq.conf | sort
  14. 14 grep -v '^$' /etc/dnsmasq.conf
  15. 15 grep -v '^$' /etc/dnsmasq.conf | sort
  16. 16 grep -v '^$' /etc/dnsmasq.conf | sort > /var/tmp/dnslines.txt
  17. 17 useradd bob
  18. 18 mkdir userfiles
  19. 19 find / -user bob -type f
  20. 20 find / -user bob -type f -exec cp -a {} userfiles/ \;
  21. 21 man sort
  22. 22 grep -v '^$' /etc/dnsmasq.conf | sort -d
  23. 23 history
  24. 24 ./countdown 13 break
  25. 25 history
  26. 26 exit
  27. 27 su - bob
  28. 28 passwd bob
  29. 29 su - bob
  30. 30 id student
  31. 31 id bob
  32. 32 visudo
  33. 33 su - bob
  34. 34 visudo
  35. 35 su - bob
  36. 36 visudo
  37. 37 ./countdown 1
  38. 38 ls -l /etc/skel
  39. 39 ls -a /etc/skel
  40. 40 ls -a /home/linda
  41. 41 vim /etc/login.defs
  42. 42 useradd --help | less
  43. 43 cat /etc/passwd
  44. 44 cat /etc/shadow
  45. 45 vim /etc/shadow
  46. 46 su - linda
  47. 47 ssh linda@localhost
  48. 48 vim /etc/shadow
  49. 49 less /etc/passwd
  50. 50 lid -g wheel
  51. 51 groupadd sales
  52. 52 id bob
  53. 53 usermod -aG sales bob
  54. 54 id bob
  55. 55 usermod -G wheel bob
  56. 56 id bob
  57. 57 usermod --help | less
  58. 58 usermod -G sales bob
  59. 59 ./countdown 16 lab and break
  60. 60 ./countdown 16 "lab and break"
  61. 61 vim /etc/login.defs
  62. 62 touch /etc/skel/newfile
  63. 63 groupadd profs
  64. 64 groupadd student
  65. 65 groupadd students
  66. 66 useradd anna -G profs
  67. 67 useradd anouk -G profs
  68. 68 useradd lisa -G students
  69. 69 useradd linda -G students
  70. 70 for i in linda lisa anna anouk; do echo password | passwd --stdin $i; done
  71. 71 tail -4 /etc/shadow
  72. 72 history
  73. 73 ls -l /etc/hosts
  74. 74 touch testfile
  75. 75 ls -l
  76. 76 chown linda testfile
  77. 77 ls -l
  78. 78 chown linda:profs testfile
  79. 79 ls -l
  80. 80 chgrp students testfile
  81. 81 ls -l
  82. 82 mkdir -p /data/profs /data/students
  83. 83 ls -l /data
  84. 84 chown :profs /data/profs
  85. 85 chgrp students /data/students
  86. 86 ls -l
  87. 87 ls -l /data
  88. 88 chmod 770 /data/students
  89. 89 chmod g+w,o-rx /data/profs
  90. 90 ls -l /data
  91. 91 history
  92. 92 cd /home/linda
  93. 93 touch rootfile
  94. 94 su - linda
  95. 95 touch rootfile2
  96. 96 su - linda
  97. 97 su - anna
  98. 98 chmod g+s /data/profs
  99. 99 ls -l /data/
  100. 100 su - anna
  101. 101 su - anouk
  102. 102 chmod +t /data/profs
  103. 103 ls -ld /data/profs
  104. 104 su - anouk
  105. 105 cd
  106. 106 ./countdown 1 questions
  107. 107 cd /home/linda
  108. 108 touch roofile
  109. 109 ls -l rootfile2
  110. 110 ls -l rootfile
  111. 111 ls -l rootfile2
  112. 112 rm rootfile2
  113. 113 touch newfile
  114. 114 ls -l newfile
  115. 115 su - linda
  116. 116 history
  117. 117 mkdir -p /files/profs /files/students
  118. 118 cd /files
  119. 119 ls -l
  120. 120 chgrp profs profs
  121. 121 chgrp students students
  122. 122 chmod 770 *
  123. 123 ls -l
  124. 124 umask
  125. 125 umask 002
  126. 126 umask
  127. 127 umask 022
  128. 128 exit
  129. 129 ./countdown 15 "lab and break"
  130. 130 lsblk
  131. 131 poweroff
  132. 132 fdisk /dev/nvme0n1
  133. 133 lsblk
  134. 134 mkfs.xfs /dev/nvme0n1p3
  135. 135 mount /dev/nvme0n1p3 /mnt
  136. 136 lsblk
  137. 137 mount
  138. 138 lsblk
  139. 139 findmnt
  140. 140 vim /etc/fstab
  141. 141 mount -a
  142. 142 reboot
  143. 143 fdisk /dev/nvme0n1
  144. 144 vim /etc/fstab
  145. 145 mkfs.xfs /dev/nvme0n1p5
  146. 146 mkfs.ext4 /dev/nvme0n1p6
  147. 147 mkdir /part5 /part6
  148. 148 mount -a
  149. 149 touch /part5/part_5_file
  150. 150 touch /part6/part6_file
  151. 151 vim /etc/fstab
  152. 152 fdisk /dev/nvme0n1
  153. 153 history
  154. 154 reboot
  155. 155 journalctl -xb
  156. 156 vim /etc/fstab
  157. 157 lsblk
  158. 158 blkid
  159. 159 blkid | grep p5
  160. 160 blkid | grep p5 | awk '{ print $2 }'
  161. 161 blkid | grep p5 | awk '{ print $2 }' >> /etc/fstab
  162. 162 vim /etc/fstab
  163. 163 mount -a
  164. 164 ls /part6
  165. 165 top
  166. 166 ps aux | grep zombie
  167. 167 kill -9 38339
  168. 168 ps aux | grep zombie
  169. 169 kill -SIGCHLD 38338
  170. 170 kill -9 38338
  171. 171 ps aux | grep zombie
  172. 172 dd if=/dev/zero of=/dev/null &
  173. 173 top
  174. 174 echo 0 > /sys/bus/cpu/devices/cpu1/online
  175. 175 top
  176. 176 nice --help | less
  177. 177 nice -20 sleep 100
  178. 178 echo 1 > /sys/bus/cpu/devices/cpu1/online
  179. 179 history
  180. 180 mount | grep proc
  181. 181 cd proc
  182. 182 cd /proc
  183. 183 ls
  184. 184 cd sys
  185. 185 ls
  186. 186 cd vm/
  187. 187 ls
  188. 188 sysctl -a
  189. 189 sysctl -a | wc
  190. 190 tuned-adm list
  191. 191 dnf install -y tuned
  192. 192 dnf install -y tuned-adm
  193. 193 tuned-adm --list
  194. 194 tuned-adm list
  195. 195 tuned-amd profile virtual-guest
  196. 196 tuned-adm profile virtual-guest
  197. 197 tuned-adm list
  198. 198 systemctl status tuned
  199. 199 cd /usr/lib/tuned/
  200. 200 ls
  201. 201 cd virtual-
  202. 202 cd virtual-guest/
  203. 203 ls
  204. 204 vim tuned.conf
  205. 205 pwd
  206. 206 ls -ld /etc/tuned
  207. 207 cd /etc/tuned
  208. 208 ls
  209. 209 mkdir sander
  210. 210 cp /usr/lib/tuned/latency-performance/tuned.conf sander/
  211. 211 tuned-adm list
  212. 212 tuned-adm profile sander
  213. 213 tuned-adm recommend
  214. 214 history
  215. 215 cd
  216. 216 history
  217. 217 ip link show
  218. 218 ip addr show
  219. 219 hostnamectl status
  220. 220 hostnamectl hostname server1.example.local
  221. 221 hostnamectl status
  222. 222 cat /etc/hostname
  223. 223 exit
  224. 224 vim /etc/hosts
  225. 225 ping google.com
  226. 226 vim /etc/nsswitch.conf
  227. 227 ping google.com
  228. 228 cat /etc/resolv.conf
  229. 229 nmtui
  230. 230 cd /etc/NetworkManager/
  231. 231 ls
  232. 232 cd system-connections/
  233. 233 ls
  234. 234 vim ens160.nmconnection
  235. 235 ip a
  236. 236 cd
  237. 237 systemctl -t help
  238. 238 systemctl list-unit-files
  239. 239 systemctl list-units
  240. 240 systemctl list-units -t timer
  241. 241 systemctl cat logrotate.timer
  242. 242 systemctl cat logrotate.service
  243. 243 systemctl cat logrotate.timer
  244. 244 systemctl status logrotate.timer
  245. 245 systemctl cat sshd.service
  246. 246 systemctl status sshd.service
  247. 247 kill -9 4660
  248. 248 systemctl status sshd.service
  249. 249 systemctl status sshd
  250. 250 dnf install -y httpd
  251. 251 service sshd status
  252. 252 systemctl status httpd
  253. 253 systemctl enable --now httpd
  254. 254 exit
  255. 255 history
  256. 256 fdisk /dev/nvme0n1
  257. 257 lslbk
  258. 258 lsblk
  259. 259 cat /proc/partitions
  260. 260 fdisk -l /dev/nvme0n1
  261. 261 mkfs.xfs /dev/nvme0n1p4
  262. 262 cd /boot
  263. 263 umount /dev/sda1
  264. 264 umount /boot
  265. 265 lsof /boot
  266. 266 findmnt
  267. 267 lsblk
  268. 268 blkid
  269. 269 mount | grep part6
  270. 270 tune2fs -L cow /dev/nvme0n1p5
  271. 271 mount LABEL=cow /mnt
  272. 272 vim /etc/fstab
  273. 273 fdisk /dev/nvme0n1
  274. 274 mkswap /dev/nvme0n1p6
  275. 275 free -m
  276. 276 vim /etc/fstab
  277. 277 swapon -a
  278. 278 free -m
  279. 279 history
  280. 280 dd if=/dev/zero of=/swapfile bs=1M count=1024
  281. 281 mkswap /swapfile
  282. 282 chmod 0600 /swapfile
  283. 283 vim /etc/fstab
  284. 284 swapon -a
  285. 285 free -m
  286. 286 cd
  287. 287 ./countdown 1
  288. 288 df -h
  289. 289 dd if=/dev/sr0 of=/rhel9.iso bs=1M
  290. 290 mkdir /repo
  291. 291 vim /etc/fstab
  292. 292 mount -a
  293. 293 ls /rhel9
  294. 294 ls /repo/
  295. 295 dnf install nmap
  296. 296 dnf config-manager -h | less
  297. 297 dnf config-manager --add-repo="file:///repo/BaseOS"
  298. 298 dnf config-manager --add-repo="file:///repo/AppStream"
  299. 299 dnf install nmap -y
  300. 300 cd /etc/yum.repos.d/
  301. 301 ls
  302. 302 vim repo_BaseOS.repo
  303. 303 vim repo_AppStream.repo
  304. 304 dnf install nmap -y
  305. 306 history
  306. 307 cat repo_BaseOS.repo
  307. 308 cd
  308. 309 cat /etc/fstab
  309. 310 dnf list 'selinux*'
  310. 311 dnf search selinux
  311. 312 dnf provides */Containerfile
  312. 313 ls -l $(which dnf) $(which yum)
  313. 314 dnf groups list
  314. 315 dnf groups install "Virtualization Host"
  315. 316 dnf groups list hidden
  316. 317 history
  317. 318 dd if=/dev/nvme0n1 of=/dev/zero &
  318. 319 kill -USR1 37341
  319. 320 fg
  320. 321 dnf install -y git
  321. 322 git clone https://github.com/sandervanvugt/rhcsa
  322. 323 cd rhcsa/
  323. 324 ls
  324. 325 ./zombie
  325. 326 systemctl status httpd
  326. 327 exit
  327. 328 ./countdown 16 "setup repo server and client"
  328. 329 ./countdown 15 "tuned lab and coffee"
  329. 330 exit
  330. 331 systemctl cat httpd.service
  331. 332 systemctl show httpd.service
  332. 333 systemctl edit httpd.service
  333. 334 export EDITOR=/usr/bin/vim
  334. 335 systemctl edit httpd.service
  335. 336 systemctl cat httpd.service
  336. 337 systemctl daemon-reload
  337. 338 systemctl status httpd
  338. 339 kill -9 40478
  339. 340 systemctl status httpd
  340. 341 man -k systemd | less
  341. 342 man systemd.directives
  342. 343 man systemd.unit
  343. 344 ./countdown 13 "break and practice"
  344. 345 history
  345. 346 top
  346. 347 killall dd
  347. 348 top
  348. 349 dnf install nginx -y
  349. 350 systemctl mask httpd
  350. 351 systemctl unmask httpd
  351. 352 systemctl mask nginx
  352. 353 systemctl start nginx
  353. 354 systemctl status sshd
  354. 355 journalctl
  355. 356 journalctl -p err
  356. 357 journalctl -f
  357. 358 journalctl -u sshd.service
  358. 359 cd /var/log
  359. 360 ls
  360. 361 ls -l
  361. 362 grep 'Storage' /etc/systemd/journald.conf
  362. 363 ls -l /var/log/journal
  363. 364 mkdir /var/log/journal
  364. 365 ls /var/log/journal/
  365. 366 systemctl restart systemd-journal-flush.service
  366. 367 ls
  367. 368 ls journal/
  368. 369 lsblk
  369. 370 gdisk /dev/nvme0n2
  370. 371 pvcreate /dev/nvme0n2p1
  371. 372 pvs
  372. 373 vgcreate vgdata /dev/nvme0n2p1
  373. 374 pvs
  374. 375 vgs
  375. 376 vgdisplay
  376. 377 lvcreate -n lvdata -L 2G vgdata
  377. 378 lvcreate -n lvdata -l 100%FREE vgdata
  378. 379 lvs
  379. 380 mkfs.ext4 /dev/vgdata/lvdata
  380. 381 mkdir /lvdata
  381. 382 vim /etc/fstab
  382. 383 mount -a
  383. 384 mount
  384. 385 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
  385. 386 history
  386. 387 lsblk
  387. 388 gdisk /dev/nvme0n2
  388. 389 gdisk -l /dev/nvme0n2
  389. 390 cat /proc/partitions
  390. 391 partprobe
  391. 392 cat /proc/partitions
  392. 393 kpartx -a
  393. 394 kpartx -a /dev/nvme0n2
  394. 395 gdisk -l /dev/nvme0n2
  395. 396 cat /proc/partitions
  396. 397 reboot
  397. 398 cat /proc/partitions
  398. 399 lvs
  399. 400 df -h
  400. 401 vgs
  401. 402 vgextend vgdata /dev/nvme0n2p2
  402. 403 vgs
  403. 404 lvextend -r -l +50%FREE /dev/vgdata/lvdata
  404. 405 df -h
  405. 406 gdisk /dev/nvme0n2
  406. 407 poweroff
  407. 408 vim /etc/default/grub
  408. 409 grub2-mkconfig -o /boot/grub2/grub.cfg
  409. 410 systemctl isolate multi-user.target
  410. 411 man ifconfig
  411. 412 ./countdown 5 lab
  412. 413 ./countdown 12 break
  413. 414 getenforce
  414. 415 setenforce permissive
  415. 416 getenforce
  416. 417 setenforce enforcing
  417. 418 vim /etc/sysconfig/selinux
  418. 419 ls -Z /var/www
  419. 420 ps Zaux | grep http
  420. 421 ls -Z /var/www
  421. 422 mkdir /web
  422. 423 ls -dZ /web
  423. 424 vim /web/index.html
  424. 425 vim /etc/httpd/conf/httpd.conf
  425. 426 systemctl restart httpd
  426. 427 ps Zaux | grep http
  427. 428 curl localhost
  428. 429 curl http://localhost
  429. 430 vim /etc/hosts
  430. 431 curl server1
  431. 432 systemctl status httpd
  432. 433 systemctl stop firewalld
  433. 434 curl http://localhost
  434. 435 wget localhost
  435. 436 vim /etc/nsswitch.conf
  436. 437 curl localhost
  437. 438 wget http://localhost
  438. 439 wget server1.example.local
  439. 440 vim /etc/nsswitch.conf
  440. 441 curl localhost
  441. 442 getenforce
  442. 443 setenforce permissive
  443. 444 curl localhost
  444. 445 setenforce enforcing
  445. 446 grep AVC /var/log/audit/audit.log
  446. 447 ls -Z /var/www
  447. 448 man semanage-fcontext
  448. 449 semanage fcontext -a -t httpd_sys_content_t "/web(.*)?"
  449. 450 ls -dZ /web
  450. 451 restorecon -Rv /web
  451. 452 ls -dZ /web
  452. 453 getenforce
  453. 454 curl localhost
  454. 455 history
  455. 456 semenage fcontext -l
  456. 457 semanage fcontext -l
  457. 458 semanage fcontext -l | wc
  458. 459 dnf install -y selinux-policy-doc
  459. 460 man -k _selinux
  460. 461 man -k _selinux | wc
  461. 462 man -k _selinux | grep http
  462. 463 man httpd_selinux
  463. 464 vim /etc/httpd/conf/httpd.conf
  464. 465 systemctl restart httpd
  465. 466 systemctl status httpd
  466. 467 getenforce
  467. 468 setenforce permissive
  468. 469 systemctl restart httpd
  469. 470 setenforce enforcing
  470. 471 grep AVC /var/log/audit/audit.log
  471. 472 man semanage-port
  472. 473 semanage port -a -t http_port_t -p tcp 82
  473. 474 getenforce
  474. 475 systemctl restart httpd
  475. 476 history
  476. 477 getsebool -a | grep ftp
  477. 478 setsebool -P ftpd_anon_write on
  478. 479 getsebool -a | grep ftp
  479. 480 journalctl | grep sealert
  480. 481 sealert -l eab70786-ae59-41b6-a0b7-dbdc4b9a65f4 | less
  481. 482 journalctl | grep sealert
  482. 483 sealert -l 7d174313-e63c-473a-86f0-2038acfa409b | less
  483. 484 history
  484. 485 mv /etc/hosts /web/
  485. 486 cp /web/hosts /etc/
  486. 487 ls -Z /web/hosts
  487. 488 curl http://localhost/hosts
  488. 489 curl http://localhost/hosts 82
  489. 490 vim /etc/httpd/conf/httpd.conf
  490. 491 systemctl restart httpd
  491. 492 curl http://localhost/hosts
  492. 493 getenforce
  493. 494 ls -Z /web/hosts
  494. 495 restorecon /web/hosts
  495. 496 ls -Z /web/hosts
  496. 497 dnf install stratis-cli
  497. 498 systemctl enable --now stratisd
  498. 499 gdisk /dev/nvme0n2
  499. 500 reboot
  500. 501 lsblk
  501. 502 df -h
  502. 503 vim /etc/fstab
  503. 504 systemctl disable stratis
  504. 505 systemctl disable stratisd
  505. 506 xxd /dev/nvme0n2p6 | less
  506. 507 dd if=/dev/zero of=/dev/nvme0n2p6 bs=1M count=10
  507. 508 dd if=/dev/zero of=/dev/nvme0n2p5 bs=1M count=10
  508. 509 reboot
  509. 510 ./countdown 5
  510. 511 vim /etc/hosts
  511. 512 showmount -e nfsserver
  512. 513 dnf install -y nfs-utils
  513. 514 showmount -e nfsserver
  514. 515 ./countdown 14 lab and nfs-server setup according to slide
  515. 516 mount nfsserver:/nfsdata /mnt
  516. 517 mount
  517. 518 umount /mnt
  518. 519 dnf install -y autofs
  519. 520 vim /etc/auto.master
  520. 521 vim /etc/auto.misc
  521. 522 vim /etc/auto.master
  522. 523 vim /etc/auto.nfsdata
  523. 524 systemctl enable --now autofs
  524. 525 mount
  525. 526 cd /data
  526. 527 ls
  527. 528 ls -a
  528. 529 cd files
  529. 530 mount
  530. 531 touch here
  531. 532 vim /etc/auto.master
  532. 533 vim /etc/auto.ldap
  533. 534 systemctl restart autofs
  534. 535 cd /home/ldap/
  535. 536 ls -a
  536. 537 cd ldapuser1
  537. 538 cd ../
  538. 539 ls
  539. 540 cd ldapuser7
  540. 541 history
  541. 542 cat /etc/auto.ldap
  542. 543 grep home /etc/auto.master
  543. 544 reboot
  544. 545 history
  545. 546 systemctl status firewalld
  546. 547 firewall-cmd --list-all
  547. 548 firewall-cmd --get-services
  548. 549 firewall-cmd --add-service http
  549. 550 firewall-cmd --add-service http --permanent
  550. 551 firewall-cmd --list-all
  551. 552 ls /usr/lib/firewalld/services/
  552. 553 cp /usr/lib/firewalld/services/http.xml /etc/firewalld/services/sander.xml
  553. 554 vim /etc/firewalld/services/sander.xml
  554. 555 firewall-cmd --get-services
  555. 556 systemctl restart firewalld
  556. 557 firewall-cmd --get-services
  557. 558 firewall-cmd --add-service sander
  558. 559 firewall-cmd --add-service sander --permanent
  559. 560 history
  560. 561 exit
  561. 562 systemctl status chronyd
  562. 563 vim /etc/chrony.conf
  563. 564 chronyc sources
  564. 565 at teatime
  565. 566 atq
  566. 567 systemctl list-unit-files -t timer
  567. 568 systemctl cat logrotate.timer
  568. 569 systemctl cat logrotate.service
  569. 570 systemctl status logrotate
  570. 571 systemctl list-units
  571. 572 systemctl list-units -t service
  572. 573 systemctl list-unit-files -t service
  573. 574 cd rhcsa/
  574. 575 ls
  575. 576 systemctl start touchfile.timer
  576. 577 systemctl cat fstrim.service
  577. 578 cd /etc/systemd
  578. 579 vim touchfile.service
  579. 580 systemctl list-unit-files -t timer
  580. 581 systemctl cat fstrim.timer
  581. 582 pwd
  582. 583 vim touchfile.timer
  583. 584 man 7 systemd-time
  584. 585 vim touchfile.timer
  585. 586 systemctl enable --now touchfile.timer
  586. 587 systemctl daemon-reload
  587. 588 systemctl enable --now touchfile.timer
  588. 589 pwd
  589. 590 ls
  590. 591 mv touch* system/
  591. 592 systemctl enable --now touchfile.timer
  592. 593 man systemd.time
  593. 594 vim /etc/crontab
  594. 595 su - linda
  595. 596 journalctl
  596. 597 cd /etc/cron.d
  597. 598 ls
  598. 599 exit
  599. 600 ./countdown 30 "mini exam as found in the git repo"
  600. 601 cd rhcsa/
  601. 602 ls
  602. 603 less mini-exam-30min.txt
  603. 604 history
  604.  
  605. ###### student commands[student@server1 rhcsa]$ history
  606. 1 sudo -i
  607. 2 su -
  608. 3 sudo -i
  609. 4 sudo -i
  610. 5 exit
  611. 6 su -
  612. 7 sudo -i
  613. 8 sudo systemctl isolate graphical.target
  614. 9 sudo -i
  615. 10 sudo -i
  616. 11 podman ps
  617. 12 podman stop sleepy
  618. 13 podman ps
  619. 14 podman stop aa7d
  620. 15 cd rhcsa/
  621. 16 ./countdown 14
  622. 17 ./countdown 15
  623. 18 podman login registry.redhat.io
  624. 19 sudo vim /etc/containers/registries.conf
  625. 20 sudo dnf install container-tools
  626. 21 git clone https://github.com/sandervanvugt/rhcsa
  627. 22 cd rhcsa
  628. 23 ls
  629. 24 vim Containerfile
  630. 25 podman info
  631. 26 podman search ubi8
  632. 27 podman images
  633. 28 podman login registry.access.redhat.com
  634. 29 podman build -t mymap .
  635. 30 podman images
  636. 31 vim Containerfile
  637. 32 podman build -t alpmap .
  638. 33 vim Containerfile
  639. 34 podman build -t alpmap .
  640. 35 vim Containerfile
  641. 36 podman build -t alpmap .
  642. 37 podman images
  643. 38 history
  644. 39 podman search ubi
  645. 40 podman run --name sleepy docker.io/redhat/ubi9 sleep 3600
  646. 41 podman run -d --name sleepy docker.io/redhat/ubi9 sleep 3600
  647. 42 podman ps
  648. 43 podman ps -a
  649. 44 podman rm sleepy
  650. 45 podman run -d --name sleepy docker.io/redhat/ubi9 sleep 3600
  651. 46 podman ps
  652. 47 podman run docker.io/library/busybox
  653. 48 podman ps
  654. 49 podman ps -a
  655. 50 podman images
  656. 51 podman run localhost/alpmap
  657. 52 podman run --name mydb quay.io/centos7/mariadb-103-centos7
  658. 53 podman ps
  659. 54 podman ps -a
  660. 55 podman logs mydb
  661. 56 skopeo inspect docker://quay.io/centos7/mariadb-103-centos7
  662. 57 podman rm mydb
  663. 58 podman run --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
  664. 59 podman run -d -p 80:80 registry.access.redhat.com/ubi9/nginx-120
  665. 60 podman run -d -p 8080:80 registry.access.redhat.com/ubi9/nginx-120
  666. 61 podman port -a
  667. 62 podman ps
  668. 63 podman ps -a
  669. 64 sudo firewall-cmd --add-port=8080/tcp --permanent
  670. 65 sudo firewall-cmd --reload
  671. 66 firewall-cmd --list-all
  672. 67 podman run -d -p 8080:80 docker.io/library/nginx
  673. 68 podman ps
  674. 69 curl localhost:8080
  675. 70 podman search mariadb | grep quay
  676. 71 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
  677. 72 podman stop mydb
  678. 73 podm rm mydb
  679. 74 podman rm mydb
  680. 75 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password quay.io/centos7/mariadb-103-centos7
  681. 76 podman exec mydb grep mysql /etc/passwd
  682. 77 cd
  683. 78 mkdir mydb
  684. 79 ls -ld mydb/
  685. 80 podman unshare chown 27:27 mydb
  686. 81 podman unshare ls -ld mydb
  687. 82 ls -ld mydb
  688. 83 podman unshare cat /proc/self/uid_map
  689. 84 podman inspect mydb | less
  690. 85 podman stop mydb
  691. 86 podman rm mydb
  692. 87 podman run -d --name mydb -e MYSQL_ROOT_PASSWORD=password -v /home/student/mydb:/var/lib/mysql:Z quay.io/centos7/mariadb-103-centos7
  693. 88 ls -l mydb/
  694. 89 ls -lZ mydb/
  695. 90 cd rhcsa/
  696. 91 ./countdown 17 "bind mounting rootless containers (see slides)"
  697. 92 history
  698. 93 podman ps
  699. 94 podman exec -it mydb sh
  700. 95 podman inspect mydb | less
  701. 96 podman exec -it mydb sh
  702. 97 podman images
  703. 98 podman image inspect f4db | less
  704. 99 sudo loginctl enable-linger linda
  705. 100 ssh linda@localhost
  706. 101 sudo reboot
  707. 102 ps faux | less
  708. 103 cd rhcsa
  709. 104 ls
  710. 105 vim mini-exam-30min.txt
  711. 106 sudo -i
  712. 107 history
  713.  
  714.  
  715. ##### linda commands[linda@server1 ~]$ history
  716. 1 exit
  717. 2 ls -l
  718. 3 rm -f rootfile
  719. 4 ls -ld .
  720. 5 exit
  721. 6 echo testing > rootfile2
  722. 7 vim rootfile2
  723. 8 ls -l
  724. 9 exit
  725. 10 touch newerfile
  726. 11 ls -l
  727. 12 exit
  728. 13 crontab -e
  729. 14 time
  730. 15 date
  731. 16 exit
  732. 17 mkdir -p .config/systemd/user
  733. 18 cd .config/systemd/user/
  734. 19 podman run -d --name mynginx -p 8081:80 nginx
  735. 20 podman ps
  736. 21 podman generate -h | less
  737. 22 podman generate --help
  738. 23 podman generate systemd --help
  739. 24 man podman-generate
  740. 25 man podman-generate-systemd
  741. 26 podman generate systemd --name mynginx --files --new
  742. 27 vim container-mynginx.service
  743. 28 systemctl --user daemon-reload
  744. 29 systemctl --user enable container-mynginx.service
  745. 30 exit
  746. 31 history
  747.  
Advertisement
Add Comment
Please, Sign In to add comment