DUF trolleys install documentation:

**this is not secured in any way – it is made to work offline, hence no extraordinary security measures or secure installs.


Hardware:

Granny trolleys x4

Raspberry Pi 3 Model B x4

Any old screen/monitor x4

VGA cables x4

VGA to HDMI x4

Micro SD 32GB x4 (smaller will do too)

Edimax WiFi dongle x1

mini keyboard x1

mouse x1

RasPi power supply cables x4

Power supply cables for monitors x4

Cable-ties – many



Software/install sequence:

**some of these things do not necessarily need to follow the sequence, it was jut easier to line it up this way.

--------------------------------------------------------------------
--------------------------------------------------------------------

sudo apt-get update

Install LAMP Packages

sudo apt-get install apache2 apache2-utils mysql-server php5 php5-mysql php5-curl php5-cli libapache2-mod-php5
* Choose a root password for MySQL

Enable Useful Apache Modules

sudo a2enmod headers
sudo a2enmod rewrite

Edit Apache Config for .htaccess Usage

sudo nano /etc/apache2/apache2.conf
Change AllowOveride under <Directory /var/www/> from None to All

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Change Server Timezone

sudo dpkg-reconfigure tzdata

Restart Apache & MySQL

sudo service apache2 restart
sudo service mysql restart

Adjust User/Group and Read/Write/Execute on Web Folder

sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 775 /var/www/html
Also add the admin user to www-data group
sudo usermod -aG www-data admin

Install PHPMyAdmin (Answer YES to use DBconfig)

sudo apt-get install phpmyadmin
* Make sure you set a password for the phpmyadmin user

Add PHPMyAdmin to Apache2 Config

sudo nano /etc/apache2/apache2.conf
ADD TO FILE:

Include /etc/phpmyadmin/apache.conf

Tip: How to Workaround No Password Set for User

sudo nano /etc/phpmyadmin/config.inc.php
UNCOMMENT IN FILE:

$cfg['Servers'][$i]['AllowNoPassword'] = true;


Restart Apache, then you will able to login without a password at /phpmyadmin/ (
NOT RECOMMENDED).

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install hostapd dnsmasq

Do not edit /etc/dhcpcd.conf, leave that as it is.

Edit /etc/hostapd/hostapd.conf to be -

Code: Select all

interface=wlan0
ssid=DataStrike
channel=6
hw_mode=g
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=blueberry
rsn_pairwise=CCMP

It seems everything after channel can be left out if you want an open access point but that is not recommended for this particular set-up.


Edit /etc/init.d/hostapd to change DAEMON_CONF= -

Code: Select all

DAEMON_CONF=/etc/hostapd/hostapd.conf

Edit the /etc/network/interfaces wlan0 configuration to -

Code: Select all

allow-hotplug wlan0  
iface wlan0 inet static  
  address 172.17.2.1
  netmask 255.255.255.0
  broadcast 255.0.0.0

The allow-hotplug line is essential


Edit /etc/dnsmasq.conf to be -

Code: Select all

address=/#/172.17.2.1
interface=wlan0
dhcp-range=172.17.2.100,172.17.2.250,12h
no-resolv
# log-facility=/var/log/dnsmasq.log
# log-queries

Uncomment the last two lines if you want to log dnsmasq activity.


Then finally -

Code: Select all

sudo update-rc.d hostapd defaults
sudo update-rc.d dnsmasq defaults
sudo reboot



Next bit is about static IP and connecting remaining 3 raspberry Pis to the main access point to display text input from people interacting with the installation:


Could not work out static IP – will update when I do.


In the meantime, a workaround:


ssh into root@whatever ip is the mama pi (that means then one with wifi hotspot and server)

then open browser and go to dataunion.fork/db/ && chose:


organise.php

mobilise.php

settarget.php

strike.php


one page per box/trolley combo.


Should there be a major breakdown. Every box has a corresponding html file:

organise.html

mobilise.htnl

settarget.html

strike.html


This is in worst case scenario - and this does not allow for audience participation. Will only play what older text input.


FOR INTERACTION:

Connect to WIFI >> DataStrike

Open browser >> goto >> dataunion.fork

In case browser is not connecting – ask artist or gallery staff what is the url for the mobile interaction.




***IMPORTANT – mama crash:

https://raspberrypi.stackexchange.com/questions/3289/checking-sdcard-for-errors-unmount-problem


sudo touch /forcesck didn't work for me...

but I did the following and it checked errors:

force a manual fsck and reboot:

 fsck -fy /dev/mmcblk0p2 
 reboot 

*** database back-up
crontab -e
0 */2 * * * mysqldump -uroot -pduFduF337 DUF  > /root/duf-backups/$(date +\%Y_\%m_\%d_\%I_\%M_\%p)_duf.sql