• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install OpenLiteSpeed and PHP 7 on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
18
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Update the system
  3. Step 2: Install OpenLiteSpeed
  4. Step 3: Install PHP 7
  5. Step 4: Setup admin credentials for OpenLiteSpeed WebAdmin GUI
  6. Step 5: Configure OpenLiteSpeed in the WebAdmin GUI
  7. Step 6: Confirm your settings
  8. Want to contribute?


OpenLiteSpeed, the open source edition of LiteSpeed, is a high performance yet light-weight web server application.

In this article, I will introduce to you how to install OpenLiteSpeed along with PHP 7 on a CentOS 7 server.

Prerequisites

  • A CentOS 7 x64 server instance.
  • A sudo user.

Step 1: Update the system

Log in as a sudo user, and then update the system as follows:

sudo yum install epel-release -y
sudo yum clean all && sudo yum update -y && sudo shutdown -r now

After the reboot, log back in using the same sudo user.

Step 2: Install OpenLiteSpeed

On CentOS 7, you can install OpenLiteSpeed 1.4.24, the latest release of OpenLiteSpeed, using YUM:

sudo rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
sudo yum install openlitespeed -y

Step 3: Install PHP 7

When installing pre-compiled PHP packages for OpenLiteSpeed using YUM, you should choose PHP packages whose names start with lsphp.

For example, you can list all packages starting with lsphp using the below command:

yum list lsphp*

Then you can install some of the most commonly used PHP 7.1 packages and modules for OpenLiteSpeed as follows:

sudo yum install lsphp71 lsphp71-mysqlnd lsphp71-common lsphp71-gd lsphp71-pdo lsphp71-process lsphp71-mbstring lsphp71-mcrypt lsphp71-opcache lsphp71-bcmath lsphp71-xml -y

Step 4: Setup admin credentials for OpenLiteSpeed WebAdmin GUI

OpenLiteSpeed comes with a user-friendly WebAdmin UI. Before you can use the UI, you need to setup the admin user credentials as follows:

sudo /usr/local/lsws/admin/misc/admpass.sh

Provide info as below:

  • User name [admin]: <your-admin-username>
  • Password: <your-admin-password>
  • Retype password: <your-admin-password>

Allow port 7080 in order to allow web access to the WebAdmin GUI:

sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp
sudo firewall-cmd --reload

Now, point your web browser to http://203.0.113.1:7080, ignore the SSL security warning, and then use the admin credentials you set earlier to sign in.

Step 5: Configure OpenLiteSpeed in the WebAdmin GUI

By default, OpenLiteSpeed 1.4.24 expects that you are running PHP 5.x. Since we choose to use PHP 7.1, we need to modify OpenLiteSpeed’s configurations to support PHP 7.1 as follows:

1) Click the Server Configuration category and then the External app tab, you will find an external application named lsphp5. Click the second icon Edit on the right hand side in order to edit this application as follows:

  • Name: lsphp71
  • Address: uds://tmp/lshttpd/lsphp.sock
  • Max Connections: 35
  • Environment:
    • PHP_LSAPI_MAX_REQUESTS=500
    • PHP_LSAPI_CHILDREN=35
  • Initial Request Timeout (secs): 60
  • Retry Timeout : 0
  • Response Buffering: no
  • Auto Start: yes
  • Command: $SERVER_ROOT/lsphp71/bin/lsphp
  • Back Log: 100
  • Instances: 1
  • Memory Soft Limit (bytes): 2047M
  • Memory Hard Limit (bytes): 2047M
  • Process Soft Limit: 400
  • Process Hard Limit: 500

Click the Save icon in the top right corner to save your modifications.

2) Click the Script handler tab, and then use the Edit icon to update the script handler as follows:

  • Suffixes: php
  • Handler Type: LiteSpeed SAPI
  • Handler Name: lsphp71

After the modification, click the Save icon to save your changes.

3) Click the Listeners category, and then use the View icon to see the details of the Default listener.

In the Listener Default > General page, click the Edit icon on the right hand side, and then modify the settings as below:

  • Listener Name: Default
  • IP Address: ANY
  • Port: 80

After the modification, click the Save icon to save your changes.

4) Click the Graceful Restart icon in the top right corner to apply your changes.

Step 6: Confirm your settings

First, modify firewall rules in order to allow access on port 80:

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Next, visit http://203.0.113.1 in a new web browser window. If everything goes well, you will see the Congratulations page which announces that:

You have successfully installed the OpenLiteSpeed Web Server!

Finally, visit http://203.0.113.1/phpinfo.php to learn more details about your OpenLiteSpeed setup.

That concludes our tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Setup Timezone and NTP on CentOS 6

Next Post

How to Setup OpenZFS on CentOS 7

Next Post

How to Setup OpenZFS on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet