This is an old revision of the document!


Installing PHP From The LiteSpeed Debian/Ubuntu 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.04 (Precise Pangolin), Ubuntu 14.04 (Trusty Tahr), and Ubuntu 16.04 (Xenial Xerus) in this repository.

As of October 27th 2016 we have updated our signing key and encryption for better protection and safety. Do not worry if you receive an error like:

W: GPG error: http://rpms.litespeedtech.com/debian xenial Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 011AA62DEDA1F085
W: The repository 'http://rpms.litespeedtech.com/debian xenial Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Invalid 'Date' entry in Release file /var/lib/apt/lists/rpms.litespeedtech.com_debian_dists_xenial_Release
W: There is no public key available for the following key IDs:
011AA62DEDA1F085 

This is because keys changed. It is a very easy fix all you have to do is run one of the following commands:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 011AA62DEDA1F085

or

sudo wget -O /etc/apt/trusted.gpg.d/lst_repo.gpg http://rpms.litespeedtech.com/debian/lst_repo.gpg

If the key that it is asking for does not match 011AA62DEDA1F085 or EDA1F085. Do not continue, check your “/etc/apt/sources.list.d/lst_debian_repo.list” file, and re-run the install script.

All the information on the new key can be found here:

Key-Transition-10-27-16

If you encounter any other issues please let us know and we will help!

  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_repo.gpg http://rpms.litespeedtech.com/debian/lst_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 XX will be installed to /usr/local/lsws/lsphpXX. This is not the 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/local/lsws/lsphpXX/bin/lsphp and click “Save” at the top right. LSWS should now be using the newly installed lsphp binary.
  • A “php.ini” file will have been installed to /usr/local/lsws/lsphpXX/etc/php.ini. You may modify and otherwise tailor this file to suit your needs.
  • Packages in the apt repo are usually only built for Long Term Support (LTS) releases due to the fact that regular releases have too short of a life span before End of Life (EOL). In most cases, non-LTS releases will still work with packages from the prior LTS release.
  • Admin
  • Last modified: 2017/05/04 15:48
  • by Johathan Kagan