Introduction
OpenLiteSpeed is a free and open source web server developed by LiteSpeed Technologies. It is known for being a lightweight and optimized web server. In addition, OpenLiteSpeed provides a user friendly web interface and supports various operating systems, including Linux, SunOS, Mac OS, and FreeBSD.
In this tutorial, you will learn how to install and configure OpenLiteSpeed on an Ubuntu 16.04 server.
Prerequisites
- A server running Ubuntu 16.04.
- A non-root user with sudo privileges setup on your server.
- A static IP address of 192.168.15.110 configured on your server. Substitute this IP with the main IP of your server.
Step 1: Update your server
First, update your system to the latest stable version by running the following command:
sudo apt-get update -y
sudo apt-get upgrade -y
Once your system is up to date, you can proceed to the next step.
Step 2: Install OpenLiteSpeed
Before starting, you will need to 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 the latest stable version of the OpenLiteSpeed from its official website. Otherwise, you can download it directly with the following command:
wget https://openlitespeed.org/packages/openlitespeed-1.4.39.tgz
Next, extract the downloaded archive with the following command:
tar -xvzf openlitespeed-1.4.39.tgz
Change the directory to openlitespeed-1.4.39
.
cd openlitespeed-1.4.39
Configure and compile OpenLiteSpeed with the following command. This will install OpenLiteSpeed inside of the /usr/local/lsws/
directory.
sudo ./configure
sudo make
sudo make install
Step 3: Install and configure MariaDB
First, install the MariaDB server with the following command:
sudo apt-get install mariadb-server
MariaDB’s default installation is not secure, so you will need to secure it. Secure MariaDB by running the mysql_secure_installation
script.
sudo mysql_secure_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: <your-password>
Re-enter new password: <your-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
Once MariaDB has been secured, you can proceed to the next step.
Step 4: Configure OpenLiteSpeed
Configure an administrative password for OpenLiteSpeed’s web interface. You can do this by running the administrative script.
sudo /usr/local/lsws/admin/misc/admpass.sh
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!
Start the web server by running the following command:
sudo /etc/init.d/lsws start
Step 5: Access your web server
It’s time to access OpenLiteSpeed. Open your web browser and navigate to http://192.168.15.110:8080
, you will see the default OpenLiteSpeed web page.
You can also access the administrative interface by navigating to http://192.168.15.110:7080
on your web browser. You will be asked to enter the administrative username and password. After successful authentication, you will be redirected to the admin area.
Your installation of OpenLiteSpeed is now complete.
Want to contribute?
You could earn up to $300 by adding new articles
Suggest an update
Request an article