Installing PHP 7 for OpenLiteSpeed on Ubuntu 17.04

I installed OpenLiteSpeed on Ubuntu to test it out but ran into some problems while updating the PHP version. A lot of instructions had the following command to add the litespeed debian repo to Ubuntu:

[bash light=”true”]wget -O – | bash[/bash]

The problem was that although it added the GnuPG key, it wasn’t adding the correct repo to sources. After opening up the bash script I could see that the right address for my repo was:

[bash light=”true”]deb xenial main[/bash]

So I added that to my sources, did an sudo apt-get update and finally I had the right repo added. Then I ran the following command to install php7 for litespeed.

[bash light=”true”]sudo apt install lsphp70 lsphp70-common lsphp70-mysql lsphp70-dev lsphp70-curl lsphp70-dbg[/bash]

I ran into one dependency issue for libpng12-0 which I eventually managed to download and install from here. After that I could run the install command for lsphp70.

Then I followed the rest of the instructions here to configure the server to use the new php 7.

Leave a Reply

Your email address will not be published. Required fields are marked *