How to Install LAMP Stack with PHP 8.3 and MariaDB 11 on Ubuntu 24.04

sudo a2enmod ssl
sudo a2ensite default-ssl.conf
sudo systemctl restart apache2
sudo ss -tlpn | grep apache2

Enable HTTPS in Apache
Enable HTTPS in Apache

sudo ufw allow ‘Apache Full’
sudo ufw status

sudo phpenmod mbstring
sudo systemctl restart apache2

sudo apt install php8.3[TAB]

List and Install PHP 8.3 Modules
List and Install PHP 8.3 Modules

sudo apt install mariadb-server mariadb-client php8.3-mysql

Installing the Latest MariaDB Database
Installing the Latest MariaDB Database

sudo mysql_secure_installation

Then, restart the MariaDB service and try to log in to the database with root as shown.
http://your_server_IP_address/phpmyadmin/

Access phpMyAdmin Online
Access phpMyAdmin Online

As you may already know, the LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack is an assortment of leading open source web development software packages.
php -v

Check Your PHP Version
Check Your PHP Version

http://your_server_IP_address

Verify Apache Web Server via Browser
Verify Apache Web Server via Browser

This web platform is made up of a web server, a database management system, and a server-side scripting language, and is acceptable for building dynamic websites and a wide range of web applications.

Bypassing Self-Signed Certificate Warnings in Apache
Bypassing Self-Signed Certificate Warnings in Apache

https://your_server_IP_address

sudo apt install php8.3 libapache2-mod-php8.3 php8.3-mysql php8.3-xml php8.3-gd php8.3-curl php8.3-mbstring php8.3-zip

Installing PHP 8.3 Modules for Apache
Installing PHP 8.3 Modules for Apache

<?php
phpinfo();
?>

sudo systemctl restart mariadb
mysql -u root -p

Restart MariaDB and Access the Database
Restart MariaDB and Access the Database

Step 4: Install phpMyAdmin in Ubuntu 24.04

sudo mysql
use mysql;
ALTER USER ‘root’@’localhost’ IDENTIFIED VIA mysql_native_password USING PASSWORD(‘your_strong_password’);
FLUSH PRIVILEGES;
EXIT;

After phpMyAdmin has been installed, you need to enable the necessary PHP extensions and restart Apache:
sudo systemctl restart apache2

In order to give MariaDB database access to system normal users without using sudo privileges, log in to the MySQL prompt using root, and run the below commands:
One of the common uses of the LAMP stack is for running content management systems (CMSs) such as WordPress, Joomla, or Drupal, and many others.
http://your_server_IP_address/info.php

Check Your PHP Configuration via Browser
Check Your PHP Configuration via Browser

sudo nano /var/www/html/info.php

That’s all! Now you have a complete LAMP stack setup installed and running on Ubuntu 24.04, which enables you to deploy dynamic websites or applications on your Ubuntu server.
sudo systemctl status apache2
sudo ss -tlpn | grep apache2

Check If Apache Is Active and Listening on Ports
Check If Apache Is Active and Listening on Ports

apt search php8.3

Searching for PHP Packages
Searching for PHP Packages

sudo apt install php8.3-imagick php8.3-intl php8.3-bcmath

In this article, we will go through the various steps to install the constituent packages in the LAMP stack with PHP 8.3 and MariaDB 11 on Ubuntu 24.04 Server and Desktop editions.
sudo systemctl restart apache2

Step 3: Install MariaDB 11 in Ubuntu 24.04

Next, enable apache web server to start the service at boot time using the following command.
sudo systemctl enable apache2

Step 2: Install PHP 8.3 on Ubuntu 24.04

sudo apt update
sudo apt install apache2

Install Apache on Ubuntu
Install Apache on Ubuntu

The first step is to start by installing the Apache web server from the default Ubuntu official repositories by typing the following commands on the terminal:
To follow this LAMP stack tutorial, you’ll need an Ubuntu 24.04 server. If you don’t have one, we recommend getting a VPS (Virtual Private Server) from a reliable cloud provider:
sudo apt install phpmyadmin

During the phpMyAdmin installation:

Similar Posts