LAMP is an acronym that stands for Linux Apache, MySQL and PHP, these are the components required to run and present web interface of PiHome Smart Heating Control.

PHP 5 no longer supported by PiHome, you can use it as at your own discretion, also mysql users need to disable ‘ONLY_FULL_GROUP_BY’ sqlmode see GitHub for more information

Note: if you are here for some troubleshoot Raspberry Pi LAMP (PHP and MySQL/MariaDB on a Raspberry Pi with phpMyAdmin) then check out troubleshooting post on Raspberry Pi LAMP

Install (LAMP) Apache and MySQL server on Pi

Lets just run update first by issuing following commands

Now Install Apache, PHP and MySQL server with other dependencies

During MySQL server installation you will get option to set the mysql root password.

Install phpMyAdmin on Pi

PhpMyAdmin isn’t required but it will make your life easier if you need to do any troubleshooting for MySQL Database.

Begin the PhpMyAdmin installation

PhPmyAdmin Installation

PhPmyAdmin Installation

Configure for dbconfig-common

PhPmyAdmin Installation - Configuring

PhPmyAdmin Installation – Configuring, Select Yes and hit enter

PhPmyAdmin Installation - Configuring

PhPmyAdmin Installation – Configuring Enter password for Database Administrator

PhPmyAdmin Installation - Configuring

PhPmyAdmin Installation – Configuring – Enter password for phpmyadmin to register with database server.

Configure Apache to work with PhpMyAdmin. Edit /etc/apache2/apache2.conf and go to end of file.

Add following line and then CTRL+O to save changes and then CTRL+X to exit.

Now restart Apache web server, if everything was correct Apache service should start successfully.

Change Document Root Folder

By default Apache server installed with document root pointing to /var/www/html, you need to change this in /etc/apache2/sites-available/000-default.conf for PiHome to work.


After this change copy all project folder to /var/www/ and restart apache service