Quick Navigation
Ubuntu 24.04 with LAMP Stack
This comprehensive guide covers all steps to launch and verify your LAMP Stack (Linux, Apache, MySQL, PHP) instance on Ubuntu Server 24.04.
Overview: This AMI provides a pre-configured Ubuntu 24.04 LTS environment with a complete LAMP Stack, ready for immediate web application development and deployment. The stack includes Linux (Ubuntu 24.04), Apache web server, MySQL database, and PHP, offering a powerful, flexible platform for developing and deploying dynamic web applications.
Step 1: Launch EC2 Instance
- Navigate to the LAMP 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 LAMP Stack Installation
Once connected to your Ubuntu Server, verify all LAMP stack components are installed and operational using these methods:
Method 1: Verify Apache Web Server
A. Check that Apache is installed and running.
- Run the following command in your SSH terminal:
systemctl status apache2- Verification: The output should show the service status as active (running)
Expected output:
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since...
- active (running) = Apache HTTP Server is operational and serving requests.
B. Check the Apache version to confirm the installation.
- Run the following command in your SSH terminal:
apache2 -v- Verification: The output should return the Apache version information.
Expected output:
Server version: Apache/2.4.x (Ubuntu) Server built: 2024-xx-xx
- Successful version output = Apache HTTP 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
B. Check PHP Apache Module:
- Run the following command in your SSH terminal:
apache2ctl -M | grep php- Verification: The output should return the Mysql version information.
Expected output:
php_module (shared)
Step 4: Test LAMP 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 apache info.
Related SQL Server AMIs
LEMP on Ubuntu 24.04 Standard Guide
Explore our high-speed LEMP Stack AMIs, featuring optimized configurations for Ubuntu 24.04 and other releases.
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.
