sandervanvugt

Untitled

May 29th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.94 KB | None | 0 0
  1. SETTING UP NFS SERVER
  2. [root@nfsserver ~]# history
  3. 1 hostnamectl --help
  4. 2 hostnamectl set-hostname nfsserver.example.com
  5. 3 mkdir /data
  6. 4 mkdir /home/ldap/ldapuser1
  7. 5 mkdir /home/ldap/ldapuser1 -p
  8. 6 mkdir /home/ldap/ldapuser2 -p
  9. 7 mkdir /home/ldap/ldapuser3 -p
  10. 8 exit
  11. 9 vim /etc/exports
  12. 10 systemctl enable --now nfs-server
  13. 11 systemctl status nfs-server
  14. 12 firewall-cmd --get-services
  15. 13 firewall-cmd --add-service mountd
  16. 14 firewall-cmd --add-service rpc-bind
  17. 15 firewall-cmd --add-service nfs
  18. 16 firewall-cmd --add-service nfs --permanent
  19. 17 firewall-cmd --add-service rpc-bind --permanent
  20. 18 firewall-cmd --add-service mountd
  21. 19 firewall-cmd --add-service mountd --permanent
  22. 20 history
  23. [root@nfsserver ~]# cat /etc/exports
  24. /data *(no_root_squash,rw)
  25. /home/ldap *(no_root_squash,rw)
  26.  
  27. AUTOFS STUFF
  28. [root@server2 ldapuser1]# grep '^/' /etc/auto.master
  29. /misc /etc/auto.misc
  30. /files /etc/auto.files
  31. /home/ldap /etc/auto.ldap
  32. /net -hosts
  33. [root@server2 ldapuser1]# cat /etc/auto.files
  34. data -rw 192.168.4.157:/data
  35. [root@server2 ldapuser1]# cat /etc/auto.ldap
  36. * -rw 192.168.4.157:/home/ldap/&
  37.  
  38. DAY 4 HISTORY
  39. 432 history
  40. 433 sleep 20; countdown 12
  41. 434 history
  42. 435 man semanage
  43. 436 ls -lZ /var/www
  44. 437 man semanage-fcontext
  45. 438 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
  46. 439 ls -lZd /web
  47. 440 restorecon -Rv /web
  48. 441 getenforce
  49. 442 curl http://localhost
  50. 443 man semanage-port
  51. 444 getsebool -a
  52. 445 getsebool -a | wc
  53. 446 getsebool -a | grep ftp
  54. 447 setsebool -P ftpd_anon_write on
  55. 448 systemctl status httpd
  56. 449 systemctl status httpd -l
  57. 450 systemctl status -l httpd
  58. 451 setenforce 0
  59. 452 systemctl start httpd
  60. 453 systemctl status httpd
  61. 454 grep sealert /var/log/messages
  62. 455 sealert -l 74f98838-27de-42a8-bea8-22d84df69951 | less
  63. 456 semanage port -a -t http_port_t -p tcp 82
  64. 457 getenforce
  65. 458 setenforce enforcing
  66. 459 systemctl restart httpd
  67. 460 systemctl status httpd
  68. 461 history
  69. 462 reboot
  70. 463 history
  71. 464 cd /etc/selinux/targeted/contexts/files/
  72. 465 ls
  73. 466 cat file_contexts.local
  74. 467 history
  75. 468 cat /etc/fstab
  76. 469 poweroff
  77. 470 yum install -y stratis-cli stratisd
  78. 471 systemctl enable --now stratisd
  79. 472 lsblk
  80. 473 gdisk /dev/sdb
  81. 474 stratis pool create mypool /dev/sdb1
  82. 475 stratis pool list
  83. 476 stratis filesystem create mypool myfs1
  84. 477 stratis filesystem list
  85. 478 stratis pool add-data mypool /dev/sdb2
  86. 479 stratis pool list
  87. 480 stratis filesystem create mypool myfs2
  88. 481 stratis fs list
  89. 482 blkid
  90. 483 mkdir /myfs1
  91. 484 mkdir /myfs2
  92. 485 vim /etc/fstab
  93. 486 mount -a
  94. 487 df -h
  95. 488 stratis pool list
  96. 489 stratis fs list
  97. 490 lsblk -fs
  98. 491 history
  99. 492 systemctl get-default
  100. 493 systemctl set-default multi-user.target
  101. 494 systemctl reboot
  102. 495 systemctl list-units
  103. 496 mount
  104. 497 mount -o remount,rw /
  105. 498 systemctl start rescue.target
  106. 499 systemctl list-units
  107. 500 systemctl reboot
  108. 501 systemctl set-default graphical.target
  109. 502 systemctl reboot
  110. 503 vim /etc/default/grub
  111. 504 grub2-mkconfig -o /boot/grub2/grub.cfg
  112. 505 reboot
  113. 506 systemctl -t help
  114. 507 systemctl status httpd
  115. 508 systemctl start httpd
  116. 509 systemctl status httpd
  117. 510 systemctl stop httpd
  118. 511 systemctl enable --now httpd
  119. 512 systemctl status httpd
  120. 513 journalctl
  121. 514 cd /var/log/
  122. 515 ls -l
  123. 516 less messages
  124. 517 pwd
  125. 518 mkdir journal
  126. 519 poweroff
  127. 520 man vdo
  128. 521 vdo create --name=vdo0 --device=/dev/sdc --vdoLogicalSize=10T
  129. 522 mkfs.xfs -K /dev/mapper/vdo0
  130. 523 cd /usr/share/doc/
  131. 524 ls
  132. 525 cd vdo/
  133. 526 ls
  134. 527 cd examples/
  135. 528 ls
  136. 529 cd systemd/
  137. 530 ls
  138. 531 cat /etc/fstab
  139. 532 cd /run/systemd/generator/
  140. 533 ls
  141. 534 vim myfiles.mount
  142. 535 history
  143. 536 cd /usr/share/doc/vdo/examples/systemd/
  144. 537 cat VDO.mount.example
  145. 538 cp VDO.mount.example /etc/systemd/system/myvdo.mount
  146. 539 vim /etc/systemd/system/myvdo.mount
  147. 540 mkdir /myvdo
  148. 541 systemctl daemon-reload
  149. 542 systemctl status myvdo.mount
  150. 543 systemctl enable --now myvdo.mount
  151. 544 systemctl status myvdo.mount
  152. 545 mount | grep vdo
  153. 546 history
  154. 547 systemctl cat sshd.service
  155. 548 ps aux | grep ssh
  156. 549 kill -9 1288
  157. 550 ps aux | grep ssh
  158. 551 systemctl status sshd
  159. 552 cd /usr/lib/systemd/system
  160. 553 ls *.service
  161. 554 vim tuned.service
  162. 555 systemctl status sshd
  163. 556 reboot
  164. 557 countdown 12
  165. 558 systemctl status firewalld
  166. 559 firewall-cmd --list-all
  167. 560 systemctl --get-services
  168. 561 systemctl --get-service
  169. 562 firewall-cmd --get-services
  170. 563 firewall-cmd --add-service http
  171. 564 firewall-cmd --add-service http --permanent
  172. 565 firewall-cmd --help | grep port
  173. 566 firewall-cmd --add-port=82/tcp
  174. 567 firewall-cmd --add-port=82/tcp --permanent
  175. 568 firewall-cmd --list-all
  176. 569 history
  177. 570 showmount -e 192.168.4.157
  178. 571 mount 192.168.4.157:/data /mnt
  179. 572 mount
  180. 573 umount /mnt
  181. 574 vim /etc/fstab
  182. 575 mount -a
  183. 576 mkdir /nfsdata
  184. 577 mount -a
  185. 578 mount
  186. 579 vim /etc/fstab
  187. 580 yum install -y autofs
  188. 581 cd /etc
  189. 582 ls auto*
  190. 583 vim auto.master
  191. 584 vim auto.misc
  192. 585 ls /
  193. 586 vim auto.master
  194. 587 vim auto.files
  195. 588 systemctl restart autofs
  196. 589 ls /
  197. 590 cd /files
  198. 591 ls -a
  199. 592 cd data
  200. 593 pwd
  201. 594 cat /etc/auto.files
  202. 595 vim /etc/auto.master
  203. 596 vim /etc/auto.ldap
  204. 597 ls /home
  205. 598 systemctl restart autofs
  206. 599 ls /home
  207. 600 cd ldap
  208. 601 cd /home/ldap
  209. 602 cd ldapuser1
  210. 603 pwd
  211. 604 cat /etc/auto.master
  212. 605 grep '^/' /etc/auto.master
  213. 606 cat /etc/auto.files
  214. 607 cat /etc/auto.ldap
  215. 608 countdown 47
  216. 609 cd
  217. 610 ln -s /etc/hosts /tmp/myhosts
  218. 611 vim /etc/login.defs
  219. 612 chage -l bob
  220. 613 chage bob
  221. 614 cd /etc/skel
  222. 615 ls -la
  223. 616 touch hello
  224. 617 useradd bill
  225. 618 chage -l bill
  226. 619 ls -la /home/bill
  227. 620 cd
  228. 621 find / -size +100M
  229. 622 find / -size +100M >/tmp/bigfile
  230. 623 vgs
  231. 624 fdisk /dev/sda
  232. 625 vgcreate vg500 /dev/sda10
  233. 626 vgs
  234. 627 lvcreate -n lv500 -L 500M vg500
  235. 628 mkfs.ext3 --help
  236. 629 mkfs.ext3 -L myvolume /dev/vg500/lv500
  237. 630 mkdir /myvol
  238. 631 vim /etc/fstab
  239. 632 mount -a
  240. 633 mount
  241. 634 #reboot
  242. 635 yum provides */sealert
  243. 636 useradd -G profs anna
  244. 637 mkdir /lvdata/profs
  245. 638 cd /lvdata/
  246. 639 ls -l
  247. 640 chown anna:profs profs/
  248. 641 ls -l
  249. 642 chmod 1770 profs/
  250. 643 ls -l
  251. 644 logger HELLO
  252. 645 tail /var/log/messages
  253. 646 systemctl status crond
  254. 647 crontab -e
  255. 648 tail -f /var/log/messages
  256. 649 crontab -e
  257. 650 man -k dhcp | grep 8
  258. 651 yum search dhcp
  259. 652 history
Add Comment
Please, Sign In to add comment