SeaFile

De OpenWikiBSD
Aller à : navigation, rechercher

Marre des clés USB ? Refus de DropBox et ICloud pour des raisons de vie privée ? Régalé de la clôture de UbuntuOne ?


Montez votre cloud de stockage à vous :

Installation du serveur

apt-get install python2.7 python-setuptools python-simplejson python-imaging python-mysqldb mysql-server
wget --no-check-certificate https://bitbucket.org/haiwen/seafile/downloads/seafile-server_4.0.5_x86-64.tar.gz
tar zxvf seafile-server_4.0.5_x86-64.tar.gz 
mv seafile-server-4.0.5/ seafile-server
mv seafile-server /opt/
cd /opt/seafile-server/
./setup-seafile-mysql.sh 
./seafile.sh start
./seahub.sh start


Installation& Configuration du client

Linux Debian

apt-get install libjansson4
dpkg -i Téléchargements/seafile_4.0.6_amd64.deb 

récupéré sur le site .

Chiffrement des communications

La doc officielle

apt-get install  nginx
cd /etc/ssl
openssl genrsa -out privkey.pem 1024
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095

Modifier /etc/ngnx/nginx.conf comme indiqué dans la doc : Ajouter, à la fin (juste avant la dernière parenthèse, par défaut sous Debian :)

   server {
       listen       80;
       server_name  FQDN;
       rewrite ^ https://$http_host$request_uri? permanent;    # force redirect http to https
   }
   server {
       listen 443;
       ssl on;
       ssl_certificate /etc/ssl/cacert.pem;            # path to your cacert.pem
       ssl_certificate_key /etc/ssl/privkey.pem;    # path to your privkey.pem
       server_name FQDN;
       location / {
           fastcgi_pass    127.0.0.1:8000;
           fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
           fastcgi_param   PATH_INFO           $fastcgi_script_name;
           fastcgi_param   SERVER_PROTOCOL    $server_protocol;
           fastcgi_param   QUERY_STRING        $query_string;
           fastcgi_param   REQUEST_METHOD      $request_method;
           fastcgi_param   CONTENT_TYPE        $content_type;
           fastcgi_param   CONTENT_LENGTH      $content_length;
           fastcgi_param   SERVER_ADDR         $server_addr;
           fastcgi_param   SERVER_PORT         $server_port;
           fastcgi_param   SERVER_NAME         $server_name;
           fastcgi_param   HTTPS               on;
           fastcgi_param   HTTP_SCHEME         https;
           access_log      /var/log/nginx/seahub.access.log;
           error_log       /var/log/nginx/seahub.error.log;
                      }
       location /seafhttp {
           rewrite ^/seafhttp(.*)$ $1 break;
           proxy_pass http://127.0.0.1:8082;
           client_max_body_size 0;
           proxy_connect_timeout  36000s;
           proxy_read_timeout  36000s;
                       }
       location /media {
           root /opt/seafile-server/seahub;
                       }
       }


Modifiez /opt/ccnet/ccnet.conf

SERVICE_URL = https://FQDN:8000

Ajoutez aussi

echo "FILE_SERVER_ROOT = 'https://www.yourdomain.com/seafhttp'" >>  /opt/seahub_settings.py
./seafile.sh stop
./seahub.sh stop
./seafile.sh start
./seahub.sh start-fastcgi 

Puis, faite un tour sur https://FQDN

Les logs

[1]

Debug

[2]

Le service de courrier n'est pas configuré correctement

[3]

Ajouter à la fin de /opt/seafile-server/seahub/seahub/settings.py

EMAIL_USE_TLS = True
EMAIL_HOST = 'VotreSmartHost'
EMAIL_PORT = '25'
DEFAULT_FROM_EMAIL = 'SeaFile@Domaine'

Et redémarrez seahub