Installation du partageur d’image Lutim

Installation du partageur d’image Lutim.

Lien :
https://framacloud.org/fr/cultiver-son-jardin/lutim.html

1/ Connexion au conteneur.

util01@station02:~$ ssh -p 9127 administrator@serveurip

2/ Installation des paquets de base.

administrator@Imagin:~$ sudo apt-get install perlmagick carton build-essential libssl-dev zlib1g-dev libldap2-dev libnet-ldap-perl links

3/ Ajout de l’utilisateur ‘lutim’.

administrator@Imagin:~$ sudo adduser lutim
Adding user `lutim' ...
Adding new group `lutim' (1002) ...
Adding new user `lutim' (1002) with group `lutim' ...
Creating home directory `/home/lutim' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for lutim
Enter the new value, or press ENTER for the default
	Full Name []:
	Room Number []:
	Work Phone []:
	Home Phone []:
	Other []:
Is the information correct? [Y/n]
administrator@Imagin:~$

4/ Création du répertoire de l’application.

administrator@Imagin:~$ sudo mkdir -p /var/www/lutim
administrator@Imagin:~$ sudo chown -R lutim:lutim /var/www/lutim
administrator@Imagin:~$ cd /var/www/lutim/
administrator@Imagin:/var/www/lutim$
administrator@Imagin:/var/www/lutim$ su lutim
Password:
lutim@Imagin:/var/www/lutim$

5/ Téléchargement du code source.

lutim@Imagin:/var/www/lutim$ git clone https://framagit.org/luc/lutim.git .

6/ Installation des dépendances Perl.

lutim@Imagin:/var/www/lutim$ carton install

7/ Configuration.

lutim@lutim:/var/www/lutim$ cp lutim.conf.template lutim.conf

Ouvrir :

lutim.conf

Chercher :

# always_encrypt => 0

Remplacer par :

always_encrypt => 1

Chercher :

contact           =>

Remplacer par :

contact           => 'Le Sanglier des Ardennes, lesanglierdesardennes[at]gmail.com',

8/ Lancement de ‘lutim’.

lutim@Imagin:/var/www/lutim$ carton exec hypnotoad script/lutim
Odd number of elements in anonymous hash at (eval 87) line 7.
Odd number of elements in anonymous hash at (eval 309) line 7.
Server available at http://127.0.0.1:8080
lutim@Imagin:/var/www/lutim$
lutim@Imagin:/var/www/lutim$ exit
administrator@Imagin:~$

9/ Installation de ‘nginx’.

administrator@Imagin:~$ sudo apt-get install nginx

10/ Configuration du proxy.

Ouvrir :

/etc/nginx/sites-available/imagin.hacklab.fr

Ajouter :

server {
    listen 80;
    server_name imagin.hacklab.fr;
    root /var/www/lutim/public;
    # Important pour la confidentialité des utilisateurs
    access_log off;
    error_log /var/log/nginx/lutim.error.log;
    # Paramètre important ! À adapter en fonction de la configuration de Lutim
    client_max_body_size 40M;
    location ~* ^/(img|css|font|js)/ {
        try_files $uri @lutim;
        add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT";
        add_header Cache-Control "public, max-age=315360000";
    }
    location / {
        try_files $uri @lutim;
    }
    location @lutim {
        proxy_pass  http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Remote-Port $remote_port;
        proxy_redirect     off;
    }
}

11/ Activation du site web.

administrator@Imagin:~$ sudo ln -s /etc/nginx/sites-available/imagin.hacklab.fr /etc/nginx/sites-enabled/imagin.hacklab.fr

12/ Redémarrage du serveur.

administrator@Imagin:~$ service nginx restart

Comments are closed, but trackbacks and pingbacks are open.