Wiki
Command unknown: diff136442695
 

How to Set Up LiteSpeed Web Server from the Command Line

This wiki covers how to set up LSWS (either Enterprise or Standard edition) from the command line on a server that already has a working Apache installation. This wiki guides the user through the steps necessary to install LSWS and build PHP. This wiki assumes that the user already has a working Apache installation. LSWS will automatically read and run off the Apache configs already on this server.

This wiki is meant for those familiar with the Unix/Linux console command line environment that see a GUI as a distraction and overhead.

This wiki is not meant for users using cPanel/WHM, Plesk, or DirectAdmin. Users using a control panel should use the guide associated with their control panel.

Step 1: Download the LSWS package

Run the following commands from ssh as root

cd /root
wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.12-ent-x86_64-linux.tar.gz

Note: Replace the values in the URL to control for your OS and which version/edition of LSWS you wish to download:

lsws-4.2.12-ent-x86_64-linux = LSWS Enterprise 4.2.12 for 64bit Linux

lsws-4.2.10-std-i386-linux = LSWS Standard 4.2.10 for 32bit Linux

lsws-4.2.12-ent-x86_64-freebsd6 = LSWS Enterprise 4.2.12 for 64bit FreeBSD 6.x

Note: On some systems (FreeBSD), fetch can be used.

Step 2: Unpack and install

Unpack the tarball and run the install script

tar zxf  lsws-4.2.12-ent-x86_64-linux.tar.gz
cd lsws-4.2.12
./install.sh

The installer will ask you a number of questions (covered in detail here).

Note: The installer will ask you to set a port offset. It may be best to set Port Offset to a number other than “0”. If Port Offset is set to “0”, LSWS may stop Apache and start LSWS after a successful installation. This is not ideal, since we still need to build the PHP binary for LiteSpeed.

Step 3: Build matching PHP

LSWS comes with a pre-built PHP 5 binary, but this only contains the barest of configurations and is not enough to run most websites. You should build your own PHP binary using configuration options to match those used by Apache.

You can build PHP in two ways:

  1. Using the WebAdmin console. This is highly recommended, even for users who generally prefer the command line, as it combines steps. Simply access the WebAdmin through port 7080 and go to Actions > Compile PHP. There you will be guided through the steps to build PHP.

Step 4: Verify and switch ports

Restart LSWS

/usr/local/lsws/bin/lswsctrl restart

Now you can verify on the port you've chosen with you port offset that everything works as expected. It should! 8-)

Once you've verified, switch LSWS onto port 80.

That's it.

 
litespeed_wiki/install/commandline.txt · Last modified: 2014/06/27 16:04 by Michael Armstrong