A fresh Ubuntu virtual machine needs software before it can serve a website. APT is the system package manager used to install that software. After connecting by SSH, run sudo apt update to refresh the list of available packages before installing anything. section 3.1.2 section 3.2
Install a web server
Run sudo apt update, then sudo apt install nginx. Confirm the installation prompt with y; APT installs NGINX and its dependencies. Open the server’s public IP address in a browser to check for the default NGINX page. Adding -y to the install command accepts prompts automatically. section 3.2
The same workflow prepares a Python application: sudo apt install python3 python3-pip python3-venv build-essential -y installs the Python command, pip, virtual-environment support, and compilation tools. APT supplies these system packages; pip then installs the application’s Python requirements into its virtual environment. section 3.4.1
Listing 7.2 Installing Docker Compose on Ubuntu
sudo apt-get update sudo apt-get install docker-compose-plugin docker compose --version
The Docker Compose installation uses apt-get update and apt-get install docker-compose-plugin, then checks the result with docker compose --version. section 7.1.3
