Skip to content

Wallabag

Installation des paquets

apt install sudo wget curl php7.3 php-session php-ctype php-dom php-hash php-simplexml php-json php-gd php-mbstring php-xml php-tidy php-iconv php-curl php-gettext php-tokenizer php-bcmath php-intl php-fpm  make g++ gcc

Installation du paquet pour la base

choix entre :

  • php7.3-mysql
  • php7.3-sqlite3
  • php7.3-pgsql

Installation de composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Déplacement du binaire dans /usr/loca/bin

mv composer.phar /usr/local/bin/composer

Création de la base (mysql ici)

CREATE DATABASE wallabag CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON wallabag.* to 'wallabag'@'localhost' IDENTIFIED BY 'wallabag';
FLUSH PRIVILEGES;
\q

Installation de Wallabag

git clone https://github.com/wallabag/wallabag.git /var/www/wallabag
useradd wallabag -m -d /home/wallabag -s /bin/bash
cd /var/www/wallabag && sudo -u wallabag make install

répondez au question en fonction de votre configuration

a2enmod proxy_fcgi setenvif && a2enconf php7.3-fpm
systemctl reload apache2

Vhost apache

vim /etc/apache2/sites-available/wallabag.conf
<VirtualHost *:80>
    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/wallabag/web
    <Directory /var/www/wallabag/web>
        Require all granted

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ app.php [QSA,L]
        </IfModule>
    </Directory>

    # uncomment the following lines if you install assets as symlinks
    # or run into problems when compiling LESS/Sass/CoffeScript assets
    # <Directory /var/www/wallabag>
    #     Options FollowSymlinks
    # </Directory>

    # optionally disable the RewriteEngine for the asset directories
    # which will allow apache to simply reply with a 404 when files are
    # not found instead of passing the request into the full symfony stack
    <Directory /var/www/wallabag/web/bundles>
        <IfModule mod_rewrite.c>
            RewriteEngine Off
        </IfModule>
    </Directory>
    ErrorLog /var/log/apache2/wallabag_error.log
    CustomLog /var/log/apache2/wallabag_access.log combined
</VirtualHost>

Activation du vhost + droits www-data sur les répertoires

a2ensite wallabag
chown -R www-data:www-data /var/www/wallabag/var
chown -R www-data:www-data /var/www/wallabag/bin
chown -R www-data:www-data /var/www/wallabag/app/config
chown -R www-data:www-data /var/www/wallabag/vendor
systemctl reload apache2