Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Installing and Configuring Ubuntu 20.04 Live Server

Tech 2

System Installation Process

Upon booting the installation media, a logo splash screen appears briefly. Pressing F5 allows language selection for accessibility, while ESC accesses the main boot menu for advanced options (F1-F6). Standard installations can proceed without intervention.

Language and keyboard layout screens default to English and standard layouts. Proceed by cofnirming the defaults.

Network configuration follows. Choosing DHCP automatically assigns an IP, simplifying initial setup. For static allocations, navigate using the Tab key to specify the IP address, subnet, gateway, and DNS servers (e.g., 8.8.8.8). Configuring network connectivity here might increase installation time due to metadata retrieval.

If a proxy is required for internet access, enter the URL; otherwise, leave it blank. For the Ubuntu archive mirror, replace the default with a regional mirror to accelerate downloads, such as https://mirrors.tuna.tsinghua.edu.cn/ubuntu.

Disk setup defaults to using an entire disk with LVM. Review the resulting filesystem layout. Confirm the partitioning action, acknowledging that existing data on the disk will be destroyed.

Create the primary user profile by setting the hostname, full name, username, and password. On the software selection screen, ensure the OpenSSH server option is checked to enable remote administration.

Wait for the installation to finalize. If a virtual machine fails to unmount the installation ISO, ignore the error and press Enter to reboot.

Post-Installation Configuration

Network interfaces are managed via Netplan. The configuration resides in YAML files under /etc/netplan/. Modify the appropriate file, for instance:

sudo nano /etc/netplan/01-network-manager-all.yaml

Define the static interface configuration:

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 10.0.2.15/24
      routes:
        - to: default
          via: 10.0.2.2
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]
        search: [8.8.8.8]

Apply the changes immediately without rebooting:

sudo netplan apply

By default, SSH blocks root login. To permit it, edit the SSH daemon configuration:

sudo nano /etc/ssh/sshd_config

Locate and modify the PermitRootLogin directive:

PermitRootLogin yes

Restart the SSH service to apply the changes:

sudo systemctl restart sshd

Set the root password and switch to the root account:

sudo passwd root
su - root

Update the package repository sources by editing /etc/apt/sources.list to include desired mirrors:

sudo nano /etc/apt/sources.list

Insert the repository definitions:

deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse

Refresh the local package index:

sudo apt update

Package Management Overview

Ubuntu utilizes apt and apt-get for package management, analogous to yum on CentOS. While apt-get is the legacy utility, apt is the modern, recommended interface.

Key differences between CentOS (RPM) and Ubuntu (Debian) package managers:

  • Package Format: CentOS uses .rpm; Ubuntu uses .deb.
  • Repository Config: CentOS relies on /etc/yum.conf; Ubuntu uses /etc/apt/sources.list.
  • Update Metadata: yum makecache fast vs apt update.
  • Install Package: yum install <pkg> vs apt install <pkg>.
  • Install Local Package: rpm -i <pkg.rpm> vs dpkg -i <pkg.deb>.
  • Remove Package: yum remove <pkg> vs apt remove <pkg>.
  • Search Package: yum search <pkg> vs apt search <pkg>.

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.