How to Install LiteSpeed Enterprise Edition on cPanel

How to Install LiteSpeed Enterprise Edition on cPanel

By default, cPanel/WHM installations use Apache as a Web server. Most of the time, you’re not going to think of changing it to something else. However, you might have heard of LiteSpeed which is which has a reputation for being extremely fast and efficient. There are many interesting articles listing out the differences between these two Web server technologies. In this one however, I will explain how to install the enterprise version of LiteSpeed Web Server. You can get started with a 15 day trial before making the purchase. There is also a standard Web edition that supports up to 150 concurrent connections. It’s ideal for a small business, but you can upgrade to the enterprise version if you’re ready.

So let’s get started.

Downloading the WHM/cPanel LiteSpeed Plugin

By far, the easiest way to install the LiteSpeed Web Server on WHM is to make use of the plug-in provided for this purpose. This provides an easy GUI interface once the installation is complete and you can perform all of the basic LiteSpeed configurations from within the WHM interface. You can switch between Web servers, build PHP, and even perform the entire set up including creating a username/password for LiteSpeed.

The catch is that this convenient installation is not available for the free standard version which needs to be performed entirely over the command line. The tutorial for installing the standard version will be in another article – for now, keep in mind that the following instructions are for the enterprise license only, or if you want to get started with a trial.

The first step is to locate the WHM/cPanel plug-in and get it onto your Web server. For this, visit the following URL:

https://www.litespeedtech.com/products/control-panel-plugins/download

We’re going to download the very first link as shown in the screenshot below:

litepseed plugin location

If you right-click it, you will find the following install.sh file:

https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh

What we want to do is get this onto our Web server and then execute the script from there. But instead of downloading and uploading, we can simply perform a wget command straight from our SSH installation like this:

wget https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh

Once you have the “.sh” file, you can simply execute it with the “sh” command:

sh lsws_whm_plugin_install.sh

This will install the LiteSpeed Web Server plug-in onto your WHM installation.

litespeed plugin install complete

Since this is the enterprise version, our command line work is done and we can move on to the GUI configuration from here.

Installing LiteSpeed Web Server on WHM

If the previous commands executed smoothly, you should now be able to log into your WHM installation and find the LiteSpeed Web Server plug-in in the appropriate section on your dashboard as shown here:

install litespeed web server

Clicking the option will bring up a screen on the right-hand side with two choices – to install the LiteSpeed Web Server, or to define a parameter called “LSWS_HOME” which allows you to specify the home location of the installation. Let’s leave that alone for the moment and let it take its default value. To begin the installation of LiteSpeed, click the option on the left.

This will initiate the installation by showing you the license agreement. After scrolling down and accepting it, you will be asked to specify the type of license you want to use. If you’ve already purchased the enterprise version of LiteSpeed, this is where you select the appropriate option and enter your serial number.

license and trial

If however you want to make use of the trial version for 15 days instead, simply select “Request a trial license”. This will automatically create a trial license for you linked to your IP address. Further down, you can tweak the installation directory by modifying the parameters specified above. In this scenario, I don’t want to change anything, so I move to the next section.

user name and password

In the screenshot above, I create my LiteSpeed Web Server username and password. Using this, you can access one of the most convenient ways of managing your LiteSpeed Web Server in detail. Simply append the port number “7080” to the server name or hostname and it will open up a WebAdmin console for LiteSpeed as shown below:

console login

So for example, if your server IP address is x.x.x.x, it can be accessed by typing in the following:

x.x.x.x:7080

This console gives you access to everything from error messages, to detailed configuration options, as well as general functions like restarting the Web server, viewing server logs, debugging etc. It’s really an extremely comprehensive management tool that every LiteSpeed user should have access to.

Specifying the username and password is the last step of the LiteSpeed Web Server set up. Scroll all the way down and initiate the install with the selected options, and in a few minutes you should have LiteSpeed accessible on your server:

litespeed installed

Initiating LiteSpeed and Building PHP

Even after this final step when LiteSpeed is present, the default Web server currently running on WHM will still be Apache. As of now, you haven’t yet made the switch. That is something we will do next. In addition, PHP needs to be compiled to match LiteSpeed. Fortunately for us if you have EasyApache installed and have built your current PHP environment using it, you won’t face any problems.

The next time you access the LiteSpeed Web Server plug-in on WHM, you will see the complete range of options available to you. Scroll all the way down to the section labeled “Switch between Apache and LiteSpeed”.

switch to litespeed

As you can see above, the middle option allows you to stop Apache and fire up LiteSpeed. Once you click it, a confirmation dialog will appear asking you whether or not you’re sure:

confirm switch

Click “Switch to LiteSpeed”, and after a few minutes you should receive a notification that the change has occurred. Congratulations! You are now running the LiteSpeed Web Server on your WHM installation instead of Apache.

But we’re not out of the woods quite yet. Before LiteSpeed can intercept PHP requests and process them, we need to build our existing PHP configuration to be compatible with the new Web server. Fortunately for us, we don’t need to remember all of the options with which we compiled PHP the last time. They already exist in the EasyApache module that is installed by default with WHM. If like most people, this is how you you manage your PHP compilation, LiteSpeed can simply tap into that information and build PHP for you without any further intervention on your part.

After LiteSpeed is up and running, visit the plug-in once again and locate the option called “Build Matching LSPHP”.

build PHP

This will initiate the PHP compilation matching LiteSpeed. The whole process can take quite a while to complete so make sure that you don’t press the back button on your browser. After it’s done, you can try loading a PHP page to see if it works – it certainly does for me:

php is working fine

And that’s it! The enterprise version of LiteSpeed is extremely easy to install due to the GUI tools available. The standard version requires all of this to be carried out via SSH, and we look at how to do that in a later article.

Leave a Reply

This Website is Hosted by

Powered by RamNode

Disclosure: We receive a compensation from some of the companies whose products or services are presented on our website.