Install OpenLiteSpeed from Source with Build Script for OLS 1.6 and above

You are here:
< Back

These days it’s not too popular to install OpenLiteSpeed from source. Installing OLS from a repository, or installing a binary directly, is so much easier than compiling from source code. However, there are still some who prefer the old way, for whatever reason (maybe special requirements, or just plain habit).

If you are such a user, you are probably very familiar with the process of manually installing dependencies, using ./configure, make and make install. Well, now that process has become easier. As of v1.6, OLS now ships with a build.sh script which handles dependencies, ./configure, and make for you. Simply run the build script, check/change the settings in ols.conf, and then run ./install.sh. That is it!

Page Contents

Build

Run build.sh to install dependencies, configure and make:

./build.sh

Check

Check options in ols.conf and modify if necessary:

# cat ols.conf
#If you want to change the default values, please update this file.
#

SERVERROOT=/usr/local/lsws
OPENLSWS_USER=nobody
OPENLSWS_GROUP=nobody
OPENLSWS_ADMIN=admin
OPENLSWS_PASSWORD=123456
OPENLSWS_EMAIL=root@localhost
OPENLSWS_ADMINSSL=yes
OPENLSWS_ADMINPORT=7080
USE_LSPHP7=yes
DEFAULT_TMP_DIR=/tmp/lshttpd
PID_FILE=/tmp/lshttpd/lshttpd.pid
OPENLSWS_EXAMPLEPORT=8088

Install

Run install.sh to complete OpenLiteSpeed installation:

./install.sh