Installation de Wallabag

Installation de Wallabag.
Avec l’aide de Valère ! 😉
Distribution : OS : Debian 8 64 bits (HVM)
I) Installation de Nginx + Php
1) Mise-à-jour de la distribution :

root@server01:~# apt-get update
root@server01:~# apt-get upgrade

2) Installation des paquets de base :

root@server01:~# apt-get install mc links htop screen vim curl git-core wget

3) Installation de MySql :

root@server01:~# apt-get install mysql-server mysql-client

4) Installation du Nginx :

root@server01:~# apt-get install nginx

http://217.70.190.39/
5) Installation de Php5 :

root@server01:~# apt-get install php5-mysql php-apc php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-sqlite php5-xmlrpc php5-xsl php5-curl php5-sqlite php5-fpm php5-cli php5-mysql php5-mcrypt php5-tidy

6) Installation de PhpMyAdmin :

root@server01:~# apt-get install phpmyadmin

Ne pas configurer le serveur Apache et Lighttpd
7) Configuration de Nginx pour PhpMyAdmin :
Ouvrir :

/etc/nginx/sites-available/default

Chercher :

server {
...
        location / {
        ...
        }

Ajouter après :

        location /phpmyadmin {
            root /usr/share/;
            index index.php index.html index.htm;
            location ~ ^/phpmyadmin/(.+\.php)$ {
                try_files $uri =404;
                root /usr/share/;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
            }
            location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                root /usr/share/;
            }
        }

Action :

service nginx reload

Test :
http://217.70.190.39/phpmyadmin/
8) Configuration :
Ouvrir:

/etc/nginx/sites-available/default

Chercher :

index index.html index.htm index.nginx-debian.html;

Remplacer par :

index index.php index.html index.htm index.nginx-debian.html;

Chercher :

server_name _;

Remplacer par :

server_name wallabag.nekrocite.info;

Chercher :

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #       fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        #
        #       # With php5-cgi alone:
        #       fastcgi_pass 127.0.0.1:9000;
        #       # With php5-fpm:
        #       fastcgi_pass unix:/var/run/php5-fpm.sock;
        #       fastcgi_index index.php;
        #       include fastcgi_params;
        #}

Remplacer par :

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }

Chercher :

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}

Remplacer par :

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
               deny all;
        }

Ouvrir :

/etc/php5/fpm/php.ini

Chercher :

;cgi.fix_pathinfo=1

Remplacer par :

cgi.fix_pathinfo=0

9) Recharger php5 :

root@server01:~# service php5-fpm reload

10) Vérification :
Ouvrir

/var/www/html/info.php

Ajouter :


11) Vérification du fichier de configuration :

root@server01:~# nginx -t

12) Redémarrer Nginx :

root@server01:~# systemctl reload nginx

13) Test :
http://217.70.190.39/info.php
II) Installation de Wallabag
1) Installation de Composer :

root@server01:~# curl -s http://getcomposer.org/installer | php
root@server01:~# mv composer.phar /usr/local/bin/composer

2) Installation du code source de Wallabag :

root@server01:~# cd /var/www/
root@server01:/var/www# git clone https://github.com/wallabag/wallabag.git
root@server01:/var/www# cd wallabag
root@server01:/var/www/wallabag# git checkout 2.0.5

3) Configuration de Wallabag :
A Faire configuration avec MySql.

root@server01:/var/www/wallabag# SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
Some parameters are missing. Please provide them.
...
database_driver (pdo_sqlite):
database_host (127.0.0.1):
database_port (null):
database_name (symfony): wallabag
database_user (root):
database_password (null): mot2passe
database_path ('%kernel.root_dir%/../data/db/wallabag.sqlite'):
database_table_prefix (wallabag_):
mailer_transport (smtp):
mailer_host (127.0.0.1):
mailer_user (null):
mailer_password (null):
locale (en): fr
secret (ovmpmAWXRCabNlMgzlzFXDYmCFfzGv):
twofactor_auth (true):
twofactor_sender (no-reply@wallabag.org):
fosuser_confirmation (true):
from_email (no-reply@wallabag.org):
...

4) Installation des composants :

root@server01:/var/www/wallabag# php bin/console wallabag:install --env=prod
...
Step 3 of 5. Administration setup.
Would you like to create a new admin user (recommended) ? (Y/n)
Username (default: wallabag) :
Password (default: wallabag) : 
Email:lesanglierdesardennes@gmail.com
...

5) Changement de permission :

root@server01:/var/www/wallabag# chown -R www-data:www-data /var/www/wallabag/var
root@server01:/var/www/wallabag# chown -R www-data:www-data /var/www/wallabag/bin/
root@server01:/var/www/wallabag# chown -R www-data:www-data /var/www/wallabag/app/config/
root@server01:/var/www/wallabag# chown -R www-data:www-data /var/www/wallabag/vendor/
root@server01:/var/www/wallabag# chown -R www-data:www-data /var/www/wallabag/data/

6) Sauvegarde du fichier ‘block server’ par défaut :

root@server01:/var/www/wallabag# cd /etc/nginx/sites-enabled/
root@server01:/etc/nginx/sites-enabled# mv default ~/defaut.bak

7) Configuration du ‘block server’ pour Wallabag :
Ouvrir ;

wallabag

Ajouter :

server {
    server_name wallabag.nekrocite.info;
    root /var/www/wallabag/web;
    location / {
        try_files $uri /app.php$is_args$args;
    }
    location ~ ^/app\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME  $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        internal;
    }
    error_log /var/log/nginx/wallabag_error.log;
    access_log /var/log/nginx/wallabag_access.log;
}

8) Vérification et redémarrage de Nginx :

root@server01:/etc/nginx/sites-enabled# nginx -t
root@server01:/etc/nginx/sites-enabled# service nginx restart

9) Test :
http://wallabag.nekrocite.info/
10) Lien :
http://doc.wallabag.org/en/master/user/installation.html#virtual-hosts

Comments are closed, but trackbacks and pingbacks are open.