Installing Debian (simple way)

Introduction

🚀 Running Debian on a system with 1 CPU, 1 GB of RAM, and 80 GB of storage is entirely possible, but to get the most out of these limited resources, we need a performance-optimized setup. This guide will walk you through a minimal installation of Debian's latest version, focusing on removing unnecessary components and fine-tuning system settings. 🎯


Step 1: Downloading the Debian ISO

🎉 First, head to the official Debian website and download the "netinst" ISO for the latest stable release. The netinst image is perfect for minimal installations because it downloads only the necessary packages during setup. 🌐


Step 2: Preparing the Installation Media

🔥 Burn the ISO to a USB stick using a tool like Rufus (Windows) or dd (Linux). For example, on Linux, you can use:

sudo dd if=debian-netinst.iso of=/dev/sdX bs=4M status=progress

Replace /dev/sdX with the correct device name of your USB drive. Be cautious, as this command will overwrite the target device. ⚠️


Step 3: Installing Debian

🎯 Boot From the USB Stick: Insert the USB stick into the machine, power it on, and boot into the installation media (often requires pressing a key like F12 or Esc during startup).

🌟 Step-by-Step Installation:

  1. Language and Region: Select your preferred language and region settings. These influence default locale settings.
  2. Keyboard Layout: Choose the layout that matches your keyboard.
  3. Network Configuration: Configure the network interface, either through DHCP (automatic) or manual settings.
  4. User Account Setup: Create a root password and set up a non-root user for daily operations.

💾 Partitioning: For simplicity:

  • Use the guided partitioning option.
  • Select "Use entire disk" with "separate /home partition" for easy management.
  • Ensure swap space is set to at least 1 GB, especially given the low system memory.

🔧 Package Selection:

  • When prompted to select software, deselect everything except "Standard system utilities."
  • Make sure to select the SSH Server package during installation. This ensures remote access to your system without requiring additional setup later. 🔒

Step 4: Post-Installation Optimization

📈 Once Debian is installed, reboot into the system and log in as root or your user.

Optimize Swappiness

💡 Reduce the system’s dependency on swap to improve responsiveness:

echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

This setting ensures RAM is preferred over swap space. 🧠


Step 5: Secure the System

🔒 1. Update the System: Always ensure your system is up-to-date:

   sudo apt-get update && sudo apt-get upgrade

Keeping your system updated protects it from vulnerabilities. ⚡

🔐 2. Firewall Configuration: Install and configure a basic firewall with UFW:

   sudo apt-get install ufw
   sudo ufw allow ssh
   sudo ufw enable

A firewall ensures better security for your server. 🛡️


Conclusion

🌟 With these steps, you've installed Debian with a minimal footprint, optimized for performance. This setup is perfect for resource-constrained systems, ensuring every bit of CPU, RAM, and storage is used efficiently. If you need additional tools, consider only installing packages as needed to maintain a clean and fast system. 🎉