Ravindra BagaleCourses & study guides

Chapter 12: Technology Stacks — LAMP, LEMP, MEAN, MERN

Practice Questions and Lab Exercises

  1. Expand LAMP, LEMP, MEAN and MERN. Draw the architecture diagram of any two.
  2. Differentiate LAMP and LEMP. Why is PHP-FPM needed in LEMP?
  3. Why do we build React/Angular apps before deployment instead of running npm start?
  4. Explain try_files $uri $uri/ /index.html; in a single-page app.
  5. Write the steps to install MongoDB from the official repository on Ubuntu 24.04.
  6. Which ports must be open in the security group for a MERN app? Which must never be open?
  7. Lab: Build a LAMP server on Amazon Linux 2023 and run dbtest.php.
  8. Lab: Build a LEMP server on Ubuntu and show phpinfo().
  9. Lab: Deploy the MERN notes app on Ubuntu 24.04. Reboot and verify that MongoDB, the API (pm2) and Nginx all come back.
  10. Lab: Deploy the MEAN notes app on Amazon Linux 2023.

Quick Revision

  • LAMP = Linux+Apache+MySQL+PHP; LEMP = Nginx+PHP-FPM instead of Apache.
  • MEAN/MERN = MongoDB + Express + Angular/React + Node.js — JavaScript everywhere.
  • MongoDB: official repo (mongodb-org), service mongod, port 27017, keep bindIp 127.0.0.1.
  • SPA deploy: npm run build / ng build → copy dist/ to /var/www/... → Nginx try_files ... /index.html + location /api/ { proxy_pass http://127.0.0.1:5000; }.
  • API runs with pm2 (start, save, startup).