Running Icingaweb2 on Ubuntu 16.04.1 LTS

I recently installed and configured icingaweb2 on Ubuntu 16.04.01 LTS system.

The documentation to do this seems rather sparse, and what is out there doesn’t really take into account some apparent bugs that I found in Ubuntu 16.10. I don’t know why an LTS system should have these problems, but here they are.

The package for libzend-framework-php puts all of its PHP files into the directory /usr/share/php/libzend-framework-php – but PHP itself will not find these files. PHP needs to be configured to find these files, but looks in /usr/share/php/Zend instead.

It appears that PHP 7.0 is configured to handle this, but 7.1 and 5.6 are not. Rather than mess with it all the time, I moved everything to the already existing directory /usr/share/Zend. After that, PHP worked – I was using 5.6 on the basis that Icinga2 has compatibility problems with 7 – can’t say if that is true or not, but it is something to watch for.

I fixed the problem of /usr/share/php/libzend-framework-php this way:

cd /usr/share/php/libzend-framework-php/Zend/
mv ./* /usr/share/php/Zend/

That moves everything, but be aware that this “breaks” the package and updates will not happen correctly unless you move those too. You could create a link named /usr/share/php/libzend-framework-php and point it to the current directory, but what if the upgrade process removes everything in that directory? I wouldn’t recommend it.

Another problem was with the HTMLPurifier package. When it installs, everything named HTMLPurifier* is put into /usr/share/php. What this means is that all of the PHP files named HTMLPurifier.something.php are placed in the wrong directory.

You can fix this with:

cd /usr/share/php
mv HTMLPurifier.* HTMLPurifier/

Again, unless they fix this problem in upgrades, this will need to be done on future upgrades.

These problems really surprised me, as the LTS versions are supposed to be solid and get bugs fixed quickly. Problems like these should have been caught early on.

Leave a comment