Chapter 12: Technology Stacks — LAMP, LEMP, MEAN, MERN
Practice Questions and Lab Exercises
- Expand LAMP, LEMP, MEAN and MERN. Draw the architecture diagram of any two.
- Differentiate LAMP and LEMP. Why is PHP-FPM needed in LEMP?
- Why do we build React/Angular apps before deployment instead of running
npm start? - Explain
try_files $uri $uri/ /index.html;in a single-page app. - Write the steps to install MongoDB from the official repository on Ubuntu 24.04.
- Which ports must be open in the security group for a MERN app? Which must never be open?
- Lab: Build a LAMP server on Amazon Linux 2023 and run
dbtest.php. - Lab: Build a LEMP server on Ubuntu and show
phpinfo(). - Lab: Deploy the MERN notes app on Ubuntu 24.04. Reboot and verify that MongoDB, the API (pm2) and Nginx all come back.
- 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), servicemongod, port 27017, keepbindIp 127.0.0.1. - SPA deploy:
npm run build/ng build→ copydist/to/var/www/...→ Nginxtry_files ... /index.html+location /api/ { proxy_pass http://127.0.0.1:5000; }. - API runs with pm2 (
start,save,startup).