**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.
DEVUAN install: Flash SD card with devuan_jessie_1.0.0_armhf_raspi2.img.xz using Balena Etcher
Expand filesystem following this tut: https://www.youtube.com/watch?v=wTtLzbOEu_A
Check df -h
sudo fdisk /dev/mmcblk0 open main device to edit partitions
p To list partitions to get start and end sector for second partition Note these values down
d To delete partition
2 To choose second Linux mmcblk0p2
n To create new partition
p Choose primary type
2 Partition Number <check listing from first p command above> Set first sector Set end sector (default value is usually correct)
p To list partitions again
w To write new partition table
sudo reboot
Login again
Resize partition sudo resize2fs /dev/mmcblk0p2
Check df -h
Update&&upgrade
GUI install:
sudo apt install xserver-xorg
sudo apt install xfce4 xfce4-terminal
sudo apt install lightdm
reboot
Rotate display:
sudo nano /boot/config.txt
hdmi_force_hotplug=1
display_rotate=2
save&reboot
Install browser:
from friends of devuan (bottom of the page): https://friendsofdevuan.org/doku.php/community:installing_devuan_1.0_jessie
apt-get install firefox-esr ristretto xpdf
Install network manager:
sudo apt install network-manager
WiFi setup (from devuan git repo): https://git.devuan.org/dev1fanboy/Upgrade-Install-Devuan/blob/master/network-configuration.md
sudo nano /etc/network/interfaces
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid myssid
wpa-psk mypassphrase
save&reboot
Screensaver:
sudo nano /etc/lightdm/lightdm.conf
xserver-command=x -s 0 dpms
save&reboot
-------------------------------------------------------------------- --------------------------------------------------------------------
Server stuff:
from mario lurig’s lamp install: https://mariolurig.com/coding/install-lamp-debian-jessie-apache-mysql-php5-phpmyadmin/
following step-by-step installs apache2, php, mysql && phpmyadmin
sudo
apt-get update
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
sudo
a2enmod headers
sudo
a2enmod rewrite
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>
sudo
dpkg-reconfigure tzdata
sudo
service apache2 restart
sudo
service mysql restart
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
sudo
apt-get install phpmyadmin
*
Make sure you set a password for the phpmyadmin user
sudo
nano /etc/apache2/apache2.conf
ADD
TO FILE:
Include /etc/phpmyadmin/apache.conf
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).
WIFI hotspot (access point) && captive portal:
From here: https://lb.raspberrypi.org/forums/viewtopic.php?t=138550&start=25#p1275429
IMORTANT – all wlan0 below are in DUF install case wlan1
First ensure you are up to date and have the required software installed -
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
the rest of the work is about php tables, text ant other browser-based input&display and is mostly html/css/php combo – doc on a separate pages
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