Advertisement
sandervanvugt

RHCSA day4 may22

May 12th, 2022
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. [root@localhost linda]# history
  2. 1 history
  3. 2 systemctl status httpd
  4. 3 getenforce
  5. 4 grep AVC /var/log/audit/audit.log
  6. 5 journalctl | grep sealert
  7. 6 sealert -l 4b3286d7-c665-444a-8a83-7f98648061af | less
  8. 7 semanage port -a -t http_port_t -p tcp 82
  9. 8 systemctl restart httpd
  10. 9 systemctl status httpd
  11. 10 history
  12. 11 vim /etc/httpd/conf/httpd.conf
  13. 12 mkdir /web
  14. 13 echo hello > /web/index.html
  15. 14 systemctl restart httpd
  16. 15 curl localhost:82
  17. 16 getenforce
  18. 17 grep AVC /var/log/audit/audit.log
  19. 18 ls -Z /var/www
  20. 19 man semanage-fcontext
  21. 20 # semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
  22. 21 # restorecon -R -v /web
  23. 22 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
  24. 23 restorecon -Rv /web
  25. 24 curl localhost:82
  26. 25 journalctl | grep sealert
  27. 26 sealert -l b21de9d6-4db0-46da-b1a1-4050ada199ad | less
  28. 27 history
  29. 28 reboot
  30. 29 dnf install -y git
  31. 30 git clone https://github.com/sandervanvugt/rhcsa
  32. 31 ls rhcsa/
  33. 32 showmount -e 192.168.29.160
  34. 33 mount 192.168.29.160:/myfiles /mnt
  35. 34 ls /mnt
  36. 35 vim /etc/fstab
  37. 36 yum install -y autofs
  38. 37 ls /etc/auto.*
  39. 38 vim /etc/auto.master
  40. 39 vim /etc/auto.misc
  41. 40 vim /etc/auto.master
  42. 41 vim /etc/auto.nfsdata
  43. 42 systemctl enable --now autofs
  44. 43 ls /
  45. 44 cd /nfsdata
  46. 45 ls
  47. 46 ls -a
  48. 47 mount
  49. 48 cd myfiles
  50. 49 ls
  51. 50 mount
  52. 51 history
  53. 52 vim /etc/auto.master
  54. 53 vim /etc/auto.ldap
  55. 54 vim /etc/auto.master
  56. 55 vim /etc/auto.ldap
  57. 56 systemctl restart autofs
  58. 57 cd /home
  59. 58 ls -a
  60. 59 cd ldap
  61. 60 ls
  62. 61 ls -a
  63. 62 cd ldapuser1
  64. 63 pwd
  65. 64 mount
  66. 65 cd ..
  67. 66 cd ldapuser2
  68. 67 cd
  69. 68 cd rhcsa/
  70. 69 ./countdown 14
  71. 70 vim /etc/auto.ldap
  72. 71 yum module install container-tools
  73. 72 podman run -d nginx
  74. 73 podman ps
  75. 74 vim /etc/containers/registries.conf
  76. 75 podman login registry.access.redhat.com
  77. 76 vim /etc/containers/registries.conf
  78. 77 podman pull registry.access.redhat.com/ubi8/ubi:latest
  79. 78 podman images
  80. 79 podman run nginx
  81. 80 podman run -it ubuntu
  82. 81 podman ps
  83. 82 podman run fedora
  84. 83 podman ps
  85. 84 podman ps -a
  86. 85 podman info
  87. 86 podman images
  88. 87 podman image inspect 7425d3a7c478
  89. 88 podman image inspect 7425d3a7c478 | less
  90. 89 podman ps
  91. 90 podman inspect ac77 | less
  92. 91 podman images
  93. 92 podman rmi docker.io/library/ubuntu:latest
  94. 93 podman run -d -p 8000:80 nginx
  95. 94 docker ps
  96. 95 curl localhost:8000
  97. 96 podman port -a
  98. 97 podman run -d mariadb
  99. 98 podman ps
  100. 99 podman ps -a
  101. 100 podman logs cd8
  102. 101 podman run -d -e MARIADB_ROOT_PASSWORD=password mariadb
  103. 102 podman ps
  104. 103 ./countdown 12
  105. 104 ip a
  106. 105 exit
  107. 106 ps aux | less
  108. 107 ssh linda@localhost
  109. 108 loginctl show-user linda
  110. 109 loginctl enable-linger linda
  111. 110 loginctl show-user linda
  112. 111 reboot
  113. 112 ps aux | less
  114. 113 rhcsa/countdown 32
  115. 114 ln -s /etc/hosts /tmp/myhosts
  116. 115 ls -l /etc/hosts /tmp/myhosts
  117. 116 cd /etc/skel/
  118. 117 touch emptyfile
  119. 118 pwd
  120. 119 vim /etc/login.defs
  121. 120 poweroff
  122. 121 find / -size +100M
  123. 122 find / -size +100M > /tmp/bigfiles
  124. 123 vgs
  125. 124 fdisk /dev/sda
  126. 125 vgextend rhel /dev/sda3
  127. 126 vgs
  128. 127 lvcreate -n lv500 -L 500M rhel
  129. 128 mkfs.ext3 /dev/rhel/lv500 -L myvolume
  130. 129 mkdir /myvol
  131. 130 vim /etc/fstab
  132. 131 findmnt --verify
  133. 132 mount -a
  134. 133 history
  135. 134 vgs
  136. 135 pvs
  137. 136 vim /etc/fstab
  138. 137 findmnt --verify
  139. 138 fdisk -l
  140. 139 df -h /boot
  141. 140 yum provides */seinfo
  142. 141 history
  143. 142 groupadd profs
  144. 143 useradd -G profs anna
  145. 144 mkdir -p /data/profs
  146. 145 chown anna:profs /data/profs
  147. 146 chmod 1770 /data/profs
  148. 147 ls -ld /data/profs/
  149. 148 crontab -e
  150. 149 tree /home/linda
  151. 150 cd /home/londa
  152. 151 cd /home/linda
  153. 152 ls -a
  154. 153 tree -h | less
  155. 154 tree --help | less
  156. 155 tree -a
  157. 156 ls -R .config
  158. 157 less /var/log/messages
  159. 158 history
  160.  
  161.  
  162. ###### user linda[linda@localhost ~]$ history
  163. 1 mkdir -p ~/.config/systemd/user
  164. 2 cd ~/.config/systemd/user/
  165. 3 podman run -d --name mynginx -p 8081:80 nginx
  166. 4 podman ps
  167. 5 podman generate -h
  168. 6 podman generate --help
  169. 7 podman generate systemd --name mynginx --files
  170. 8 vim container-mynginx.service
  171. 9 systemctl --user daemon-reload
  172. 10 systemctl --user enable container-mynginx.service
  173. 11 systemctl --user status container-mynginx.service
  174. 12 exit
  175. 13 sudo loginctl show-user linda
  176. 14 exit
  177. 15 history
  178.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement