Skip to content

vehagn/DeltaPi

Repository files navigation

DeltaPiBeer

Dependencies

Rpi-hw 0.7.3
https://github.com/Wicker25/Rpi-hw

Boost 1.49.0
sudo apt-get install libboost-all-dev

MySQL connector
sudo apt-get install libmysqlcppconn-dev
C 6.1.2
C++ 1.1.3

Root access to shared libraries (for MySQL connector)

sudo bash -c "echo /usr/local/lib/ > /etc/ld.so.conf.d/local.conf"
sudo /sbin/ldconfig

Give file root access without running sudo

sudo chown root ./DeltaPi
sudo chmod 4755 ./DeltaPi

Startup on boot

$ vim ~/startup.sh

#!/bin/sh
sleep 5
/usr/local/DeltaPi
sleep 2
/usr/local/EpsilonPi
shutdown -h now

$ chmod 771 startup.sh
$ sudo chown root:USERNAME /sbin/shutdown && sudo chmod 4770 /sbin/shutdown

$ vim ~/.bashrc

Run the startup bash script:

echo starting DeltaPi
bash startup.sh

Autologin

sudo vim /etc/inittab

comment out line:
"1:2345:respawn:/sbin/ getty 115200 tty1" => "#1:2345:respawn:/sbin/ getty 115200 tty1"

add:
1:2345:respawn:/bin/login -f USERNAME tty1\</dev/tty1 >/dev/tty1 2>&1

Webserver

sudo addgroup www-data
sudo adduser www-data www-data
sudo mkdir /var/www
sudo chown -R www-data:www-data /var/www

sudo apt-get install apache2

sudo chown 640 "FILE"

https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts

Web port: 80
DNS port: 53

Database

Place database.conf in same run directory as DeltaPi. (in ~/ following the setup.sh)

The syntax is as follows:
decrypted
'Host'
'User'
'Password'
'Database'