This is an old revision of the document!


Installing PHP From The LiteSpeed Debian Repository

Installing PHP with LiteSpeed SAPI from our repository is much faster and easier than compiling it yourself. If you are not used to compiling PHP you will likely find this method more comfortable. We currently maintain LiteSpeed PHP (LSPHP) for Debian 8 (Jessie), Debian 7 (Wheezy), Ubuntu 12 (Precise), Ubuntu 14 (Trusty) in this repository.

  1. Add the LiteSpeed Debian Repository with the following command: (You must have wget installed )

    wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | bash
  2. Install LiteSpeed PHP with apt-get:

    apt-get install lsphpXX (XX can be 54,55,56,70)

To install other php packages for lsphpXX:

For example:

apt-get install lsphp56-gd lsphp56-mysql lsphp56-mcrypt lsphp56-imap

Available packages can be checked using the following command:

apt-cache search lsphpXX (XX can be 54,55,56,70)

This is the script run in step 1. It will do the following things:

  • Add the LiteSpeed Debian Repository to Debian's source list folder
echo "deb http://rpms.litespeedtech.com/debian/ jessie main" > /etc/apt/sources.list.d/lst_debian_repo.list 
  • Fetch LiteSpeed Tech's gpg public key and add it to APT's trusted key zone
wget -O /etc/apt/trusted.gpg.d/lst_debian_repo.gpg http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg 
  • Update the APT package list
apt-get update

When packages are installed from the LiteSpeed repository with the apt-get command, the gpg signature of the repository will now be automatically authenticated.

  • LiteSpeed PHP 5.6 will be installed to /usr/bin/lsphp5. This is not usual directory LSWS checks for PHP so we will need to direct LSWS to this directory after installation.

    To do this, open the WebAdmin Console and navigate to Configuration » Server » External App and click “Edit” next to the “LSAPI App” Type. Change the path in the Command field to /usr/bin/lsphp5 and click “Save” at the top right. LSWS should now be using the newly installed lsphp5.
  • A “php.ini” file will have been installed to etc/php5/litespeed/php.ini. You may modify and otherwise tailor this file to suit your needs.
  • Admin
  • Last modified: 2016/03/30 13:28
  • by Long Hu