Welcome to the comprehensive guide on installing OpenLiteSpeed on Debian 12, the latest iteration of one of the most popular Linux distributions. OpenLiteSpeed, renowned for its performance, scalability, and lightweight resource usage, serves as an ideal web server for developers, system administrators, and hobbyists alike. This step-by-step tutorial aims to simplify the installation process, making it accessible to newcomers while providing valuable insights for seasoned professionals.
Prerequisites
Before proceeding, ensure that you have a Debian 12 system set up and have access to a user account with sudo privileges. A stable internet connection and some familiarity with Linux command line will also be beneficial.
Step 1: System Update
First, update your system to ensure all existing packages are up to date. This can prevent conflicts and compatibility issues. Open a terminal and execute:
sudo apt update && sudo apt upgrade -y
Step 2: Download and Install OpenLiteSpeed
OpenLiteSpeed provides an official package repository, making the installation process straightforward. Follow these steps to add the repository and install OpenLiteSpeed on Debian 12.
- Add the OpenLiteSpeed Repository Before adding the repository, you’ll need to import the GPG key:
sudo wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash
This command downloads and executes a script from OpenLiteSpeed that automatically adds the repository and imports the GPG key.
- Install OpenLiteSpeed With the repository added, you can now install OpenLiteSpeed:
sudo apt install openlitespeed -y
This command installs the latest version of OpenLiteSpeed along with any required dependencies.
Step 3: Start and Verify OpenLiteSpeed
After installation, it’s time to start the OpenLiteSpeed server and check its status.
- Start the server:
sudo /usr/local/lsws/bin/lswsctrl start
- Verify the server is running:
sudo /usr/local/lsws/bin/lswsctrl status
If the server is running correctly, you’ll see a message indicating that the LiteSpeed is running.
Step 4: Accessing the OpenLiteSpeed Web Admin Console
OpenLiteSpeed features a web admin console, allowing you to manage server configurations through a web interface.
- Set the Administrator Password Before you can access the admin console, you must set an administrator password:
sudo /usr/local/lsws/admin/misc/admpass.sh
Follow the prompts to specify a username and password for the administrator.
- Access the Admin Console Open your web browser and navigate to:
http://your_server_ip:7080
Replace your_server_ip with the IP address of your Debian server. Log in with the username and password you set in the previous step.
Step 5: Configure PHP with OpenLiteSpeed
OpenLiteSpeed comes with a built-in PHP processor. However, you might want to install a specific version of PHP (e.g., PHP 7.4) for your applications.
- Install PHP
sudo apt install lsphp74 lsphp74-common lsphp74-mysql lsphp74-imagick -y
- Configure OpenLiteSpeed to Use the Installed PHP Version This can be done through the OpenLiteSpeed web admin console under
Server Configuration>External App, where you define the path to the installed PHP version.
Integrating with Shape.host Services
After successfully installing OpenLiteSpeed on Debian 12, consider leveraging Shape.host Cloud VPS services for your hosting needs. Shape.host offers high-performance, scalable Cloud VPS solutions that perfectly complement the speed and efficiency of OpenLiteSpeed. Whether you’re hosting a small personal project or a large-scale enterprise application, Shape.host provides the reliability and performance your online presence demands. With Shape.host, you benefit from quick setup, robust security, and exceptional support, ensuring your OpenLiteSpeed web server operates smoothly 24/7.