Applies to: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS

Overview

The LAMP stack (Linux, Apache, MySQL, PHP) is the classic open-source web hosting environment. LifeinCloud provides a 1-click LAMP image, but here’s how to set it up yourself.

Requirements

  • LifeinCloud VPS running Ubuntu 22.04.
  • Root SSH access.

Step 1 — Update System

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y

Step 2 — Install Apache

apt install -y apache2
systemctl enable apache2
systemctl start apache2

Step 3 — Install MySQL

apt install -y mysql-server
mysql_secure_installation

Step 4 — Install PHP

apt install -y php libapache2-mod-php php-mysql

Step 5 — Test PHP Processing

echo "<?php phpinfo(); ?>" > /var/www/html/info.php

Open http://YOUR_SERVER_IP/info.php to confirm PHP is working.

Tip: You can skip all steps by deploying the 1-click LAMP Stack image from LifeinCloud.
Was this answer helpful? 1 Users Found This Useful (1 Votes)