How to Install LAMP or LEMP Stack on Your VPS Using One-Click Script Print

  • lemp, debian, ubuntu, lamp, mysql, vps, nginx, php, apache, mariadb, one click installer, server setup, vps tutorial, hosteons script, linux vps, auto install, bash script, web server setup
  • 0

We have released a free and open-source script that allows you to install a full LAMP (Apache + MariaDB + PHP) or LEMP (Nginx + MariaDB + PHP-FPM) stack on your VPS with just a few simple steps.

 

This script is designed for users who want to quickly deploy a web hosting environment without manually installing each component. It works perfectly with Ubuntu and Debian-based VPS servers, including those hosted with Hosteons.

 


 

 

Supported Operating Systems

 

 

  • Ubuntu 20.04 and 22.04

  • Debian 11 and above

 

 


 

 

What Does the Script Do?

 

 

This script performs the following tasks:

 

  • Prompts you to choose between LAMP and LEMP stack

  • Installs Apache or Nginx

  • Installs MariaDB (MySQL-compatible)

  • Installs PHP with essential extensions

  • Sets up UFW firewall rules (opens ports 22, 80, and 443)

  • Enables and starts all required services

  • Creates a test info.php file for verifying PHP

 

 


 

 

How to Use the Script

 

 

Step 1: Connect to your VPS using SSH.

 

Step 2: Run the following commands:

wget https://raw.githubusercontent.com/hosteons/lamp-lemp-oneclick-installer/main/lamp_lemp_installer.sh
chmod +x lamp_lemp_installer.sh
sudo ./lamp_lemp_installer.sh

Step 3: Follow the on-screen prompt to choose either LAMP or LEMP.

 

Step 4: After installation, visit the following URL in your browser to verify PHP installation:

http://your-server-ip/info.php

 


 

 

Where to Download

 

 

You can view the source code and download the script from our GitHub repository:

 

https://github.com/hosteons/lamp-lemp-oneclick-installer

 


 

 

License and Use

 

 

This script is released under the MIT License. You are free to use, modify, and share it. Attribution to Hosteons is appreciated but not required.

 


 

 

Need Help?

 

 

If you face any issues using this script or need help with your VPS, feel free to contact us:

 

  • Customer Portal: https://my.hosteons.com

  • Website: https://hosteons.com

  • Blog: https://blog.hosteons.com

 

 

 


Was this answer helpful?

« Back