How VPS - How to use/setup VPS
  • 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
11
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
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

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

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

How to Setup OpenZFS on CentOS 7

How to Install Directus 6.4 CMS on a CentOS 7 LAMP VPS

How to Install Thelia 2.3 on CentOS 7

Leave a Reply Cancel reply

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

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

4 years ago

How to Upgrade to Ubuntu 11.04 (Natty)

4 years ago

How to Install Django on CentOS 7

3 years ago

How to Find Files With SUID and SGID Permissions in Linux

4 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • 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

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

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

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

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
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • 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”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • 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

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

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