Advertisement
sandervanvugt

RHCSA march23 all days

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