Installing PHP with LiteSpeed SAPI from a repository is much faster than compiling it yourself. Some users also may be unused to compiling PHP and will find this method more comfortable. PHP for LiteSpeed (LSAPI) is available in two repositories — Remi Repository and our own LiteSpeed Repository. The LiteSpeed Repository is currently being updated, though. We will add installation instructions for the LiteSpeed Repository when it is ready.
The following steps can be used to install PHP 5.5 with LSAPI on CentOS 6. Consult the Remi Repository site for installation with other builds.
Remi Repository requires the EPEL repository as well.
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
Open the Remi repo file:
[remi-php55] section, set
[remi-php55] section is for PHP 5.5. The
[remi-php] section is for PHP 5.4 and the
[remi-php56] section is for PHP 5.6.
Remi's PHP for LSWS (PHP with LSAPI) package is called “php-litespeed”.
yum install php-litespeed
Note: You can, of course, also install any other packages you wish (such as
By default, Remi Repo installs PHP with LSAPI to
/usr/bin/lsphp. This is not the place LSWS normally looks for PHP, so we will now need to direct LSWS to look there.
Go to the WebAdmin console > External App > your external application > Command. Change the command setting to match the location PHP was installed to (
Click Save and then perform a Graceful Restart for the changes to take effect.