Skip to content

Installation for Apache on Raspbian

Paul edited this page Sep 10, 2019 · 1 revision

These instructions assume installation on a Raspberry Pi setup as described in our walk through. Other Linux/Debian type operating systems will be similar

Install GIT and Clone the TCPLightingWebInterface Respository

sudo apt install git

Change to your home directory

cd /home/pi

Clone the repository

git clone https://github.com/sktaylortrash/TCPLightingWebInterface-MQTT.git

You now have a copy of the base website

Change to the public_html of your virtual host if you created one i.e.

cd /var/www/html/lighting.local/public_html

or the default html directory if you didn't

cd /var/www/html/

copy the cloned project to this directory

cp -R /home/pi/TCPLightingWebInterface/* .

If you plan to use the IFTTT Integration also copy the .htaccess file

cp -R /home/pi/TCPLightingWebInterface/.htaccess .

Edit .htaccess to reflect you local subnet or you will not be able to access the site

vi .htaccess

Change Allow from 192.168.1.1/24 #Local Network

To represent your local subnet ie. Allow from 172.16.1.1/24 #Local Network

Create blank config files and make them writeable by the web server

touch tcp.token
chmod 777 tcp.token
touch schedule.sched
chmod 777 schedule.sched
touch schedule.actioned
chmod 777 schedule.actioned
touch mqtt_sub.py
chmod 777 mqtt_sub.py

Create logs directory and make writeable by the web server

mkdir logs
chmod 777 logs

Alternatively you can run the setup.sh script to do the file and folder creation for you.

You now ready to move on to config.inc.php Customization