This is a PHP+MySQL web application for the management of users, devices, door locks, payments, RFID tags.
- Install a LAMP server
- Fork this repo
- Clone it to your /var/www/ directory
- Import the database by using this command (please use this SQL dump):
$ mysql -u <your_username> -p <your_password> <your_database_name> < laclef-webapp.sql
- Modify settings.php according to your MySQL configuration
- Fire up your web browser and go to http://localhost/login (login : admin, password : admin)
- Enjoy a freshly-brewed coffee !
- Install a fresh Raspian on your Pi
- Insert the SD card in your Pi and plug it up
- Fire up your terminal :
ssh pi@<your_ip_address>
(Default password : raspberry) - Once you are logged in, configure the pi :
sudo raspi-config
- Upgrade your distro and install the following tools :
sudo su
thenapt-get update && apt-get upgrade
- You have time for a coffee break since the upgrade can take a looonnnggg time
- Install a LAMP server :
apt-get install apache2 php5 mysql-client mysql-server avahi-daemon php5-curl php5-mysql libapache2-mod-php5
- Create a user and a database :
$ mysql -u <your_username> -p
thenmysql> CREATE DATABASE laclef; GRANT ALL PRIVILEGES ON laclef.* TO 'pi'@'localhost' IDENTIFIED BY 'raspberry' WITH GRANT OPTION;
- Import the database by using this command (please use this SQL dump):
$ mysql -u <your_username> -p <your_password> <your_database_name> < laclef-webapp.sql
- In another project called emoncms, we noticed that the Raspberry SD card lifetime can be extended if we turn off apache logging. To do so, please have a look at this documentation (step 6).
- Modify settings.php like so :
// MySQL server credentials
$host = "localhost";
$username = "pi";
$password = "raspberry";
$database = "laclef";
Last step : go to http://raspberrypi.local/login (login : admin, password : admin) Enjoy a cup of tea (since you took a coffee on step 6 :)
If laclef is not working as expected, please consider the use of this tracker. This issue tracker is meant for bug reports and requests for improvements.
The code is released under The Affero General Public License version 3. http://www.gnu.org/licenses/agpl-3.0.en.html