Skip to content

Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

Introduction

LOMP is a variation of the LAMP stack, replacing Apache with OpenLiteSpeed. This tutorial will guide you through the process of installing LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12.

Prerequisites

Before you begin, ensure you have:

  1. A Debian 12 server or desktop system
  2. Root or sudo privileges

Step 1: Install OpenLiteSpeed

Add the OpenLiteSpeed repository:

sudo wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | sudo bash

Install OpenLiteSpeed:

sudo apt update
sudo apt install -y openlitespeed

Step 2: Install MySQL

Install the MySQL server:

sudo apt install -y mariadb-server

Step 3: Install PHP

Install PHP and required modules:

sudo apt install -y php php-mysql php-common php-curl php-gd php-json php-mbstring php-xml php-zip

Step 4: Configure MySQL

Run the MySQL secure installation script:

sudo mysql_secure_installation

Step 5: Configure OpenLiteSpeed

Open a web browser and navigate to your server’s IP address on port 7080 (e.g., http://your_server_ip:7080). Follow the on-screen instructions to complete the OpenLiteSpeed setup.

Step 6: Configure PHP

Configure PHP for OpenLiteSpeed:

Visual overview of Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
Visual overview: Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
sudo cp /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini.bak
sudo nano /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini

Modify the following settings in the php.ini file:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
date.timezone = "Your/Timezone"

Step 7: Restart Services

Restart OpenLiteSpeed and MySQL services:

sudo systemctl restart lsws
sudo systemctl restart mariadb

Step 8: Test LOMP Stack

Create a PHP info file to test the LOMP stack:

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

Open a web browser and navigate to http://your_server_ip/info.php to see the PHP information.

Conclusion

Congratulations! You have successfully installed LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12. You can now host your PHP applications with OpenLiteSpeed.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Key topics covered in Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
Key topics covered in this NetCloud24 guide.

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Practical checklist for Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
Practical checklist for applying the guidance in this article.

Windows RDS (Remote Desktop Services)

Windows VPS

Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
Linux VPS & VPS Windows Setup Guide | NetCloud24 LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Debian 12
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.