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) in this repository. When installing, the PHP binary is compiled with LSAPI where the PHP version used is determined by your Debian System's default.

  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 php5-litespeed

Although LSPHP is installed from the LiteSpeed Debian Repository, LSPHP will still use other enabled php5 packages installed from Debian's default repositories. Install them according to your needs if they have not been installed already.

For example:

apt-get install php5-gd php5-mysql php5-mcrypt php5-imap php5-common

Available packages can be checked using the following command:

apt-cache search php5

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: 2015/12/23 22:49
  • by Long Hu