2.8 Basic Linux Server Administration (Week 2 • Linux, Docker, Nginx & CI/CD)
1. Core Concept & Internal Working
Basic Linux Server Administration (Linux, Docker, Nginx & CI/CD) covers `ufw` firewall (`allow OpenSSH`, `allow 80,443/tcp`, keep `5432`/`6379` private!), disk usage (`df -h`, `du -sh`), log rotation (`logrotate`), and unattended security updates. In production software engineering, it is used to Ensuring PostgreSQL (`5432`) and Redis (`6379`) are NEVER exposed to `0.0.0.0` on the public internet! Mastering its underlying execution rules and edge-case boundaries lets you write reliable, maintainable code.
2. Real-World Engineering Use Case
Ensuring PostgreSQL (`5432`) and Redis (`6379`) are NEVER exposed to `0.0.0.0` on the public internet!
3. Granular Subtopics Covered
- `ufw` firewall (`allow OpenSSH`: Core foundation of Basic Linux Server Administration: Ensuring PostgreSQL (`5432`) and Redis (`6379`) are NEVER exposed to `0.0.0.0` on the public internet!
- `allow 80: Master '`allow 80' inside Basic Linux Server Administration across real-world inputs.
- 443/tcp`: Master '443/tcp`' inside Basic Linux Server Administration across real-world inputs.
- Keep `5432`/`6379` private!): Master 'Keep `5432`/`6379` private!)' inside Basic Linux Server Administration across real-world inputs.
- Production Pitfall Guard (Basic Linux Server Administration): Prevent common defect: Publishing `- "5432:5432"` or `- "6379:6379"` on a public cloud VM (Note: Docker port publishing manipulates `iptables` directly, bypassing `ufw` unless bound to `127.0.0.1:5432:5432`!).
- Hands-On Verification (Basic Linux Server Administration): Audit firewall & port bindings ensuring ONLY Nginx (`80`/`443`) + SSH (`22`) face the public internet.
4. Reference Implementation
# On cloud VMs: NEVER publish 0.0.0.0:5432 or 0.0.0.0:6379 — keep DB & Redis on internal Docker network!
5. Common Mistakes to Avoid
- Publishing `- "5432:5432"` or `- "6379:6379"` on a public cloud VM (Note: Docker port publishing manipulates `iptables` directly, bypassing `ufw` unless bound to `127.0.0.1:5432:5432`!).
- Skipping boundary, null/empty, or error-state verification when implementing Basic Linux Server Administration.
- Pushing untested Basic Linux Server Administration changes without clean naming and Git commit context.
6. Hands-On Exercise
Audit firewall & port bindings ensuring ONLY Nginx (`80`/`443`) + SSH (`22`) face the public internet.
7. Technical Interview Checkpoints
- Q: What problem does Basic Linux Server Administration solve in Linux, Docker, Nginx & CI/CD, and what fails if it is misused?
Key Focus: Ensuring PostgreSQL (`5432`) and Redis (`6379`) are NEVER exposed to `0.0.0.0` on the public internet! Guard against: Publishing `- "5432:5432"` or `- "6379:6379"` on a public cloud VM (Note: Docker port publishing manipulates `iptables` directly, bypassing `ufw` unless bound to `127.0.0.1:5432:5432`!). - Q: Explain the internal working of Basic Linux Server Administration (`ufw` firewall (`allow OpenSSH`, `allow 80,443/tcp`, keep `5432`/`6379` private!), disk usage (`df -h`, `du -sh`), log rotation (`logrotate`), and unattended security updates).
Key Focus: Walk step-by-step through `ufw` firewall (`allow OpenSSH`, `allow 80,443/tcp`, keep `5432`/`6379` private!), disk usage (`df -h`, `du -sh`), log rotation (`logrotate`), and unattended security updates with a concrete code example. - Q: How did you apply and verify Basic Linux Server Administration in your hands-on lab?
Key Focus: Audit firewall & port bindings ensuring ONLY Nginx (`80`/`443`) + SSH (`22`) face the public internet.