Blog 11 DevOps & Backend Starter Guide From Linux Commands to CI/CD Automation

Ultimate DevOps & Backend Starter Guide

🚀 Ultimate DevOps & Backend Starter Guide

Linux, HTTP, Databases, and Shell Scripting Essentials

1️⃣ Database Connectivity & Debugging Tips

Sometimes, your backend can’t connect to the database, even if the DB is running perfectly. Here’s how to check:

ping <db-IP>
telnet <db-IP> 3306
  • If telnet works but your app can’t connect → likely a DB security group or firewall issue.
  • For local testing, always try localhost or 127.0.0.1.

Tip: Network-level access issues are more common than code issues.

2️⃣ HTTP Methods & Status Codes Made Simple

HTTP methods define how your frontend talks to backend:

MethodPurposeExample Payload
GETRead / fetch data-
POSTCreate new data{ "amount": "200", "desc": "travel" }
PUTUpdate existing data-
DELETERemove data-

HTTP Status Codes Explained

CodeMeaningCommon Usage
1XXInformationalRarely used
2XXSuccess200 OK, 201 Created
3XXRedirection301 Moved Permanently
4XXClient Error400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 405 Method Not Allowed
5XXServer Error500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable
  • 404 → Endpoint doesn’t exist (client-side error)
  • 403 → Forbidden → You don’t have access
  • 401 → Unauthorized → Login required
  • 405 → Wrong HTTP method → e.g., sending GET instead of POST
  • 502 → Backend unreachable → frontend issue
  • 503 → Service temporarily unavailable → server down

3️⃣ Linux Server Memory & Disk Usage

Monitoring RAM, swap, and disk usage is crucial for DevOps and backend monitoring.

Check Memory Usage

free -h           # Human-readable memory usage
htop              # Interactive memory monitoring
cat /proc/meminfo # Detailed memory info

Top 10 Memory-Consuming Processes

ps aux --sort=-%mem | head -n 10

Disk Usage

df -hT       # Disk usage by filesystem
du -sh /*    # Disk usage for each folder in root

Memory vs Disk Basics:

  • RAM: Fast, temporary memory for running programs.
  • ROM / HDD: Permanent storage for files and OS.
  • Swap: Reserved space on disk to act as backup RAM.

4️⃣ Linux Booting Process (Simplified)

  1. BIOS / UEFI → Hardware initialization
  2. Bootloader (GRUB) → Loads the Linux kernel
  3. Kernel → Mounts root filesystem & starts init process
  4. Init / Systemd → Starts services, daemons, and user processes

5️⃣ Shell Scripting: Automate Everything

Shell scripting = running multiple Linux commands in a single file.

#!/bin/bash
DATE=$(date +%F)
tar -czf /backup/home_backup_$DATE.tar.gz /home/user/
echo "Backup completed!"
  • Reduces human error
  • Saves time on repetitive tasks
  • Automates server management, backups, or cloud tasks

6️⃣ Networking & Links

Forward vs Reverse Proxy

TypeDirectionPurpose
Forward ProxyClient → Proxy → InternetPrivacy, content filtering
Reverse ProxyInternet → Proxy → ServerLoad balancing, SSL termination

Inode, Symlink & Hardlink

  • Inode: Unique identifier for files in Linux
  • Symlink: Shortcut pointing to another file
  • Hardlink: Another name pointing to the same inode

7️⃣ Quick Daily Commands for DevOps

uptime          # Server uptime
top             # Top CPU-consuming processes
netstat -tulpn  # Open ports and listening services
df -h           # Disk usage
free -h         # Memory usage

Tip: Script repetitive commands to reduce human error and save time.

Conclusion

Mastering Linux troubleshooting, HTTP methods, database connectivity, and shell scripting forms the foundation of a strong DevOps and backend career. Pair your learning with a small project like:

  • Dockerized API
  • CI/CD pipeline
  • Postman tests

Host your work on GitHub to **stand out to recruiters** with practical skills!

© 2025 Kalyan. All rights reserved. Blog content patented by Kalyan.

Comments

Popular Posts