Linux Server Installation
By Pooja | 21st July 2025

Introduction
In the rapidly evolving DevOps landscape, Linux servers form the backbone of automation, CI/CD pipelines, container orchestration, cloud platforms, and infrastructure as code. From provisioning and configuring environments to hosting microservices and running monitoring tools, Linux is central to DevOps operations.
Before setting up tools like Docker, Kubernetes, Jenkins, or Ansible, DevOps engineers must understand how to install and configure Linux servers efficiently. This article walks through the step-by-step installation process, including planning, execution, post-install setup, and automation.
Why Linux in DevOps
Linux is the default platform for DevOps because:
- Open-source and free
- Lightweight and customizable
- Rich CLI and scripting capabilities
- Compatibility with cloud platforms (AWS, Azure, GCP)
- Supports container tools like Docker and Kubernetes
- Community and enterprise support (e.g., RHEL, Ubuntu, CentOS, Debian)
DevOps tools are built on or optimized for Linux, making it the go-to operating system for infrastructure provisioning and automation.
Planning a Linux Server Installation
Before beginning installation, define:
- Use case: Web server, build server, database, CI/CD, etc.
- Resources required: CPU, RAM, disk size
- Environment type: Development, staging, production
- Virtual or bare-metal: On-premises vs. cloud
- Network requirements: Static/DHCP IP, firewall, DNS
- Security compliance: SSH access, user roles, packages
Planning ahead helps avoid post-installation errors and reduces downtime.
Choosing the Right Linux Distribution
Select a distribution that matches your DevOps goals:
Distribution | Use Case | Notes |
Ubuntu Server | CI/CD, Web Servers | Easy to use, popular in cloud |
CentOS / Rocky Linux / AlmaLinux | RHEL-compatible setups | Used in enterprise systems |
Debian | Stable environments | Excellent package management |
Red Hat Enterprise Linux (RHEL) | Production/Enterprise | Support and security updates |
Amazon Linux | AWS optimized | Fast boot, tuned for EC2 |
SUSE Linux Enterprise Server | SAP, database servers | Enterprise-grade, YaST tools |
For DevOps labs or Docker hosts, Ubuntu Server is often preferred for its simplicity and compatibility.
Installation Methods
Manual Installation
- Used for small setups or local testing
- Boot from ISO or USB and install via GUI or CLI
Automated Installation
- For large-scale or repeatable deployments
- Uses kickstart (RHEL), preseed (Debian/Ubuntu), PXE boot, or cloud-init
Cloud Provisioning
- Use pre-configured images via AWS EC2, Azure VM, or GCP Compute Engine
- Automate with Terraform or Ansible
Cloud Provisioning
Step 1: Prepare the Installation Medium
Download the desired ISO from the official site:
- Ubuntu: https://ubuntu.com/download/server
- CentOS/RHEL: https://www.centos.org/download/ or via Red Hat portal
Create a bootable USB:
bash
CopyEdit
sudo dd if=ubuntu-20.04.iso of=/dev/sdX bs=4M status=progress
For virtual machines, mount ISO in virtualization tools like VirtualBox, VMware, or Proxmox.
Step 2: Configure BIOS/UEFI
- Boot into BIOS (usually with F2, Del, or Esc)
- Enable virtualization support (if needed)
- Set boot order to prioritize USB or ISO
- Optionally disable secure boot for Linux compatibility
Step 3: Boot into Installer
After booting:
- Select language and keyboard layout
- Choose “Install Ubuntu Server” or similar option
- Begin guided or manual setup
Step 4: Partitioning the Disk
You can use:
- Automatic partitioning (safe for new disks)
- Manual partitioning for custom layouts
Typical partitions:
- /boot: 1 GB
- /: root partition (20–100 GB or more)
- swap: 1–2x RAM (optional)
- /home: optional (for separating user data)
- /var: separate for logs and Docker
Use LVM or ZFS for snapshotting and flexibility.
Step 5: Set Hostname and Users
- Define hostname (e.g., ci-server, web-node-1)
- Create a non-root user with sudo privileges
- Optionally enable SSH during installation
- Import SSH keys for secure access
Step 6: Install Software and Services
Most distributions allow you to select:
- OpenSSH server
- Docker, LAMP stack, PostgreSQL, etc.
- Automatic updates or unattended upgrades
You can also delay software installation and use a tool like Ansible later.
Step 7: Finalize Installation
- Review configuration
- Begin installation
- Reboot after install completes
- Login using the created user account
Congratulations! Your Linux server is ready.
Post-Installation Setup
After first login, configure:
Update the system
bash
CopyEdit
sudo apt update && sudo apt upgrade -y # Ubuntu
sudo dnf update -y                    # RHEL/CentOS
Configure firewall
bash
CopyEdit
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 80/tcp
Add essential packages
bash
CopyEdit
sudo apt install git curl vim net-tools htop unzip
Configure time zone
bash
CopyEdit
sudo timedatectl set-timezone Asia/Kolkata
Enable SSH key login
Upload public key to ~/.ssh/authorized_keys
Enable SSH key login
Automation is a key DevOps principle. Linux servers can be provisioned using:
- Cloud-init: Automatically run scripts on first boot in cloud
- Kickstart/Preseed: Automate full OS installations
- Ansible: Automate configuration after OS setup
- Terraform: Provision VMs with predefined images
- Packer: Build golden OS images with tools preinstalled
Example (cloud-init user-data):
yaml
CopyEdit
#cloud-config
packages:
 – docker.io
users:
 – name: devops
   groups: sudo
   shell: /bin/bash
   ssh-authorized-keys:
     – ssh-rsa AAAA…
Server Hardening and Security
Securing the Linux server is critical in production:
- Disable root login via SSH
- Use SSH key authentication
- Install and configure fail2ban
- Set up regular updates and alerts
- Limit open ports and services
- Monitor with tools like Prometheus, Grafana, or ELK
Integration with DevOps Tools
Once installed, Linux servers can host:
Tool | Purpose |
Jenkins | CI/CD pipelines |
Docker | Container runtime |
Kubernetes | Container orchestration |
GitLab | Source control + CI/CD |
Prometheus | Monitoring |
Nginx/Apache | Web services |
You can also configure systemd services, cron jobs, or use GitOps practices with tools like ArgoCD.
Real-World Scenarios
- CI Server Setup: Install Jenkins on Ubuntu, open ports 8080/22, install Java.
- Docker Host: Provision CentOS server with Docker, expose port 2375 (with care).
- Monitoring Node: Install node exporter, configure Prometheus target.
These servers can be cloned or imaged for scaling up infrastructure.
Best Practices
- Always update packages post-install.
- Disable unused services.
- Use SSH keys, not passwords.
- Automate everything (scripts, tools, infrastructure).
- Use LTS (Long-Term Support) versions of OS.
- Test in virtual machines before production deployment.
- Backup configuration and system images.
Conclusion
Installing and configuring Linux servers is a foundational skill for DevOps engineers. Whether you’re spinning up a CI runner, building a Docker host, or deploying infrastructure in the cloud, understanding the installation process, automation techniques, and post-install configuration is essential.
With Linux at the core of most DevOps pipelines and tools, mastery over server installation helps you build reliable, secure, and reproducible systems, aligned with DevOps principles of automation, scalability, and continuous improvement.