advanced setup ubuntu server from zero with checking disks, etc

Pre-Installation Preparations

  • Check the official Ubuntu hardware certification webpage.
  • Ensure CPU architecture (x86_64 or ARM) is supported.
  • Verify network interface cards and other peripherals.
  • Consult manufacturer documentation for compatibility details.
  • Download the latest Ubuntu Server ISO from the official website.
  • Use a tool like Rufus or Balena Etcher to create bootable USB.
  • Verify the integrity of the downloaded ISO using checksums.
  • Prepare a DVD if using optical media, burning the ISO correctly.
  • Identify and locate important files and directories.
  • Use rsync or cp to copy data to an external drive.
  • Create a list of backed-up files for future reference.
  • Double-check the backup for completeness and accessibility.
  • Review official Ubuntu Server documentation for requirements.
  • Use commands like 'lscpu' and 'free -h' to check specs.
  • Ensure at least 1 GHz CPU, 512 MB RAM, and 2.5 GB disk space.
  • Consider additional resources for planned applications and services.

Disk Configuration

  • Insert the Ubuntu Server installation media (USB/DVD).
  • Power on the server and access the BIOS/UEFI settings.
  • Set the boot order to prioritize the installation media.
  • Save changes and exit BIOS/UEFI.
  • Begin the installation process.
  • Follow prompts to reach the disk configuration step.
  • Choose the partitioning tool option from the installation menu.
  • Select GParted or the built-in tool based on your preference.
  • Launch the tool to view disk layout and options.
  • Review the list of connected disks displayed.
  • Select the disk intended for Ubuntu installation.
  • Ensure the chosen disk has sufficient space.
  • Confirm the disk's identifier (e.g., /dev/sda).
  • View current partitions and their sizes in the tool.
  • Check for important data that may need backup.
  • Note any partitions that require deletion or modification.
  • Ensure no critical system partitions are on the target disk.
  • Choose unallocated space or delete existing partitions.
  • Create a partition for root (e.g., 20GB or more).
  • Create a swap partition (e.g., equal to RAM size).
  • Optionally, create a home partition for user data.
  • Select each partition and choose 'Format' option.
  • Choose ext4 for root and home partitions.
  • Select 'linux-swap' for the swap partition.
  • Apply changes to format the selected partitions.
  • Select the root partition and assign '/' as mount point.
  • Assign '/home' as the mount point for the home partition.
  • Leave the swap partition without a mount point.
  • Review and confirm the mount point settings.

Installation Process

  • Boot the server from the installation media.
  • Wait for the boot menu to appear.
  • Use arrow keys to highlight 'Install Ubuntu Server'.
  • Press Enter to start the installation process.
  • Select your preferred language from the list.
  • Press Enter to confirm your language choice.
  • Choose the keyboard layout that matches your hardware.
  • Test the keyboard to ensure it is correctly configured.
  • Choose to configure the network via DHCP or set a static IP.
  • If static, enter the IP address, subnet mask, and gateway.
  • Complete DNS settings if necessary.
  • Confirm network settings before proceeding.
  • Select 'Guided' for automatic partitioning or 'Manual' for custom setup.
  • If manual, create partitions as needed (root, swap, etc.).
  • Choose the disk to install Ubuntu on.
  • Confirm storage changes before proceeding.
  • Choose the software options you want to install.
  • Select OpenSSH server if remote access is required.
  • Optionally, select LAMP server for web hosting.
  • Review selections before installation.
  • Enter your full name for the user account.
  • Choose a username for the account.
  • Set a strong password that meets security requirements.
  • Confirm the password by re-entering it.
  • Select your region from the list presented.
  • Choose the specific time zone for your location.
  • Confirm the selected time zone.
  • Ensure system clock settings are correct.

Post-Installation Configuration

Disk and Performance Checks

  • Open terminal.
  • Run command: df -h.
  • Review disk usage for each mounted filesystem.
  • Note available space and usage percentage.
  • Open terminal.
  • Type df -h and press Enter.
  • Analyze human-readable output of disk usage.
  • Identify filesystems and their respective used and available space.
  • Install smartmontools if not installed.
  • Identify disk with lsblk or fdisk -l.
  • Run command: sudo smartctl -a /dev/sdX.
  • Review SMART data for disk health indicators.
  • Edit /etc/fstab for persistent mount options.
  • Consider options like noatime, nodiratime for performance.
  • Save changes and remount filesystems with sudo mount -o remount /mountpoint.
  • Reboot to apply persistent changes.
  • Install htop and iostat if not already installed.
  • Run htop for real-time resource monitoring.
  • Use iostat to check I/O statistics.
  • Analyze CPU, memory, and disk activity.

Final Checks and Backup

Security Hardening

Documentation and Monitoring