emonPi SD Card Build

I want to add emoncms to an existing Pi2 running the latest 2016-03-18-raspbian-jessie.img downloaded from the official site onto an 8GB card. I have the option of downloading the latest pre-built card from openenergymonitor based on Jessie Lite and restoring the full package set OR starting from scratch with my existing card and following the build instructions. I have chosen to do the latter running the Pi2 headless from an OSX terminal window.

I have succeeded in following sections 1 through to 4. Thus I now have installed the core packages & set the hostname/password, created the additional data partition and modified the fstab file (left the root filesystem as rw at present) and set up the serial port. Section 4 required the I2C module to be activated using raspbi-config but was then also successful.

I am, however, struggling to implement section 5, in particular the mosquito MQTT service. The initial set of commands finishes with the line pecl install Mosquitto-alpha. The pecl command is not installed on my Jessie image. I have searched for more information on the installation of this package and have implemented the following commands which I believe should work prior to above command:

sudo apt-get install php-pear
sudo apt-get install php5-dev
sudo apt-get install libcurl3-openssl-dev

I was encouraged to see that the auto detection of the libmosquitto location was asked & the command completed successfully. However, the final two lines:

“configuration option “php_ini” is not set to php.ini location”
“You should add “extension=mosquitto.so” to php.ini”

are causing me some issues. The only php.ini file I can locate on my card is at /etc/php5/cli/php.ini and I have added the line extension=/usr/lib/php5/20131226/mosquitto.so to the Dynamic Extensions section.
I am not sure what the first of these 2 lines means.

The PHP extension config files given next in section 5 build do not exist and neither does the /etc/php5/apache2/ directory or its subdirectory conf.d. I have created these and issued the commands. The following commands editing /etc/mosquitto/passwd & creating a password in section 5 were done successfully.

However, the publish and subscribe test given does not work with the subscribe command hanging in a new terminal window. I am loathe to continue with section 6 until this test works as it will almost certainly cause later issues. I should add that I am familiar enough with implementing a set of Linux instructions in a terminal window but not necessarily the understanding of the commands themselves. This is particularly so of the MQTT service so I am not clear how to identify the problem.

Any thoughts or guidance on the validity of what I have tried and how to proceed would be greatly appreciated