Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.
linux:howto:weave_server [11/03/2010 14:16] gromez créée |
linux:howto:weave_server [27/01/2013 16:25] (Version actuelle) |
||
---|---|---|---|
Ligne 26: | Ligne 26: | ||
<code sql> | <code sql> | ||
CREATE TABLE `users` ( | CREATE TABLE `users` ( | ||
- | id int(11) NOT NULL PRIMARY KEY auto_increment, | + | `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, |
- | username varbinary(32) NOT NULL, | + | `username` varbinary(32) NOT NULL, |
- | md5 varbinary(64) default NULL, | + | `md5` varbinary(64) default NULL, |
- | email varbinary(64) default NULL, | + | `email` varbinary(64) default NULL, |
- | status tinyint(4) default '1', | + | `status` tinyint(4) default '1', |
- | alert text, | + | `alert` text, |
- | reset varchar(32) | + | `reset` varchar(32) |
) ENGINE=InnoDB; | ) ENGINE=InnoDB; | ||
Ligne 61: | Ligne 61: | ||
) ENGINE=InnoDB; | ) ENGINE=InnoDB; | ||
</code> | </code> | ||
+ | |||
+ | **Attention** : il est possible que le schéma de base de données évolue au fil du temps, donc il est préférable de jeter un œil au ''README'' fourni avec le serveur. | ||
+ | |||
+ | ===== Installation des fichiers serveur ===== | ||
+ | |||
+ | <code console> | ||
+ | cd /var/www/gromez.fr/weave/ | ||
+ | hg clone http://hg.mozilla.org/labs/weaveserver-sync | ||
+ | hg clone http://hg.mozilla.org/labs/weaveserver-registration | ||
+ | </code> | ||
+ | |||
+ | Dans le répertoire ''/var/www/gromez.fr/weave/'', il devrait maintenant y avoir deux nouveaux répertoires : ''weaveserver-sync'' et ''weaveserver-registration''. | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | ==== Partie «registration» ==== | ||
+ | |||
+ | <code console> | ||
+ | cd /var/www/gromez.fr/weave/weaveserver-registration/1.0/ | ||
+ | cp weave_user_constants.php.dist weave_user_constants.php | ||
+ | </code> | ||
+ | |||
+ | Il ne reste plus qu'à éditer ce fichier ''weave_user_constants.php''. | ||
+ | |||
+ | <code> | ||
+ | {...} | ||
+ | # ***** END LICENSE BLOCK ***** | ||
+ | |||
+ | define('WEAVE_AUTH_ENGINE', 'mysql'); | ||
+ | define('WEAVE_MYSQL_AUTH_HOST', 'localhost'); | ||
+ | define('WEAVE_MYSQL_AUTH_DB', 'weave'); | ||
+ | define('WEAVE_MYSQL_AUTH_USER', 'weave'); | ||
+ | define('WEAVE_MYSQL_AUTH_PASS', 'weave'); | ||
+ | |||
+ | define('WEAVE_SHA_SALT', 'tatayoyo'); | ||
+ | |||
+ | define('WEAVE_REGISTER_USE_CAPTCHA', 1); | ||
+ | define('RECAPTCHA_PUBLIC_KEY', 'votre_cle_publique_chez_recaptcha.net'); | ||
+ | define('RECAPTCHA_PRIVATE_KEY', 'votre_cle_privee_chez_recaptcha.net'); | ||
+ | |||
+ | define('WEAVE_PASSWORD_RESET_EMAIL', 'admin@gromez.fr'); | ||
+ | |||
+ | #engine for auth | ||
+ | {...} | ||
+ | </code> | ||
+ | |||
+ | ==== Partie «sync» ==== | ||
+ | |||
+ | <code console> | ||
+ | cd /var/www/gromez.fr/weave/weaveserver-sync/1.0/ | ||
+ | cp default_constants.php.dist default_constants.php | ||
+ | </code> | ||
+ | |||
+ | Il ne reste plus qu'à éditer ce fichier ''default_constants.php''. | ||
+ | |||
+ | <code> | ||
+ | {...} | ||
+ | # ***** END LICENSE BLOCK ***** | ||
+ | |||
+ | define('WEAVE_STORAGE_ENGINE', 'mysql'); | ||
+ | |||
+ | define('WEAVE_MYSQL_STORE_READ_HOST', 'localhost'); | ||
+ | define('WEAVE_MYSQL_STORE_READ_DB', 'weave'); | ||
+ | define('WEAVE_MYSQL_STORE_READ_USER', 'weave'); | ||
+ | define('WEAVE_MYSQL_STORE_READ_PASS', 'weave'); | ||
+ | |||
+ | define('WEAVE_AUTH_ENGINE', 'mysql'); | ||
+ | define('WEAVE_MYSQL_AUTH_HOST', WEAVE_MYSQL_STORE_READ_HOST); | ||
+ | define('WEAVE_MYSQL_AUTH_DB', WEAVE_MYSQL_STORE_READ_DB); | ||
+ | define('WEAVE_MYSQL_AUTH_USER', WEAVE_MYSQL_STORE_READ_USER); | ||
+ | define('WEAVE_MYSQL_AUTH_PASS', WEAVE_MYSQL_STORE_READ_PASS); | ||
+ | |||
+ | define('WEAVE_SHA_SALT', 'tatayoyo'); | ||
+ | |||
+ | #engine for storage. | ||
+ | {...} | ||
+ | </code> | ||
+ | |||
+ | La configuration des fichiers Weave est maintenant terminée. | ||
+ | |||
+ | ===== Configuration Apache ===== | ||
+ | |||
+ | Côté Apache, il faut configurer un VirtualHost qui sera utilisé lorsque l'on interrogera https://weave.gromez.fr/.\\ | ||
+ | Voici un exemple : | ||
+ | |||
+ | <code> | ||
+ | <VirtualHost *:80 *:443> | ||
+ | ServerName weave.gromez.fr | ||
+ | ServerAdmin admin@gromez.fr | ||
+ | |||
+ | ErrorLog /var/log/apache2/gromez.fr/weave.error.log | ||
+ | CustomLog /var/log/apache2/gromez.fr/weave.access.log combined | ||
+ | |||
+ | RewriteEngine On | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | ||
+ | |||
+ | Alias /user/1.0 /var/www/gromez.fr/weave/weaveserver-registration/1.0/index.php | ||
+ | Alias /user/1 /var/www/gromez.fr/weave/weaveserver-registration/1.0/index.php | ||
+ | |||
+ | Alias /misc/1/captcha_html /var/www/gromez.fr/weave/weaveserver-registration/1.0/captcha.php | ||
+ | Alias /misc/1.0/captcha_html /var/www/gromez.fr/weave/weaveserver-registration/1.0/captcha.php | ||
+ | |||
+ | Alias /weave-registration-static /var/www/gromez.fr/weave/weaveserver-registration/1.0/static | ||
+ | Alias /weave-password-reset /var/www/gromez.fr/weave/weaveserver-registration/1.0/forgot_password.php | ||
+ | |||
+ | Alias /1.0 /var/www/gromez.fr/weave/weaveserver-sync/1.0/index.php | ||
+ | |||
+ | <Directory "/var/www/gromez.fr/weave/"> | ||
+ | Options Indexes FollowSymLinks | ||
+ | AllowOverride All | ||
+ | Order allow,deny | ||
+ | Allow from all | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
+ | </code> | ||
+ | |||
+ | Et voilà, le serveur est maintenant installé, il ne reste plus qu'à tester :-) | ||
+ | |||
+ | ===== Configuration des clients ===== | ||
+ | |||
+ | Comme indiqué plus haut, pour le moment, seul //Mozilla Firefox// est compatible Weave.\\ | ||
+ | Pour ce faire, il est nécessaire d'installer l'extension correspondante. | ||
+ | |||
+ | Lien d'installation direct : [[https://addons.mozilla.org/en-US/firefox/downloads/latest/10868?src=installservice|Extension Mozilla Weave]] | ||
+ | |||
+ | Une fois installé, il va maintenant falloir créer un compte.\\ | ||
+ | Il suffit pour cela de cliquer sur le bouton //Create Mozilla Weave Account// et de renseigner l'écran comme ceci : | ||
+ | |||
+ | {{ :linux:howto:create_weave_account.png |Création d'un compte}} | ||
+ | |||
+ | Je ne décrirai pas les étapes suivantes concernant le CAPTCHA, ou encore la façon dont Weave doit synchroniser les données. | ||
+ | |||
+ | |||
+ | ===== Divers ===== | ||
+ | |||
+ | ==== Récupération du mot de passe ==== | ||
+ | |||
+ | Il se peut qu'un utilisateur perde son mot de passe. C'est pourquoi un formulaire de récupération de mot de passe est disponible. | ||
+ | |||
+ | Il suffit de se rendre à cette adresse : [[https://weave.gromez.fr/weave-password-reset]] | ||
+ | |||
+ | {{keywords>mozilla weave sync server howto how to guide tutorial tuto tutoriel}} |