<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>https://wikifab.hatlab.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tguiseppin</id>
		<title>HATLAB - Contributions de l’utilisateur [fr]</title>
		<link rel="self" type="application/atom+xml" href="https://wikifab.hatlab.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tguiseppin"/>
		<link rel="alternate" type="text/html" href="https://wikifab.hatlab.fr/Sp%C3%A9cial:Contributions/Tguiseppin"/>
		<updated>2026-04-28T08:15:33Z</updated>
		<subtitle>Contributions de l’utilisateur</subtitle>
		<generator>MediaWiki 1.29.2</generator>

	<entry>
		<id>https://wikifab.hatlab.fr/index.php?title=SUNLAB_-_Enregistrement,_Authentification_%26_Acc%C3%A8s_%C3%A9lectronique&amp;diff=443</id>
		<title>SUNLAB - Enregistrement, Authentification &amp; Accès électronique</title>
		<link rel="alternate" type="text/html" href="https://wikifab.hatlab.fr/index.php?title=SUNLAB_-_Enregistrement,_Authentification_%26_Acc%C3%A8s_%C3%A9lectronique&amp;diff=443"/>
				<updated>2018-02-02T19:44:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tguiseppin : Enregistré en utilisant le bouton &amp;quot;Sauvegarder et continuer&amp;quot; du formulaire&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tuto Details&lt;br /&gt;
