In this tutorial we’ll learn how to install OpenLiteSpeed on Ubuntu 16.04. We will also install and configure its prerequisites. OpenLiteSpeed is a high-performance, resource-conserving open-source alternative to Apache2 and Nginx. The HTTP server has already shown in many independent tests that it can be quite faster than Apache and Nginx. In addition, it is very easy to use, so the configuration of the vHosts and the port assignments take place via a dedicated web interface.
I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install OpenLiteSpeed on Ubuntu 16.04
Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:
apt-get update -y apt-get upgrade -y
Step 2. Installing required dependencies.
Install some required dependencies in order to install OpenLiteSpeed:
sudo apt-get install build-essential libexpat1-dev libgeoip-dev libpcre3-dev zlib1g-dev libssl-dev libxml2-dev rcs libpng-dev
Download and extract the latest stable version of OpenLiteSpeed on your server. At the time of this writing, the latest stable version of OpenLiteSpeed is 1.4.27:
cd /opt && wget http://open.litespeedtech.com/packages/openlitespeed-1.4.27.tgz tar -xvzf openlitespeed-1.4.27.tgz cd openlitespeed-1.4.27
Configure and compile OpenLiteSpeed with the following command, This will install the entire OpenLiteSpeed system under the /usr/local/lsws location:
./configure make make install
Step 3. Configuring MariaDB for OpenLiteSpeed.
First, install the MariaDB server with the following command:
sudo apt-get install mariadb-server
When the installation is complete, run the following command to secure your installation:
Answer all of the questions as shown below:
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y New password: Re-enter new password: Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Step 4. Configure OpenLiteSpeed.
Configure an administrative username and password for the OpenLiteSpeed’s web interface by running the following command:
You will be asked to provide a username and password as shown below:
Please specify the user name of administrator. This is the user name required to login the administration Web interface. User name [admin]: webuser 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!
After setting up the username and the password use the following command to start the web server:
sudo /etc/init.d/lsws start
Step 5. Access OpenLiteSpeed.
OpenLiteSpeed will be available on HTTP port 8080 by default and admin login using port 7080. Open your web browser and navigate to http://your-domain-name.com:8080, you will see the default OpenLiteSpeed web page.
Congratulation’s! You have successfully install and configured OpenLiteSpeed on your Ubuntu 16.04 server. Thanks for using this tutorial for installing OpenLiteSpeed on Ubuntu 16.04 LTS (Xenial Xerus) system.