|
|
Diaspora* (Debian Stretch)
|
|
|
=========
|
|
|
|
|
|
## Préparation du système
|
|
|
|
|
|
### Installation des packets
|
|
|
|
|
|
En root:
|
|
|
```
|
|
|
# apt install build-essential cmake libssl-dev libcurl4-openssl-dev libxml2-dev libxslt-dev imagemagick ghostscript curl libmagickwand-dev git libpq-dev redis-server nodejs
|
|
|
```
|
|
|
|
|
|
compléments pour RVM
|
|
|
```
|
|
|
# apt install autoconf automake bison libffi-dev libgdm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev sqlite3 libgmp-dev libreadline-dev
|
|
|
```
|
|
|
|
|
|
### Créer un utilisateur dédié
|
|
|
|
|
|
```
|
|
|
# adduser --disabled-login --home /srv/diaspora diaspora
|
|
|
```
|
|
|
|
|
|
### Installation de la base de donnée (PostgreSQL)
|
|
|
|
|
|
```
|
|
|
# apt install postgresql postgresql-client
|
|
|
# sudo -u postgres psql
|
|
|
# CREATE USER diaspora WITH CREATEDB PASSWORD '<password>';
|
|
|
```
|
|
|
|
|
|
### Installation de RVM (Ruby Version Manager)
|
|
|
|
|
|
Les commandes qui suivent doivent être executée avec l'utilisateur diaspora
|
|
|
```
|
|
|
# su diaspora -s /bin/bash
|
|
|
$ cd ~
|
|
|
```
|
|
|
|
|
|
Installation de RVM:
|
|
|
```
|
|
|
$ curl -L https://s.diaspora.software/1t | bash
|
|
|
```
|
|
|
|
|
|
Ajouter à **~/.bashrc**:
|
|
|
```
|
|
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
|
|
```
|
|
|
|
|
|
Resourcer bashrc
|
|
|
```
|
|
|
source ~/.bashrc
|
|
|
```
|
|
|
|
|
|
Contrôle des dépendances pour ruby:
|
|
|
```
|
|
|
$ rvm autolibs read-fail
|
|
|
```
|
|
|
Installer (en root) tout paquet manquant dans la partie "**Missing required packages**"
|
|
|
|
|
|
Installation de Ruby 2.4
|
|
|
```
|
|
|
$ rvm install 2.4
|
|
|
```
|
|
|
|
|
|
### Installation de Diaspora
|
|
|
|
|
|
Récupération des sources
|
|
|
|
|
|
```
|
|
|
$ cd ~
|
|
|
$ git clone -b master https://github.com/diaspora/diaspora.git
|
|
|
$ cd diaspora
|
|
|
```
|
|
|
|
|
|
Copier les fichiers de configuration
|
|
|
```
|
|
|
$ cp config/database.yml.example config/database.yml
|
|
|
$ cp config/diaspora.yml.example config/diaspora.yml
|
|
|
```
|
|
|
|
|
|
Éditer **config/database.yml** et indiquer les paramètres de connexion à PostgreSQL
|
|
|
|
|
|
```
|
|
|
postgresql: &postgresql
|
|
|
adapter: postgresql
|
|
|
host: "localhost"
|
|
|
port: 5432
|
|
|
username: "diaspora"
|
|
|
password: "<password>"
|
|
|
encoding: unicode
|
|
|
```
|
|
|
|
|
|
Éditer **config/diaspora.yml** et renseigner les paramètres
|
|
|
|
|
|
* configuration
|
|
|
- environment.
|
|
|
+ url: https://your.diaspora.url/
|
|
|
+ certificate_authorities: '/etc/ssl/certs/ca-certificates.crt'
|
|
|
* décommenter
|
|
|
+ require_ssl: true
|
|
|
* décommenter
|
|
|
* server
|
|
|
- listen
|
|
|
+ listen: 'unix:tmp/diaspora.sock'
|
|
|
* décommenter
|
|
|
- rails_environment: 'production'
|
|
|
* settings
|
|
|
- pod_name: "Your pod name"
|
|
|
+ décommenter
|
|
|
- captcha
|
|
|
+ enable: false
|
|
|
* décommenter (problème de compatibilité avec ImageMagick)
|
|
|
- terms:
|
|
|
+ enable: true
|
|
|
* décommenter
|
|
|
+ jurisdiction: "Switzerland"
|
|
|
* source_url: 'https://github.com/diaspora/diaspora'
|
|
|
* mail
|
|
|
- enable: true
|
|
|
+ décommenter
|
|
|
- sender_address: 'no-reply@your-organisation.tld'
|
|
|
- method: 'smtp'
|
|
|
- smtp
|
|
|
+ host: 'mail.infomaniak.com'
|
|
|
+ port: 587
|
|
|
+ authentication: 'plain'
|
|
|
+ username: 'username'
|
|
|
+ password: '<password>'
|
|
|
+ starttls_auto: true
|
|
|
+ domain: 'mail.infomaniak.com'
|
|
|
* admins
|
|
|
- account: "your_admin_account"
|
|
|
- podmin_email: "your admin email" |
|
|
\ No newline at end of file |