|Type=Technique&lt;br /&gt;
|Area=Électronique&lt;br /&gt;
|Description=Mise en place d'ouverture de porte par accès portail web.&lt;br /&gt;
|Difficulty=Difficile&lt;br /&gt;
|Cost=100&lt;br /&gt;
|Currency=EUR (€)&lt;br /&gt;
|Duration=10&lt;br /&gt;
|Duration-type=heure(s)&lt;br /&gt;
|Licences=GNU Free Hardware Designs&lt;br /&gt;
}}&lt;br /&gt;
{{Introduction}}&lt;br /&gt;
{{Materials&lt;br /&gt;
|Tools===== Liste des technologies ====&lt;br /&gt;
&lt;br /&gt;
  * Dév web: PHP / CSS / HTML / Javascript&lt;br /&gt;
  * Dév système: C&lt;br /&gt;
  * Hardware: Raspberry py, NFC reader&lt;br /&gt;
  * Base de données: MYSQL / LDAP&lt;br /&gt;
  * Système : Linux (debian), Apache2&lt;br /&gt;
  * Gestion du code: Git&lt;br /&gt;
}}&lt;br /&gt;
{{Separator}}&lt;br /&gt;
{{Tuto Step&lt;br /&gt;
|Step_Title=Fonctionnement et architecture du code&lt;br /&gt;
|Step_Content=L'intégralité du code est géré sous GIT, vous pouvez contribuer directement en effectuant des demandes de merge.&lt;br /&gt;
&lt;br /&gt;
Lien du git: [[https://github.com/ThomasGsp/sunlab|https://github.com/ThomasGsp/sunlab]]&lt;br /&gt;
&lt;br /&gt;
__Le code est divisé en quatre grande parties:__&lt;br /&gt;
&lt;br /&gt;
  * Le &amp;quot;common&amp;quot;, le code sert de base fonctionnelle aux trois autres.&lt;br /&gt;
  * La partie &amp;quot;door&amp;quot;, comprenant le code spécifique pour la porte.&lt;br /&gt;
  * La partie &amp;quot;nfc&amp;quot;, pour le nfc.&lt;br /&gt;
  * La partie &amp;quot;register&amp;quot; pour l'enregistrement de présence.&lt;br /&gt;
&lt;br /&gt;
__Afin d'accélérer le développement, le code est basé sur plusieurs tierces parties:__&lt;br /&gt;
&lt;br /&gt;
  * PHPMailer pour l'envoi des email.&lt;br /&gt;
  * Bootstrap pour le CSS/HTML.&lt;br /&gt;
  * PHP-Login pour la base php/js/mysql ( [[https://github.com/fethica/PHP-Login/tree/master/login|https://github.com/fethica/PHP-Login/tree/master/login]] ).&lt;br /&gt;
}}&lt;br /&gt;
{{Tuto Step&lt;br /&gt;
|Step_Title=Hardware&lt;br /&gt;
|Step_Content=* Un raspberry pi équipé (alimentation, carte SD, boitier).&lt;br /&gt;
  * Un lecteur NFC compatible (type: [[https://www.amazon.fr/Lecteur-Proximit%C3%A9-125KHz-Contr%C3%B4le-S%C3%A9curit%C3%A9/dp/B00HSDOTTU/ref=sr_1_5?ie=UTF8&amp;amp;qid=1480970036&amp;amp;sr=8-5&amp;amp;keywords=nfc+reader|https://www.amazon.fr/Lecteur-Proximit%C3%A9-125KHz-Contr%C3%B4le-S%C3%A9curit%C3%A9/dp/B00HSDOTTU/ref=sr_1_5?ie=UTF8&amp;amp;qid=1480970036&amp;amp;sr=8-5&amp;amp;keywords=nfc+reader]]&lt;br /&gt;
  * Tablette tactile (optionnel)&lt;br /&gt;
}}&lt;br /&gt;
{{Tuto Step&lt;br /&gt;
|Step_Title=Installation et configuration&lt;br /&gt;
|Step_Content=* Préparer une installation propre de Raspbian sur un raspberry&lt;br /&gt;
  * Installer les suites de logiciels suivants avec les configurations associés&lt;br /&gt;
}}&lt;br /&gt;
{{Tuto Step&lt;br /&gt;
|Step_Title=Stack web: apache2, php, mysql&lt;br /&gt;
|Step_Content=&amp;lt;code&amp;gt;&lt;br /&gt;
#  Installation des paquets debian pour squeeze/Debian 8&lt;br /&gt;
apt-get install apache2 mysql-server php5 libapache2-mod-php5 php-curl php5-ldap  php5-mysql&lt;br /&gt;
&lt;br /&gt;
#  Installation des paquets debian pour stretch/Debian 9.1&lt;br /&gt;
apt install mariadb-server apache2 php libapache2-mod-php php-ldap php-mysql&lt;br /&gt;
&lt;br /&gt;
# Configuration sécurité apache:&lt;br /&gt;
vi /etc/apache2/conf-enabled/security.conf&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
ServerSignature Off&lt;br /&gt;
&lt;br /&gt;
#  VHOST apache:&lt;br /&gt;
vi /etc/apache2/sites-available/sunlab.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
        ServerName porte.sunlab.org&lt;br /&gt;
        ServerAdmin webmaster@localhost&lt;br /&gt;
        DocumentRoot /var/www/sunlab/door&lt;br /&gt;
        &amp;lt;Directory /var/www/sunlab/door&amp;gt;&lt;br /&gt;
          Options -Indexes&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
        ErrorLog ${APACHE_LOG_DIR}/porte_error.log&lt;br /&gt;
        CustomLog ${APACHE_LOG_DIR}/porte_access.log combined&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
        ServerName presence.sunlab.org&lt;br /&gt;
        ServerAdmin webmaster@localhost&lt;br /&gt;
        DocumentRoot /var/www/sunlab/register&lt;br /&gt;
        &amp;lt;Directory /var/www/sunlab/register&amp;gt;&lt;br /&gt;
                Options -Indexes&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
        ErrorLog ${APACHE_LOG_DIR}/presence_error.log&lt;br /&gt;
        CustomLog ${APACHE_LOG_DIR}/presence_access.log combined&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
        ServerName nfc.sunlab.org&lt;br /&gt;
        ServerAdmin webmaster@localhost&lt;br /&gt;
        DocumentRoot /var/www/sunlab/nfc&lt;br /&gt;
        &amp;lt;Directory /var/www/sunlab/nfc&amp;gt;&lt;br /&gt;
                Options -Indexes&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
        ErrorLog ${APACHE_LOG_DIR}/nfc_error.log&lt;br /&gt;
        CustomLog ${APACHE_LOG_DIR}/nfc_access.log combined&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#  Configuration MYSQL:&lt;br /&gt;
# Se connecter à mysql, créer une base avec un utilisateur associé:&lt;br /&gt;
CREATE DATABASE sunlab;&lt;br /&gt;
CREATE USER 'sunlab'@'localhost' IDENTIFIED BY 'definir_ici_un_mot_de_passe';&lt;br /&gt;
GRANT ALL PRIVILEGES ON sunlab.* TO 'sunlab'@'localhost';&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
# Le schéma de la base est disponible dans SUNLAB/DOC/DATABASE.sql&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restaurer la base à partir de fichiers physiques :&lt;br /&gt;
&lt;br /&gt;
  * https://stackoverflow.com/questions/484750/restoring-mysql-database-from-physical-files&lt;br /&gt;
  * https://biolinh.wordpress.com/2017/04/01/restoring-mysql-database-from-physical-files-debianubuntu/&lt;br /&gt;
}}&lt;br /&gt;
{{Notes}}&lt;br /&gt;
{{Tuto Status}}&lt;/div&gt;</summary>
		<author><name>Tguiseppin</name></author>	</entry>

	</feed>