]> git.immae.eu Git - github/wallabag/wallabag.git/blob - docs/fr/user/installation.rst
Prepare release 2.0.2
[github/wallabag/wallabag.git] / docs / fr / user / installation.rst
1 Installer wallabag
2 ==================
3
4 Pré-requis
5 ------------
6
7 wallabag est compatible avec PHP >= 5.5, PHP 7 inclus.
8
9 Vous aurez besoin des extensions suivantes pour que wallabag fonctionne. Il est possible que certaines de ces extensions soient déjà activées dans votre version de PHP, donc vous n'avez pas forcément besoin d'installer tous les paquets correspondants.
10
11 - php-session
12 - php-ctype
13 - php-dom
14 - php-hash
15 - php-simplexml
16 - php-json
17 - php-gd
18 - php-mbstring
19 - php-xml
20 - php-tidy
21 - php-iconv
22 - php-curl
23 - php-gettext
24 - php-tokenizer
25
26 wallabag utilise PDO afin de se connecter à une base de données, donc vous aurez besoin d'une extension et d'un système de bases de données parmi :
27
28 - pdo_mysql
29 - pdo_sqlite
30 - pdo_pgsql
31
32 Installation
33 ------------
34
35 wallabag utilise un grand nombre de bibliothèques pour fonctionner. Ces bibliothèques doivent être installées à l'aide d'un outil nommé Composer. Vous devez l'installer si ce n'est déjà fait.
36
37 Installation de Composer :
38
39 ::
40
41 curl -s http://getcomposer.org/installer | php
42
43 Vous pouvez trouver des instructions spécifiques `ici (en anglais) <https://getcomposer.org/doc/00-intro.md>`__ :
44
45 Pour installer wallabag, vous devez exécuter ces deux commandes :
46
47 ::
48
49 git clone https://github.com/wallabag/wallabag.git
50 cd wallabag
51 git checkout 2.0.2
52 SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
53 php bin/console wallabag:install --env=prod
54
55 Pour démarrer le serveur interne à php et vérifier que tout s'est installé correctement, vous pouvez exécuter :
56
57 ::
58
59 php bin/console server:run --env=prod
60
61 Et accéder wallabag à l'adresse http://lipdevotreserveur:8000
62
63 .. note::
64 Pour définir des paramètres via des variables d'environnement, vous pouvez les spécifier avec le préfixe ``SYMFONY__``. Par exemple, ``SYMFONY__DATABASE_DRIVER``. Vous pouvez lire `documentation Symfony <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__ pour en savoir plus.
65
66 Installation avec Apache
67 ------------------------
68
69 En imaginant que vous vouliez installer wallabag dans le dossier /var/www/wallabag et que vous utilisiez php comme un module Apache, voici un vhost pour wallabag :
70
71 ::
72
73 <VirtualHost *:80>
74 ServerName domain.tld
75 ServerAlias www.domain.tld
76
77 DocumentRoot /var/www/wallabag/web
78 <Directory /var/www/wallabag/web>
79 AllowOverride None
80 Order Allow,Deny
81 Allow from All
82
83 <IfModule mod_rewrite.c>
84 Options -MultiViews
85 RewriteEngine On
86 RewriteCond %{REQUEST_FILENAME} !-f
87 RewriteRule ^(.*)$ app.php [QSA,L]
88 </IfModule>
89 </Directory>
90
91 # uncomment the following lines if you install assets as symlinks
92 # or run into problems when compiling LESS/Sass/CoffeScript assets
93 # <Directory /var/www/wallabag>
94 # Options FollowSymlinks
95 # </Directory>
96
97 # optionally disable the RewriteEngine for the asset directories
98 # which will allow apache to simply reply with a 404 when files are
99 # not found instead of passing the request into the full symfony stack
100 <Directory /var/www/wallabag/web/bundles>
101 <IfModule mod_rewrite.c>
102 RewriteEngine Off
103 </IfModule>
104 </Directory>
105 ErrorLog /var/log/apache2/wallabag_error.log
106 CustomLog /var/log/apache2/wallabag_access.log combined
107 </VirtualHost>
108
109 Après que vous ayez rechargé/redémarré Apache, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld.
110
111 Installation avec Nginx
112 -----------------------
113
114 En imaginant que vous vouliez installer wallabag dans le dossier /var/www/wallabag, voici un fichier de configuration Nginx pour wallabag :
115
116 ::
117
118 server {
119 server_name domain.tld www.domain.tld;
120 root /var/www/wallabag/web;
121
122 location / {
123 # try to serve file directly, fallback to app.php
124 try_files $uri /app.php$is_args$args;
125 }
126 location ~ ^/app\.php(/|$) {
127 fastcgi_pass unix:/var/run/php5-fpm.sock;
128 fastcgi_split_path_info ^(.+\.php)(/.*)$;
129 include fastcgi_params;
130 # When you are using symlinks to link the document root to the
131 # current version of your application, you should pass the real
132 # application path instead of the path to the symlink to PHP
133 # FPM.
134 # Otherwise, PHP's OPcache may not properly detect changes to
135 # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
136 # for more information).
137 fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
138 fastcgi_param DOCUMENT_ROOT $realpath_root;
139 # Prevents URIs that include the front controller. This will 404:
140 # http://domain.tld/app.php/some-path
141 # Remove the internal directive to allow URIs like this
142 internal;
143 }
144
145 error_log /var/log/nginx/wallabag_error.log;
146 access_log /var/log/nginx/wallabag_access.log;
147 }
148
149 Après que vous ayez rechargé/redémarré Nginx, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld.
150
151 .. note::
152
153 Si vous voulez importer un fichier important dans wallabag, vous devez ajouter cette ligne dans votre configuration nginx ``client_max_body_size XM; # allows file uploads up to X megabytes``.