]> git.immae.eu Git - github/wallabag/wallabag.git/blame - docs/en/user/installation.rst
Prepare files for 2.0.0-beta.2
[github/wallabag/wallabag.git] / docs / en / user / installation.rst
CommitLineData
e6ebb14f
NL
1Install wallabag
2================
3
4Requirements
5------------
6
89d95cdd
TC
7wallabag is compatible with php >= 5.5
8
9You'll need the following extensions for wallabag to work. Some of these may already activated in your version of php, so you may not have to install all corresponding packages.
10
11- php-session
12- php-ctype
13- php-dom
5dfd321d 14- php-hash
89d95cdd
TC
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
26wallabag uses PDO to connect to database, so you'll need one of:
27
28- php-pdo_mysql
29- php-pdo_sqlite
30- php-pdo_pgsql
31
32and it's corresponding database server.
33
e6ebb14f
NL
34Installation
35------------
36
89d95cdd
TC
37wallabag uses a big number of libraries in order to function. These libraries must be installed with a tool called Composer. You need to install it if you don't already have.
38
e6ebb14f
NL
39Install Composer:
40
41::
42
43 curl -s http://getcomposer.org/installer | php
44
89d95cdd
TC
45You can find specific instructions here : __ https://getcomposer.org/doc/00-intro.md
46
47To install wallabag itself, you must run these two commands:
e6ebb14f
NL
48
49::
50
83be3dc0
NL
51 git clone git@github.com:wallabag/wallabag.git
52 cd wallabag
53 git checkout 2.0.0-beta.2
54 SYMFONY_ENV=prod composer install --no-dev
e6ebb14f 55 php bin/console wallabag:install --env=prod
83be3dc0 56 php bin/console server:run --env=prod
e6ebb14f 57
89d95cdd
TC
58To start php's build-in server and test if everything did install correctly, you can do:
59
60::
61
62 php bin/console server:run --env=prod
63
64And access wallabag at http://yourserverip:8000
65
66Installing on Apache
67--------------------
68
69Assuming you install wallabag in the /var/www/wallabag folder and that you want to use php as an Apache module, here's a vhost for 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
109After reloading or restarting Apache, you should now be able to access wallabag at http://domain.tld.
110
111Installing on Nginx
112-------------------
113
426bfdc3 114Assuming you install wallabag in the /var/www/wallabag folder, here's the recipe for wallabag :
89d95cdd
TC
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
149After reloading or restarting nginx, you should now be able to access wallabag at http://domain.tld.