ManagedCloud Servers

High performance handled and monitored by us 24/7/365. A complete solution to provide you with our in house expertise 24/7 tailored to your specific needs. We'll setup a bespoke server for your site using the latest tehnologies so you can get the most out of your hardware and get your website loading quickly and reliably. Find out more..

cPanelCloud Servers

Recommended - High performance cloud servers with no technical knowledge required. If you're hosting multiple websites already and you're looking to consolidate, or if you're looking to isolate yourself from the shared hosting environment but you don't have the time or knoweldge to manage a server, then the Managed cPanel Servers are for you. Find out more..

UnmanagedCloud Servers

Our unmanaged range gives you complete control at rock bottom prices and our cloud platform boasts super fast multipath 40Gb/s network, the latest Intel Xeon V3 CPUs and enterprise grade redundant SSDs. If you're a sysadmin look no further, we offer some of the best specification to price ratio servers available. Find out more..

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans

How to Install OpenLiteSpeed on CentOS 7

OpenLiteSpeed is an open source HTTP web server developed by LiteSpeed Technologies. OpenLiteSpeed is a high performance and lightweight web server. Some of its features are listed below.

  1. Event-driven architecture with extremely low resource (CPU and RAM) overhead.
  2. Handles hundreds of thousands of concurrent connections without load spikes.
  3. WebAdmin GUI with real-time statistics.
  4. Rewrite engine uses Apache mod_rewrite syntax.
  5. Worker processes for scalability. Ability to bind certain processes to particular workers.
  6. High-performance coding using kqueue (FreeBSD and OS X), epoll (Linux), /dev/poll (Solaris), and poll.
  7. High-performance page caching.

Requirements

OpenLiteSpeed does not require any special kind of hardware for installation you'll only need a CentOS server and user with root privileges on it.

Updating the System

Before going through the installation process it is recommended to update the system to upgrade the available packages and to do so run following command.

yum -y update

Install OpenLiteSpeed

First of all we have to add litespeed repository to continue further installation process so please add litespeed repository using this rpm command as shown below.

rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm

We have added the litespeed repository so now we will install openlitespeed 1.4. This is the latest stable release including features like Pagespeed, file upload, PHP 7 support, RCS integration and HTTP/2 support.

Now let's install openLiteSpeed 1.4 using following yum command as shown below:

yum -y install openlitespeed14.x86_64

It may take some time so we recommend you to wait untill the installation is finished.

Installing PHP 7

We will have to install Epel repository for PHP 7 so please install epel repository using this yum command.

yum -y install epel-release

We can download and install PHP 7 now for openlitespeed. Openlitespeed uses a different version of PHP so run below given command to install PHP 7 and required dependencies.

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

You can always check list of all PHP extensions using this command.

yum search lsphp70

Configuration of OLSWS & PHP

We will configure OpenLiteSpeed web server(OLSWS) and PHP. Let's configure admin username and password for the management GUI, to do so run this command.

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

Please enter an admin username and password for your GUI management you should see like this on your screen.

[root@ip-172-31-10-82 ~]# /usr/local/lsws/admin/misc/admpass.sh

Please specify the user name of administrator. This is the user name required to login the administration Web interface.

User name [admin]: sajid

Please specify the administrator's password. This is the password required to login the administration Web interface.

Password: Retype password: Administrator's username/password is updated successfully! [root@ip-172-31-10-82 ~]#

Next open your favorite web browser and visit your server IP with port 7080 (http://yourserverIP:7080)

You'll see a web page like this now please enter admin username and password and finally click on Sign in button and then you'll see dashboard of OpenLiteSpeed as shown below.

Configure PHP 7

By default OpenLiteSpeed 1.4 uses PHP 5 version so we will have to change it to PHP 7 and as we know that we have already installed PHP 7 on our server so now we just need to add a new configuration.

Click on Server Configuration and then click on External App which is shown at the center of web page. You'll see lsphp5 with a socket address so we will have to add new version of PHP and to do so please click on Add button on the right side.

For the type use LiteSpeed SAPI App and then click on next on the right side.

Now add the configuration below.

Name: lsphp70
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/lsphp70/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 on save icon to save the configuration.

Now click on the tab Script Handler and edit the lsphp5. Change below given configuration as shown.

Suffixes: php
Handler Type: LiteSpeed SAPI
Handler Name: lsphp70

Click on the save icon to save the configuration.

Configure Port 80

The default http port for OpenLiteSpeed is 8080 we will change it port 80.

On the left side of the web page click on Listeners then you'll see default port 8080 so click on view icon and then click on edit icon change the port 80 and save the configuration.

Now restart OpenLiteSpeed server by clicking on Graceful Restart button and click yes to confirm.

Control Commands

To start OpenLiteSpeed using command line terminal you can use this command. /usr/local/lsws/bin/lswsctrl start

In order to stop OpenLiteSpeed you can run this command as shown below. /usr/local/lsws/bin/lswsctrl stop

You can even restart your OpenLiteSpeed web server from command line terminal by using this command as shown below.

/usr/local/lsws/bin/lswsctrl restart

You can find more information about OpenLiteSpeed web server on this OpenLiteSpeed Website.

Conclusion

In this tutorial we learned how to install OpenLiteSpeed web server on centos 7. OpenLiteSpeed is easy to configure trough its admin GUI so we can configure it from a browser. We hope now you have enough knowledge to work with OpenLiteSpeed.

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans