Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes | ||
ports:web:diaspora [2021/09/09 20:15] – [Papoter sur Diaspora] david | ports:web:diaspora [2023/07/10 07:36] – [RVM] david | ||
---|---|---|---|
Ligne 18: | Ligne 18: | ||
<file javascript / | <file javascript / | ||
- | matrix | + | diaspora |
ip4.addr = " | ip4.addr = " | ||
mount.devfs; | mount.devfs; | ||
Ligne 30: | Ligne 30: | ||
Adaptez la configuration de la //jail// '' | Adaptez la configuration de la //jail// '' | ||
- | <file ini matrix/ | + | <file ini diaspora/ |
hostname=" | hostname=" | ||
</ | </ | ||
Ligne 40: | Ligne 40: | ||
On assure le démarrage au reboot: | On assure le démarrage au reboot: | ||
<code bash> | <code bash> | ||
- | root@popeye:# | + | sysrc jail_enable=" |
- | root@popeye:# | + | sysrc jail_list+=" |
</ | </ | ||
Ligne 68: | Ligne 68: | ||
Obtenez un certificat **SSL**. | Obtenez un certificat **SSL**. | ||
<code bash> | <code bash> | ||
- | root@popeye:/ | + | certbot certonly --nginx -d diaspora.lapinbilly.eu |
</ | </ | ||
- | Rediriger les requêtes vers votre //jail//, pour cela, on va définir un fichier dédié pour //nginx//. | + | Rediriger les requêtes vers votre //jail//, pour cela, on va définir un fichier dédié pour //nginx//: |
- | < | + | < |
server { | server { | ||
root / | root / | ||
Ligne 112: | Ligne 112: | ||
</ | </ | ||
- | Et l' | + | Et l' |
- | < | + | < |
| | ||
listen 443 ssl http2 ; | listen 443 ssl http2 ; | ||
Ligne 122: | Ligne 122: | ||
} | } | ||
</ | </ | ||
- | |||
===== Installer ===== | ===== Installer ===== | ||
Installez les ports suivants dans la //jail// '' | Installez les ports suivants dans la //jail// '' | ||
<code bash> | <code bash> | ||
- | root@popeye:# | + | root@popeye:# |
root@popeye:# | root@popeye:# | ||
</ | </ | ||
- | Construisez le serveur: | + | Attention à préciser la version de Image Magick à utiliser dans votre '' |
- | <code bash> | + | <code=bash> |
- | root@popeye:# | + | DEFAULT_VERSIONS+= imagemagick=7-nox11 |
- | root@popeye:# | + | |
- | root@popeye:# | + | |
- | </ | + | |
- | + | ||
- | Préparer l'environnement | + | |
- | <code bash> | + | |
- | root@diaspora:# | + | |
- | root@diaspora:# | + | |
- | root@diaspora:# | + | |
- | root@diaspora:# | + | |
</ | </ | ||
Ajoutez un utilisateur '' | Ajoutez un utilisateur '' | ||
<code bash> | <code bash> | ||
- | root@diaspora:# | + | root@diaspora:# |
- | root@diaspora:# | + | root@diaspora:# |
- | root@diaspora:# | + | root@diaspora:# |
root@diaspora:# | root@diaspora:# | ||
</ | </ | ||
Ligne 159: | Ligne 148: | ||
<callout type=" | <callout type=" | ||
- | Attention, ceux sont des instructions pour un //shell// '' | + | Attention, ceux sont des instructions pour un //shell// '' |
</ | </ | ||
+ | |||
+ | La plupart des scripts et configuration que l'on va utiliser ne sont pas compatible avec //csh//, c'est pourquoi l' | ||
+ | |||
+ | |||
+ | ==== RVM ==== | ||
+ | |||
+ | Diaspora* est resté sur des versions EOL de //ruby//. Du coup, il faut mieux installer la bonne version du langage à l'aide du '' | ||
+ | Cela installe une version du langage dans votre home. | ||
+ | Le hic, c'est qu'il va falloir le compiler. | ||
+ | |||
+ | <code bash> | ||
+ | root@popeye:# | ||
+ | </ | ||
+ | De plus, l' | ||
+ | |||
+ | Sous votre session utilisateur: | ||
+ | <code bash> | ||
+ | curl -sSL https:// | ||
+ | bash installer.sh head | ||
+ | echo '[[ -s " | ||
+ | . ~/ | ||
+ | rvm autolibs read-fail | ||
+ | rvm install 3.1 | ||
+ | </ | ||
+ | |||
+ | Une fois //rvm// installé, vous pouvez le mettre à jour et installer d' | ||
+ | <code bash> | ||
+ | rvm get head | ||
+ | rvm list known | ||
+ | rvm install ruby-3.1 | ||
+ | </ | ||
+ | |||
+ | Et définir votre version de travail | ||
+ | < | ||
+ | rvm use 3.1 --default | ||
+ | </ | ||
+ | |||
+ | ==== Serveur ==== | ||
+ | |||
+ | |||
+ | Construisez le serveur: | ||
+ | <code bash> | ||
+ | root@popeye:# | ||
+ | root@popeye:# | ||
+ | root@popeye:# | ||
+ | </ | ||
Et allons-y pour l' | Et allons-y pour l' | ||
Ligne 166: | Ligne 201: | ||
diaspora@diaspora: | diaspora@diaspora: | ||
diaspora@diaspora: | diaspora@diaspora: | ||
- | diaspora@diaspora: | + | diaspora@diaspora: |
diaspora@diaspora: | diaspora@diaspora: | ||
+ | diaspora@diaspora: | ||
diaspora@diaspora: | diaspora@diaspora: | ||
- | diaspora@diaspora: | + | diaspora@diaspora: |
- | diaspora@diaspora: | + | |
diaspora@diaspora: | diaspora@diaspora: | ||
diaspora@diaspora: | diaspora@diaspora: | ||
+ | </ | ||
+ | La dernière commande utilise le gestionnaire de paquets //Yarn// pour // | ||
+ | < | ||
+ | sysctl kern.elf64.allow_wx=1 | ||
</ | </ | ||
Ligne 184: | Ligne 223: | ||
- '' | - '' | ||
- | - '' | + | - '' |
Dirigez la connexion vers votre base de données: | Dirigez la connexion vers votre base de données: | ||
Ligne 212: | Ligne 251: | ||
- Donnez un nom de serveur . | - Donnez un nom de serveur . | ||
- | <file diff config/ | + | |
- | --- config/ | + | <file diff config/ |
- | +++ config/ | + | --- config/ |
- | @@ -36,7 +36,7 @@ | + | +++ config/ |
- | | + | @@ -30,7 +30,7 @@ |
- | | + | ## However changing http to https is okay and has no consequences. |
- | | + | ## If you do change the URL, you will have to start again as the URL |
- | - #url: " | + | ## will be hardcoded into the database. |
- | + url: " | + | -#url = " |
+ | +url = " | ||
- | ## Set the bundle of certificate authorities (CA) certificates. | + | ## Set the bundle of certificate authorities (CA) certificates. |
- | | + | ## This is specific to your operating system. |
- | @@ -44,7 +44,7 @@ | + | @@ -39,6 +39,7 @@ |
- | ## For Debian, Ubuntu, Archlinux, Gentoo (package ca-certificates): | + | # |
- | # | + | ## For CentOS, Fedora: |
- | | + | # |
- | - | + | +certificate_authorities |
- | + certificate_authorities: '/ | + | |
- | ## URL for a remote Redis (default=localhost). | + | ## URL for a remote Redis (default="localhost"). |
- | | + | ## Don't forget to restrict IP access if you uncomment these! |
- | @@ -175,7 +175,7 @@ | + | @@ -221,11 +222,11 @@ |
- | ## Where the appserver should listen to (default=unix: | + | [configuration.privacy.statistics] |
- | # | + | |
- | # | + | |
- | - #listen: ' | + | |
- | + #listen: ' | + | |
- | ## Set the path for the PID file of the unicorn master process (default=tmp/ | + | ## Local user total and 6 month active counts. |
- | | + | -#user_counts = true |
- | @@ -609, | + | +user_counts = true |
- | mail: ## Section | + | |
- | ## First you need to enable it. | + | ## Local post total count. |
- | - #enable: | + | -#post_counts = true |
- | + | + | +comment_counts = true |
- | ## Sender address used in mail sent by Diaspora. | + | ## Use Camo to proxy embedded remote images. |
- | - #sender_address: | + | ## Do not enable this setting unless you have a working Camo setup. Using |
- | + sender_address: | + | @@ -458,9 +460,9 @@ |
+ | ## email will be sent to the user and after an additional `warn_days`, | ||
+ | ## account will be automatically closed. | ||
+ | ## This maintenance is not enabled | ||
+ | -#remove_old_users.enable = true | ||
+ | -# | ||
+ | -# | ||
+ | +remove_old_users.enable = true | ||
+ | +remove_old_users.after_days = 180 | ||
+ | +remove_old_users.warn_days = 0 | ||
+ | # | ||
- | ## This selects which mailer should be used. Use ' | ||
- | ## connection or ' | ||
- | - #method: ' | ||
- | + method: ' | ||
- | ## Ignore if method isn't ' | + | @@ -517,17 +519,21 @@ |
- | smtp: ## Section | + | [configuration.mail] |
- | @@ -653,7 +653,7 @@ | + | ## First you need to enable it. |
- | sendmail: | + | -#enable = true |
+ | +enable = true | ||
- | ## The path to the sendmail binary (default='/ | + | ## Sender address used in mail sent by Diaspora. |
- | - # | + | # |
- | + | + | +sender_address = 'no-reply@lapinbilly.eu' |
- | ## Use exim and sendmail (default=false) | + | ## This selects which mailer should be used. Use " |
- | # | + | ## |
- | @@ -665,10 +665,10 @@ | + | #method = "smtp" |
- | ## This doesn' | + | +method = ' |
- | | + | |
- | ## systems. Set only the username, NOT the full ID. | + | |
- | - | + | |
- | + | + | |
- | ## E-mail address to contact the administrator. | + | ## Ignored if method isn't " |
- | - # | + | [configuration.mail.smtp] |
- | + | + | +host = 'mail.out.net' |
+ | +port = 465 | ||
- | ## Settings related | + | ## Host and port of the smtp server handling outgoing mail. |
- | relay: | + | ## This should match the common name of the certificate sent by |
+ | @@ -539,6 +545,7 @@ | ||
+ | ## Use one of " | ||
+ | ## if server does not support authentication. | ||
+ | # | ||
+ | +authentication = ' | ||
+ | |||
+ | ## Credentials | ||
+ | ## | ||
+ | @@ -547,7 +554,7 @@ | ||
+ | |||
+ | ## Automatically enable TLS (default=true). | ||
+ | ## Leave this commented out if authentication is set to " | ||
+ | -# | ||
+ | +starttls_auto = false | ||
+ | |||
+ | ## The domain for the HELO command, if needed. | ||
+ | # | ||
+ | @@ -561,7 +568,7 @@ | ||
+ | | ||
+ | |||
+ | ## The path to the sendmail binary (default="/ | ||
+ | -#location = "/ | ||
+ | +location = "/ | ||
+ | |||
+ | ## Use exim and sendmail (default=false) | ||
+ | # | ||
+ | @@ -573,9 +580,10 @@ | ||
+ | ## This doesn' | ||
+ | ## admin contact is needed, much like the postmaster role in mail | ||
+ | ## systems. Set only the username, NOT the full ID. | ||
+ | -#account = " | ||
+ | +account = " | ||
+ | |||
+ | ## E-mail address via which the administrator can be contacted. | ||
+ | +podmin_email = ' | ||
+ | # | ||
+ | |||
+ | ## Advanced - ignore unless you know better | ||
+ | |||
</ | </ | ||
+ | === Journaux === | ||
+ | Pour éviter de surcharger vos disques de logs, configurez newsyslog(8) | ||
+ | |||
+ | <file shell / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Et, si vous utilisez '' | ||
+ | <file shell / | ||
+ | / | ||
+ | </ | ||
- | ===== Démarrer ==== | + | ===== Démarrer |
Lancez simplement: | Lancez simplement: | ||
Ligne 308: | Ligne 397: | ||
Role.add_admin User.where(email: | Role.add_admin User.where(email: | ||
</ | </ | ||
+ | |||
+ | ===== Production ===== | ||
+ | |||
+ | En mode production, une fois l' | ||
+ | |||
+ | N' | ||
+ | <code bash> | ||
+ | sysctl kern.elf64.allow_wx=0 | ||
+ | </ | ||
+ | ===== Mettre à jour ===== | ||
+ | |||
+ | Pour évitez une interruption du service trop longue, préparez la mise à jour dans une autre [[https:// | ||
+ | Cloner votre //jail// courante et mettez à jour tout le système. | ||
+ | |||
+ | |||
+ | Suivez les [[https:// | ||
+ | |||
+ | |||
+ | Lancez les opérations jusqu' | ||
+ | |||
+ | Coupez le service de la //jail// de production et dupliquez la base de donnée du [[ports: | ||
+ | |||
+ | <code plsql> | ||
+ | CREATE DATABASE diaspora_prodold | ||
+ | WITH TEMPLATE diaspora_production | ||
+ | OWNER diaspora; | ||
+ | </ | ||
+ | |||
+ | Modifiez le nom base de données de production du fichier '' | ||
+ | |||
+ | Dans la nouvelle //jail//, terminez la mise à jour. | ||
+ | Si tout s'est bien passé, routez la configuration [[ports: | ||
+ | |||
+ | Stoppez l' | ||
+ | |||
+ | ===== poudriere ===== | ||
+ | |||
+ | Voici un exemple de liste de paquets à installer pour une [[: | ||
+ | |||
+ | < | ||
+ | databases/ | ||
+ | databases/ | ||
+ | databases/ | ||
+ | databases/ | ||
+ | devel/ | ||
+ | devel/bison | ||
+ | devel/git | ||
+ | devel/ | ||
+ | devel/ | ||
+ | ftp/curl | ||
+ | graphics/ | ||
+ | mail/ssmtp | ||
+ | ports-mgmt/ | ||
+ | security/ | ||
+ | shells/bash | ||
+ | textproc/ | ||
+ | textproc/ | ||
+ | www/node | ||
+ | www/yarn | ||
+ | </ | ||
+ | |||