Advertisement
sandervanvugt

devops day1 june2021

Jun 7th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. ROCKY LINUX COMMANDS
  2. [student@rocky83 devopsinfourweeks]$ history
  3. 1 sudo yum install vim git -y
  4. 2 git clone https://github.com/sandervanvugt/deveopsinfourweeks
  5. 3 git clone https://github.com/sandervanvugt/devopsinfourweeks
  6. 4 cd devopsinfourweeks/
  7. 5 ls
  8. 6 ./counter.sh 12
  9. 7 sudo dnf install epel-release
  10. 8 sudo dnf install -y ansible
  11. 9 sudo sh -c 'echo 192.168.29.85 ubuntu.example.com ubuntu >> /etc/hosts'
  12. 10 cat /etc/hosts
  13. 11 ping ubuntu
  14. 12 ssh-keygen
  15. 13 ssh-copy-id ubuntu
  16. 14 echo ubuntu >> inventory
  17. 15 ansible ubuntu -m ping -i inventory -u student
  18. 16 ansible ubuntu -m ping -i inventory -u student -K
  19. 17 history
  20. 18 sudo ls -l /root
  21. 19 ansible-doc -l
  22. 20 ansible ubuntu -u student -b -K -m user "name=linda"
  23. 21 ansible ubuntu -u student -b -K -m user -a "name=linda"
  24. 22 ansible ubuntu -u student -b -K -m package -a "name=nmap"
  25. 23 ansible ubuntu -u student -b -K -m user -a "name=linda"
  26. 24 vim ansible.cfg
  27. 25 ls
  28. 26 vim deploy-webserver.yaml
  29. 27 vim ans-deploy-webserver.yaml
  30. 28 cd ..
  31. 29 git clone https://github.com/sandervanvugt/ansible-4h
  32. 30 git clone https://github.com/sandervanvugt/ansible-3h
  33. 31 cd ansible-3h/
  34. 32 ls
  35. 33 cd base/
  36. 34 ls
  37. 35 cd ../install/
  38. 36 ls
  39. 37 vim vsftpd.yml
  40. 38 ansible-playbook vsftpd.yml
  41. 39 vim inventory
  42. 40 ansible-playbook vsftpd.yml
  43. 41 vim ansible.cfg
  44. 42 ansible-playbook vsftpd.yml
  45. 43 sudo ls /root
  46. 44 ansible-playbook vsftpd.yml -K
  47. 45 cd ..
  48. 46 cd ansible-3h/install/
  49. 47 vim vsftpd.yml
  50. 48 cd ../../devopsinfourweeks/
  51. 49 ls
  52. 50 vim ansible-ubuntu.yml
  53. 51 ansible-playbook ansible-ubuntu.yml
  54. 52 ansible-playbook ansible-ubuntu.yml -K
  55. 53 ./counter.sh 12
  56. 54 history
  57.  
  58.  
  59. UBUNTU COMMANDSstudent@student-virtual-machine:~$ history
  60. 1 sudo reboot
  61. 2 free -
  62. 3 free -m
  63. 4 apt install -y git vim
  64. 5 sudo apt install -y git vim
  65. 6 ip a
  66. 7 sudo reboot
  67. 8 id
  68. 9 docker run fedora
  69. 10 docker ps
  70. 11 docker ps -a
  71. 12 docker run nginx
  72. 13 docker run nginx -d
  73. 14 docker run -d nginx
  74. 15 docker ps
  75. 16 ps fax | less
  76. 17 docker run -it fedora sh
  77. 18 docker ps
  78. 19 docker inspect fedora:latest | less
  79. 20 docker inspect lucid_agnesi
  80. 21 docker run --name webserver --memory="128m" -d -p 8080:80 nginx
  81. 22 docker ps
  82. 23 curl localhost:8080
  83. 24 history
  84.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement