Quick Navigation
Ubuntu 24.04 with LEMP Stack
This comprehensive guide covers all steps to launch and verify your LEMP Stack (Linux, Nginx, MySQL, PHP) instance on Ubuntu Server 24.04.
Overview: This AMI provides a pre-configured Ubuntu 24.04 LTS environment with a complete LEMP Stack, ready for immediate web application development and deployment. The stack includes Linux (Ubuntu 24.04), Nginx web server, MySQL database, and PHP, offering a powerful, lightweight, and efficient platform for developing and deploying high-performance web applications.
Step 1: Launch EC2 Instance
- Navigate to the LEMP Stack on Ubuntu 24.04 AMI
- Click “Continue to Subscribe”
- Accept the terms and click “Continue to Configuration”
- Select your preferred AWS region
- Click “Continue to Launch”
Recommended Configuration
- Instance Type: t3.medium or higher
- Storage: Minimum 20 GiB (50 GiB recommended for production)
- Security Group:
- Port 22 (SSH)
- Port 80 (HTTP)
- Port 443 (HTTPS)
- Port 3306 (MySQL) – Only if remote database access is needed
Step 2: Connect to Your Instance
Secure Shell (SSH)
- Wait for the instance to reach the running state in your cloud console
- Locate the instance’s Public IP address
- Use an SSH client (like Terminal on macOS/Linux, or PuTTY/Windows Terminal on Windows) and your private key file
- The default username for Ubuntu AMIs is typically ubuntu
ssh -i /path/to/your-key-pair.pem ubuntu@<Instance-Public-IP>
Username: ubuntu
Key File: /path/to/your-key-pair.pem
Instance IP: Your instance public IP
Step 3: Verify LEMP Stack Installation
Once connected to your Ubuntu Server, verify all LEMP stack components are installed and operational using these methods:
Method 1: Verify Nginx Web Server
A. Check that Nginx is installed and running.
- Run the following command in your SSH terminal:
systemctl status nginx- Verification: The output should show the service status as active (running)
Expected output:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since...- active (running) = Nginx Server is operational and serving requests.
B. Check the Nginx version to confirm the installation.
- Run the following command in your SSH terminal:
nginx -v- Verification: The output should return the Apache version information.
Expected output:
nginx version: nginx/1.24.x (Ubuntu)
- Successful version output = Nginx Server is properly installed and configured.
Method 2: Verify MySQL Database
A. Check that MySQL is installed and running.
- Run the following command in your SSH terminal:
systemctl status mysql- Verification: The output should show the service status as active (running)
Expected output:
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since...
B. Check the MySQL version to confirm the installation.
- Run the following command in your SSH terminal:
sudo mysql --version- Verification: The output should return the Mysql version information.
Expected output:
mysql Ver 8.0.x-0ubuntu0.24.04.x for Linux on x86_64 ((Ubuntu))
Method 3: Verify PHP Installation
A. Check that PHP is installed and properly configured.
- Check PHP Version:
php -v- Verification: The output should return the PHP version information.
Expected output:
PHP 8.x.x (cli) (built: ...) Copyright (c) The PHP Group Zend Engine v4.x.x
Step 4: Test LEMP Stack Integration
Verify that all components work together by accessing the web server.
Test Web Server Access:
- Open a web browser
- Navigate to:
http://<Your-Instance-Public-IP> - You should see the default page with php and nginx info.
Related SQL Server AMIs
LAMP on Ubuntu Standard Guide
Explore our high-performance LAMP Stack AMIs, available for Ubuntu 20.04, 22.04, and 24.04.
SQL Server 2019 Standard on Windows 2019
Standard edition with essential database features for mid-sized workloads, reliable performance, and basic high-availability support.
SQL Server 2019 Enterprise on Windows 2019
Enterprise edition with advanced features for mission-critical workloads and large-scale deployments.
Browse All AMIs
Browse our entire AMI catalog, offering a full spectrum of OS, application, and infrastructure solutions.
