[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
fr:howtos:network_services:weave [2013/03/29 12:49 (UTC)] desideriusfr:howtos:network_services:weave [2013/04/02 11:14 (UTC)] desiderius
Ligne 17: Ligne 17:
      * python 2.6 ( fait partie de Slackware 13.37. Je n'ai pas testé sur Slackware 14 qui a pris python 2.7)      * python 2.6 ( fait partie de Slackware 13.37. Je n'ai pas testé sur Slackware 14 qui a pris python 2.7)
      * sqlite3 (fait également partie de Slackware 13.37.)      * sqlite3 (fait également partie de Slackware 13.37.)
-     * [[http://www.virtualenv.org/|virtualenv]]. Les paquetages Slackware packages peuvent être téléchargés ici: [[http://slackware.com/~alien/slackbuilds/virtualenv/|http://slackware.com/~alien/slackbuilds/virtualenv/]] ou peuvent être créés en utilisant [[http://slackbuilds.org/python/virtualenv/|script SlackBuilds.org]] .+     * [[http://www.virtualenv.org/|virtualenv]]. Les paquetages Slackware packages peuvent être téléchargés ici: [[http://slackware.com/~alien/slackbuilds/virtualenv/|http://slackware.com/~alien/slackbuilds/virtualenv/]] ou peuvent être créés en utilisant ce [[http://slackbuilds.org/python/virtualenv/|script SlackBuild]] .
  
-Installer le paquetage virtualenv n'est pas vraiment nécessaire puisqu'il sera automatiquement téléchargé durant la commande “''make build''” qui vous allez utiliser à la prochaine étape de la procédure.+Installer le paquetage virtualenv n'est pas vraiment nécessaire puisqu'il sera automatiquement téléchargé durant la commande “''make build''” que vous allez utiliser à la prochaine étape de la procédure.
  
 Le code du serveur de synchronisation (Sync Server) est hébergé sur un dépôt Mercurial et comme Slackware est livré avec un client Mercurial, ce code est facile à télécharger dans un répertoire local où vous continuerez à construire le binaire du serveur: <code> Le code du serveur de synchronisation (Sync Server) est hébergé sur un dépôt Mercurial et comme Slackware est livré avec un client Mercurial, ce code est facile à télécharger dans un répertoire local où vous continuerez à construire le binaire du serveur: <code>
Ligne 26: Ligne 26:
 $ hg clone https://hg.mozilla.org/services/server-full/ . $ hg clone https://hg.mozilla.org/services/server-full/ .
 $ make build $ make build
-</code> Now, this server is ready to run, but unless you make some configuration changes it is not going to do much good:+</code> 
  
-  By defaultthe server stores your sync data in a sqlite database (you can use a real MySQL server database if you want), but it will create the sqlite database in ''/tmp'' which is entirely inappropriateFurther down you will find what you have to modify so that your clients’ sync data go somewhere less “volatile”. +Maintenant, ce serveur est prêt à tourner, mais si vous ne faites pas quels changement dans sa configuration, il ne tournera pas bien : 
-  * The python-based Sync Server can run all by itself on a configurable port number (5000 by defaultwhich is just fine if you are its only user in your little LANBut even Mozilla advises to put a real webserver between you and the Sync ServerIn Slackware you can use the apache webserver for thisYou must install an additional apache module for this to work: [[http://code.google.com/p/modwsgi/|mod_wsgi]]. Slackware packages can be downloaded here: [[http://slackware.com/~alien/slackbuilds/mod_wsgi/|http://slackware.com/~alien/slackbuilds/mod_wsgi/]] .+ 
 +  Par défautle serveur stocke vos données de synchronisation dans une base sqlite(vous pouvez utiliser une réelle base de données MySQL si vous voulez), mais il va créer cette base sqlite dans ''/tmp'' ce qui n'est pas du tout adapté.Un peu plus loin, vous trouverez qu'il faut modifier cet emplacement afin que les données de synchronisation de vos clients soient stockés dans un endroit moins “volatile”. 
 +  * Le serveur de synchronisation en Python peut tourner en standalone sur un port (500 par défautqui sera parfait si vous êtes le seul utilisateur dans votre petit réseau localMais même Mozilla vous conseille de positionner un vrai serveur Web entre vous et le serveur de synchronisationAvec Slackware vous pouvez utiliser le serveur Apache pour faire çaIl faut installer un module apache supplémentaire pour que cela puisse marcher : [[http://code.google.com/p/modwsgi/|mod_wsgi]]. Les paquetages Slackware peuvent être téléchargés ici :[[http://slackware.com/~alien/slackbuilds/mod_wsgi/|http://slackware.com/~alien/slackbuilds/mod_wsgi/]] .
  
 ===== Configuration ===== ===== Configuration =====
  
-  * Create a separate system user and group (''weave:sync''which is going to run the Sync Server so that it can not interfere with Apache if anything goes crazy: <code>+  * Créer un utilisateur et un groupe séparés (''weave:sync''qui fera tourner le serveur de synchronisation de façon à ce qu'il n'interfère pas avec Apache si quelque chose se passez mal: <code>
 # groupadd sync # groupadd sync
 # useradd -g sync weave # useradd -g sync weave
-</code> If you omitted the creation of the home directory for this “''weave''” user accountthen create it like this: <code>+</code> Si vous avez oublié de créer le home directory de l'utilisateur  “''weave''” , créez le de cette façon <code>
 # mkdir /home/weave # mkdir /home/weave
 # chown weave:sync /home/weave # chown weave:sync /home/weave
Ligne 42: Ligne 44:
 </code> </code>
  
-  * Create a new file "''/etc/httpd/extra/httpd-wsgi.conf''" with the following content (adapt to your actual sync server hostname): <code>+  * Créer un nouveau fichier "''/etc/httpd/extra/httpd-wsgi.conf''" avec le contenu suivant (adaptez a votre propre serveur): <code>
     <Directory /usr/local/server-full>     <Directory /usr/local/server-full>
       Order deny,allow       Order deny,allow
Ligne 58: Ligne 60:
       ErrorLog  /var/log/httpd/sync.myserver.net-error.log       ErrorLog  /var/log/httpd/sync.myserver.net-error.log
     </VirtualHost>     </VirtualHost>
-</code> This tells apache that a script called “sync.wsgi” is going to be spawned as user “weave:sync” whenever a client connects to %%http://sync.myserver.net/%% .+</code> Cela indique à Apache qu'un script appelé “sync.wsgi” est prêt à être lancé sous l'identité “weave:sync” dès qu'un client se connectera à %%http://sync.myserver.net/%% .
  
-  * Modify your apache server's main configuration file "''/etc/httpd/httpd.conf''", in order to make it load the mod_wsgi module and use its configuration fileAdd the following lines to the ''httpd.conf'': <code>+  * Modifiez la configuration principale de votre serveur Apache "''/etc/httpd/httpd.conf''", pour lui demander de charger le module mod_wsgi et son fichier de configuration. Ajoutez les lignes suivantes à ''httpd.conf'': <code>
     # Activate the WSGI module (serving python binaries to the web):     # Activate the WSGI module (serving python binaries to the web):
     Include /etc/httpd/extra/mod_wsgi.conf     Include /etc/httpd/extra/mod_wsgi.conf
Ligne 67: Ligne 69:
 </code> </code>
  
-  * Check your Apache configuration for syntax errors which you may have introduced: <code>+  * Vérifiez la configuration d'Apache au cas où vous ayiez introduit des erreurs de syntaxe: <code>
 # apachectl configtest # apachectl configtest
 </code> </code>
  
-  * Restart Apache: <code>+  * Redémarrez Apache: <code>
 # /etc/rc.d/rc.httpd stop # /etc/rc.d/rc.httpd stop
 # pause 3 # pause 3
Ligne 78: Ligne 80:
 </code> </code>
  
-  * Configure the Sync Server configuration files+  * Configurer les fichiers de configuration du serveur de synchronisation
-    * Inside the directory "''/usr/local/server-full''" (where the Sync Server code has been downloaded and built if you followed this HOWTO to the letteryou will find the aforementioned "''sync.wsgi''" scriptOpen the file in an editorRead through the file and change it to something which you find better suitedFor instancechange "''/tmp''" to "''/var/tmp''" in the line "''os.environ['PYTHON_EGG_CACHE'] = ‘/tmp/python-eggs’''": <code>+    * A l'intérieur du répertoire "''/usr/local/server-full''"où le serveur de synchronisation a été téléchargé et construit si vous avez suivi ce HOwTO à la lettrevous trouverez le script "''sync.wsgi''" mentionné ci dessusOuvrez le fichier dans un éditeurLisez le fichier et changez ce qui vous semble bienPar exemple changez "''/tmp''" en "''/var/tmp''" dans la ligne "''os.environ['PYTHON_EGG_CACHE'] = ‘/tmp/python-eggs’''": <code>
 os.environ['PYTHON_EGG_CACHE'] = '/tmp/python-eggs' os.environ['PYTHON_EGG_CACHE'] = '/tmp/python-eggs'
-</code> changes to  <code>+</code> devient <code>
 os.environ['PYTHON_EGG_CACHE'] = '/var/tmp/python-eggs' os.environ['PYTHON_EGG_CACHE'] = '/var/tmp/python-eggs'
 </code> </code>
-    * Nextedit the file "''development.ini''" (that filename is configured in "''sync.wsgi''" in case you want to use another name). In that file change the location of the error logfile so that it is created in "''/var/tmp''"The line <code>+    * Puiseditez le fichier "''development.ini''" (ce nom de fichier est configuré dans "''sync.wsgi''" si vous voulez le changer). Dans ce fichier, changez l'emplacement du fichier d'erreurs pour qu'il soit crée dans ''/var/tmp''"La ligne <code>
 args = (‘/tmp/sync-error.log’,) args = (‘/tmp/sync-error.log’,)
-</code> changes to: <code>+</code> devient: <code>
 args = ('/var/tmp/sync-error.log',) args = ('/var/tmp/sync-error.log',)
 </code> </code>
-    * The "''development.ini''" file also mentions the name of the actual sync configuration file "etc/sync.conf"Note that this path is relative to the Weave server’s root directoryIt requires some editingFor instancecreate the SQL database file in the "''weave''" user’s own home directoryThe line <code>+    * Le fichier ''development.ini''" indique également où se trouve le fichier actuel de synchronisation "etc/sync.conf"Faites attention que ce chemin est relatif par rapport au répertoire racine du serveur Weave. Il faut l'éditerPar exemplecréer la base de données SQL dans le home directory de l'utilisateur "''weave''"La ligne <code>
 sqluri = sqlite:////tmp/test.db sqluri = sqlite:////tmp/test.db
-</code> becomes: <code>+</code> devient: <code>
 sqluri = sqlite:////home/weave/my_weave_server.db sqluri = sqlite:////home/weave/my_weave_server.db
-</code> The default value for the quota assigned to each sync account is too low (it’s set to MB)Mozilla states that 99.9% of all clients which connect to its public server use less than 25 MB of quota, so use that value as a defaultThe line <code>+</code> La valeur par défaut du quota affecté à chaque utilisateur de synchronisation est trop faible (c'est Mo)Mozilla a constaté que 99,9% de tous les clients qui se connectent à ses serveurs publics utilisent moins de 25 Mo de quota, aussi vous pouvez utiliser cette valeur par défautLa ligne <code>
 quota_size = 5120 quota_size = 5120
-</code> changes to: <code>+</code> devient: <code>
 quota_size = 25600 quota_size = 25600
-</code> Thenlook for the following line and make absolutely certain that it is changed to the Apache %%http://%% URL of your Sync Server, i.e. the URL that the sync clients are going to use: <code> +</code>  
-fallback_node = http://localhost:5000/ +Puischerchez la ligne suivante et assurez-vous qu'elle a bien pris en compte le serveur Apache %%http://%% URL de votre serveur de synchronisation, i.e. l'URL que les clients de votre serveur de synchronisation vont utiliser : <code> fallback_node = http://localhost:5000/ 
-</code> You can play with other options in this file to see what they can offerFor instanceyou can disable "//captcha//" and not enable SSL, but you may decide that this is important to your setup. +</code> Vous pouvez essayer d'autres options dans ce fichier pour voir ce qu'elles vous proposentPar exemplevous pouvez désactiver "//captcha//" et ne pas activer SSL, mais c'est à vous de voir ce qui est important pour votre installation.
- +
-<note important>Don’t forget to restart your apache server if you have not yet done so.</note>+
  
-===== USing the Sync Server =====+<note important>N'oubliez pas de redémarrer votre serveur Apache si vous ne l'avez pas déjà fait.</note>
  
-And now it is time to tell your Firefox browser to use this new service!+===== Utiliser le serveur de synchronisation =====
  
-  * Select “Tools > Setup sync ...”: {{ :howtos:weave:ff_sync_01.png }}+Et maintenant, il est temps de demander à votre navigateur Firefox d'utiliser ce nouveau service!
  
-  * In case this is the first time you talk to your Sync Serveryou need to setup an account, so click the button “''Create a New Account''“. This opens a new dialog box where you can type your email address (this will become your account name), an associated password and then in the dropdown menu, do **not** select "''Firefox Sync Server''"Insteadyou choose "''Use a custom server''"This allows you to enter the URL for your brand-new private Sync Server. \\  Once the account has been created, Firefox will show you the sync key it will be using to encrypt your dataThat key is important, you will need it if you want to add more computers to your sync account. \\ And that’s basically it – the sync process will start immediately: {{ :howtos:weave:ff_sync_02.png }}+  * Sélectionnez “Outils > Configurer Sync...”: {{ :howtos:weave:ff_sync_01.png }} 
 +  * Si c'est la première fois que vous vous connectez à votre serveur de syncronisationil faut créer un compte ; cliquer sur le bouton “''Créer un nouveau compte''“. Ceci ouvre une boite de dialogues où vous entrez votre adresse de courrier électronique qui deviendra le "nom" de votre compte ), un mot de passe associé, puis dans le menu “''Serveur'', **ne** choisissez **pas** la valeur par défaut "''serveur Mozilla Firefox Sync''".A la placesélectionnez "''Utiliser un serveur personnalisé'"Cela vous permet d'entre l'URL de votre nouveau serveur privé de synchronisation. \\ Une fois le compte créé, Firefox vous montrera la clé de synchronisation qu'il va utiliser pour encrypter vos donnéesCette clé est **importante** car vous en aurez besoin pour ajouter d'autres appareils à votre compte de synchronisation. \\ Et c'est tout - le processus de synchronisation démarrera instantanément {{ :howtos:weave:ff_sync_02.png }}  
 +  * Ou bien si vous avez déjà un compte de synchronisation et que vous voulez ajouter une second appareil à ce compte, vous pouvez cliquer sur “''J'ai un compte''” sur la première fenêtre de dialogue. Il y a deux façons d'ajouter cet appareil a votre compte de synchronisation existant 
 +* Soit vous entrez le code qui vous est montré sur un autre appareil déjà synchronisé avec le serveur; 
 +    * Ou alors vous cliquer sur “''Je n'ai pas l'appareil avec moi''“.C'est ce que vous ferez la plupart du temps. C'est agaçant de devoir chercher un autre ordinateur ou smartphone si tout ce dont vous avez besoin est votre clé de synchronisation {{ :howtos:weave:ff_sync_03.png }}
  
-  * Else if you already have a Sync Account and want to add a second computer to it, you can click on “''Connect''” in the first dialog which will open a new dialog. There are two ways to add this computer to your existing sync account: 
-    * Either you enter the code which is being shown on another computer which is already syncing to the server; 
-    * Or else you click on “''I don’t have the device with me''“. This is what you would usually do. It is cumbersome to search for another computer or hand-held if all you need to know is your sync key: {{ :howtos:weave:ff_sync_03.png }} 
  
   * If you know your sync key you can enter that in the following dialog, along with your account details and the server URL: {{ :howtos:weave:ff_sync_04.png }}   * If you know your sync key you can enter that in the following dialog, along with your account details and the server URL: {{ :howtos:weave:ff_sync_04.png }}
 fr:howtos:network_services:weave ()