SEC260 Simple Web Server CentOS - eitan-j/tech-journal GitHub Wiki

Make the VM

  • Create New Virtual Machine -> Typical -> Next
  • Select ISO
  • Next
  • Virtual machine name: SimpleWeb_ej
  • Next
  • Set disk to 30GB
  • Select Store virtual disk as a single file
  • Next
  • Uncheck Power on this virtual machine after creation
  • Select Customize hardware
  • Select Network Adapter
  • Set Network Connection to Bridged
  • Close -> Finish
  • View -> Stretch Guest -> Keep Aspect Ratio Strech
  • At this point I am in a CentOS virtual machine inside a Windows 10 computer being RDPd into by a Windows 10 virtual machine being accessed by VMware Horizon from my computer
  • Continue
  • Select INSTALLATION DESTINATION -> Done -> Begin Installation
  • Set root password
  • Create admin user
  • Wait
  • Press Reboot

Setup server

  • Note: some commands require root. To rerun a command with sudo use sudo !!
  • Log in
  • dhclient
  • ip addr and write down IP - 192.168.7.152
  • ping -c1 google.com to check that it works
  • yum install -y httpd
  • firewall-cmd --permanent --add-port=80/tcp
  • firewall-cmd --reload
  • firewall-cmd --query-port=80/tcp should return yes
  • systemctl enable httpd
  • systemctl start httpd
  • systemctl status httpd
  • curl http://192.168.7.152 | grep "working properly"