Install OLS from LiteSpeed Repositories

< Back
You are here:

Video Tutorial

CentOS 6, 7, 8 | Debian 7, 8, 9, 10 | Ubuntu 14.04, 16.04, 18.04, 20.04

Add the Repository

Use the following commands to add our CentOS repositories:

CentOS 6: rpm -Uvh

CentOS 7: rpm -Uvh

CentOS 8: rpm -Uvh

Debian 7, 8, 9, 10 & Ubuntu 14,16,18, 20 :

sudo wget -O - | sudo bash

Install OpenLiteSpeed

For CentOS:

yum install openlitespeed

For Debian & Ubuntu:

apt-get install openlitespeed

The above command installs the latest version of OpenLiteSpeed. You can also specify version numbers, for example yum install openlitespeed-1.6.20, will install older versions.

Note: The OpenLiteSpeed packages in our repositories have SPDY enabled. The binary also includes the OpenSSL library needed to run SPDY. You do not have to install OpenSSL 1.0.1 to use SPDY if you download the package from the repositories.

Install PHP

For CentOS:

yum install epel-release
yum install lsphp73 lsphp73-common lsphp73-mysql lsphp73-gd lsphp73-process lsphp73-mbstring lsphp73-xml lsphp73-mcrypt lsphp73-pdo lsphp73-imap lsphp73-soap lsphp73-bcmath
ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5

For Debian & Ubuntu:

apt-get install lsphp73 lsphp73-common lsphp73-curl lsphp73-mysql lsphp73-opcache lsphp73-imap lsphp73-opcache 
ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5

For CentOS: The above commands will install PHP 7.3 for OpenLiteSpeed from our repository with all commonly-used packages and direct OpenLiteSpeed to use this PHP. This build of PHP should be enough to support the most commonly used web applications.

For Debian & Ubuntu: The above commands will install PHP 7.3 with all commonly-used packages for OpenLiteSpeed from our Debian Repo, and direct OpenLiteSpeed to use this PHP. This build of PHP should be enough to support the most commonly used web applications.

If you wish to install another version such as PHP 8.0, replace lsphp73 to lsphp80.

To use a custom PHP build, see our wikis on PHP via RPM and building a custom PHP from the source.

If you prefer not to use symbolic link setup for PHP, please login into the Web Admin at port 7080, and update the PHP version/path from the Server Configuration > External App > Command.

Getting Started

  • The default installation directory is /usr/local/lsws.
  • For detailed information on controlling the server processes, please see the administration guide.
To start the server, simply run systemctl start lsws. (To stop it, run systemctl stop lsws.)
  • A sample site should be running on the server.
To access your site, point your browser to http://[address]:8088/, [address] being the IP address or domain name of your web server machine. Use “localhost” if the server is on the machine you are using. By default, OpenLiteSpeed runs on port “8088”.
A congratulations page linked to other testing pages should load into the browser when pointed to the above address. If not, try testing the WebAdmin interface.
  • The default port for the WebAdmin console is 7080.
Plug https://[address]:7080/, into your browser to go to the WebAdmin interface.
Remember the “https://” and that for [address] you can use “localhost” if you’re currently using the machine the server is on.
A login page should load. The defaults for the administrator’s user name and password are “admin” and randomly generated passwords.
For detailed information regarding configuration, please refer to our Configuration Guide, or click the “Help” link at the top of each page.
  • If your server uses a firewall, please make sure that localhost is trusted.
For instance, Linux with IPTables should include a rule ALLOW INPUT from LO.
  • If your website and the WebAdmin console are inaccessible, please take a look at the error log /usr/local/lsws/logs/error.log.
If there is a TCP port conflict with other server applications, you will need to stop the application currently running on port 7080. The following command can be used to check port 7080: netstat -an | grep 7080. If the port is available, the command will produce no output.
If the swapping directory is not writable, you can either grant writing permission for the swapping directory to the user whom the web server is running as, or change the swapping directory’s configurations manually. The swapping directory is configured in the server’s XML configuration file: /usr/local/lsws/conf/httpd_config.xml. Search the XML file for “swappingDir”. The default location for the swapping directory is /tmp/lshttpd/swap.
If you still have problems with installation, please check the OpenLiteSpeed Development Group.
Previous Minimum System Requirements
Next Install OpenLiteSpeed from Pre-Complied Binary
Table of Contents