OpenLiteSpeed Web Server Users' Manual

Version 1.4 Rev. 2

Installation/Uninstallation

Minimum system requirements

Installation

Installation must be performed in a command line terminal. For testing purposes, LiteSpeed Web Server can be installed into a home directory by a non-privileged user. For production use, it should be installed into a system directory.

In Mac OS X, the root user is disabled by default. It can be enabled using a series of actions detailed on the Apple website. You can also use the sudo command to install LSWS into a system directory without enabling the root user, but system folders will still only be manipulable by the root user. This means that every time you want to control LSWS from the command line terminal (like when you want to start or stop LSWS), you will have to use the sudo command.

Installation Steps:

  1. Download and decompress the package into a convenient location:

    wget http://open.litespeedtech.com/packages/openlitespeed.1.0.tgz; tar zxf openlitespeed.1.0.tgz

  2. Go to the installation directory, compile, and install the package as the root user (for production use):

    cd openlitespeed
    ./configure
    make && make install

    Note: The following packages need to be installed before compiling and installing OpenLiteSpeed: PCRE, Expat, OpenSSL, GeoIP, zlib.

    • CentOS 5.* and 6.*

      wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm; rpm -Uvh epel-release-5-4.noarch.rpm (CentOS 5.* only)

      wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm; rpm -Uvh epel-release-6-8.noarch.rpm (CentOS 6.* only)

      yum install gcc gcc-c++ make glibc

      yum install pcre-devel expat-devel openssl-devel geoip-devel zlib-devel

    • Ubuntu/Debian

      apt-get install build-essential

      apt-get install libpcre3-dev libexpat1-dev libssl-dev libgeoip-dev zlib1g-dev

    • FreeBSD

      Use pkg_add or ports. Here are some examples using ports.

      cd /usr/ports/devel/pcre; make install clean; rehash;
      cd /usr/ports/net/GeoIP; make install clean; rehash;
      cd /usr/ports/textproc/expat2; make install clean; rehash;
      cd /usr/ports/security/openssl; make install clean; rehash;

    • Mac OS X

      Install Xcode from https://developer.apple.com/xcode/

      Install MacPorts from http://www.macports.org/install.php#pkg

      sudo port install pcre expat openssl libgeoip zlib

      Note: When OS X users run the configure command, they need to add a parameter telling the command where to look for the PCRE package if it is added via MacPorts. This is because MacPorts installs it in a non-standard location (/opt/local/). For example:

      ./configure --with-pcre=/opt/local

  3. By default, the Installer will install a sample site on port 8088 and set the WebAdmin console (the LiteSpeed GUI) to port 7080. (user: admin, password: 123456, admin email: root@localhost)

Getting Started

  1. For detailed information on controlling the server processes, please see the Administration Guide.

    To start the server, simply run [your_install_dir]/bin/lswsctrl start. (To stop it, run [your_install_dir]/bin/lswsctrl stop.)

  2. 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. "8088" is the default port. If you chose another port for LiteSpeed during installation, use the port you designated.

    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.

  3. The default port for the WebAdmin console is 7080.

    Plug http://[address]:7080/, into your browser to go to the WebAdmin interface. (If you changed the port for WebAdmin during installation, use that port instead.)

    Remember that for [address] you can use "localhost" if you're currently using the machine the server is on.

    The WebAdmin welcome page should load. Click the "Log on" link and use the administrator's username and password specified during installation to log on.

    For detailed information regarding configuration, please refer to our Configuration Guide, or click the "Help" link at the top of each page.

  4. If your server uses firewall, please make sure that localhost is trusted.

    For instance, Linux with IPTables should include a rule ALLOW INPUT from LO.

  5. If your web site and the WebAdmin interface are inaccessible, please take a look at the error log [your_install_dir]/logs/error.log.

    If there is a TCP port conflict with other server applications, the web server should be reinstalled with an available port. The following command can be used to find an available port: netstat -an | grep XXXX XXXX is a port number. 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: [your_install_dir]/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 out our wiki or post your problem on our support forum.

Notes

Uninstallation Steps

  1. Stop OpenLiteSpeed if it is running: [your_install_dir]/bin/lswsctrl stop
  2. Remove the install directory: rm -rf [your_install_dir]