3

How to Install OpenLiteSpeed on Ubuntu 20.04

 2 years ago
source link: https://www.vultr.com/docs/how-to-install-openlitespeed-on-ubuntu-20-04
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
<?xml encoding="utf-8" ??>

OpenLiteSpeed is a free and open-source web server developed by LiteSpeed Technologies. Best known as a lightweight, well-optimized web server, OpenLiteSpeed combines security, simplicity, and speed into a single package that improves the performance of hosted web applications.

OpenLiteSpeed is also the free version of LiteSpeed enterprise with a beginner-friendly web interface that allows you to configure the web server, deploy and enable support for a wide range of backend applications. In this guide, you will install and configure OpenLiteSpeed on a Ubuntu 20.04 server.

Prerequisites

1. Install Required Packages

Install the required dependencies for OpenLiteSpeed to run on your server.

$ sudo apt-get install build-essential libexpat1-dev libgeoip-dev libpcre3-dev zlib1g-dev libssl-dev libxml2-dev rcs libpng-dev

Install PHP and commonly used extensions.

$ sudo apt-get install php php-common php-curl php-mysql php-opcache php-imap php-opcache 

Install MySQL.

$ sudo apt-get install mysql

2. Install OpenLiteSpeed

Option 1: Install from Repository

First, download the OpenLiteSpeed repository script.

$ wget http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh 

Run the script.

$ sudo bash enable_lst_debian_repo.sh

The script will automatically download repository files and update your server.

Install OpenLiteSpeed.

$ sudo apt-get install openlitespeed

Start OpenLiteSpeed.

$ sudo systemctl start lsws

Option 2: Install OpenLiteSpeed from Binary File

Download the latest OpenLiteSpeed stable version using the following command:

$ wget https://openlitespeed.org/packages/openlitespeed-1.7.14.tgz

Extract the downloaded archive.

$ tar -xvzf openlitespeed-1.7.14.tgz

Change to the extracted directory.

$ cd openlitespeed

Configure and compile OpenLiteSpeed by running the installation script. By default, it will install OpenLiteSpeed under the /usr/local/ directory.

$ sudo bash install.sh

You can now start the web server by running the following command:

$ sudo /usr/local/lsws/bin/lswsctrl start

Option 3: One-Click Install for WordPress Users

If you plan to install WordPress, this is your one-stop shop to install the web server, and optionally MySQL and WordPress. After the script finishes, you can get straight to configuring the web server or jump right into setting up WordPress.

Download the one-click script.

$ wget https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh 

Run the script.

$ sudo bash ./ols1clk.sh

3. Configure OpenLiteSpeed

After OpenLiteSpeed is installed on your server, you need to set an administrator username and password by running the administrative script.

sudo bash /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]: 

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!

4. Access your OpenLiteSpeed Web Server

With OpenLiteSpeed configured on your server, visit your public server IP with port 8088 to view the default OpenLiteSpeed web page.

For example: http://192.0.2.123:8088

To login to the OpenLiteSpeed web interface, visit port 7080 on your server through a web browser. You will be required to enter the username and password created in Step 3 of this guide.

More Information

Your OpenLiteSpeed installation is complete. Through the web server interface, you can launch web applications and integrate LiteSpeed cache on WordPress installations.

Want to contribute?

You could earn up to $600 by adding new articles


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK