Update README.md
This commit is contained in:
parent
e258678612
commit
d3c4c8981f
68
README.md
68
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Pleroma
|
# Pleroma
|
||||||
|
|
||||||
## Serveur
|
## Configuration Serveur
|
||||||
- RAM: 4Go
|
- RAM: 4Go
|
||||||
- Proc: 4
|
- Proc: 4
|
||||||
- URL: https://toot.chalec.org
|
- URL: https://toot.chalec.org
|
||||||
|
@ -23,8 +23,10 @@
|
||||||
## Installation
|
## Installation
|
||||||
Reprise de la documentation officielle
|
Reprise de la documentation officielle
|
||||||
Installation en version OTP
|
Installation en version OTP
|
||||||
|
|
||||||
|
### Dépendances
|
||||||
|
|
||||||
```
|
```
|
||||||
# Dépendances
|
|
||||||
sudo apt install imagemagick \
|
sudo apt install imagemagick \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libimage-exiftool-perl \
|
libimage-exiftool-perl \
|
||||||
|
@ -36,38 +38,49 @@ sudo apt install imagemagick \
|
||||||
libmagic-dev \
|
libmagic-dev \
|
||||||
certbot \
|
certbot \
|
||||||
python3-certbot-nginx
|
python3-certbot-nginx
|
||||||
|
```
|
||||||
# Création de l'utilisateur Système: pleroma
|
### Création de l'utilisateur Système: pleroma
|
||||||
|
```
|
||||||
sudo adduser --system --shell /bin/false \
|
sudo adduser --system --shell /bin/false \
|
||||||
--home /opt/pleroma pleroma
|
--home /opt/pleroma pleroma
|
||||||
|
|
||||||
# Selon le serveur
|
# Selon le serveur
|
||||||
export FLAVOUR="amd64"
|
export FLAVOUR="amd64"
|
||||||
|
```
|
||||||
|
|
||||||
# Téléchargement, décompression
|
|
||||||
|
### Téléchargement, décompression
|
||||||
|
```
|
||||||
sudo su pleroma -s $SHELL -lc "
|
sudo su pleroma -s $SHELL -lc "
|
||||||
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' \
|
curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' \
|
||||||
-o /tmp/pleroma.zip
|
-o /tmp/pleroma.zip
|
||||||
unzip /tmp/pleroma.zip -d /tmp/
|
unzip /tmp/pleroma.zip -d /tmp/
|
||||||
"
|
"
|
||||||
|
```
|
||||||
|
|
||||||
# Déplacement de la release
|
### Déplacement de la release
|
||||||
|
```
|
||||||
sudo su pleroma -s $SHELL -lc "
|
sudo su pleroma -s $SHELL -lc "
|
||||||
mv /tmp/release/* /opt/pleroma
|
mv /tmp/release/* /opt/pleroma
|
||||||
rmdir /tmp/release
|
rmdir /tmp/release
|
||||||
rm /tmp/pleroma.zip
|
rm /tmp/pleroma.zip
|
||||||
"
|
"
|
||||||
|
```
|
||||||
|
|
||||||
# Création des Dossiers
|
### Création des Dossiers
|
||||||
|
```
|
||||||
sudo mkdir -p /var/lib/pleroma/{uploads,static}
|
sudo mkdir -p /var/lib/pleroma/{uploads,static}
|
||||||
sudo mkdir -p /etc/pleroma
|
sudo mkdir -p /etc/pleroma
|
||||||
sudo chown -R pleroma /var/lib/pleroma
|
sudo chown -R pleroma /var/lib/pleroma
|
||||||
sudo chown -R pleroma /etc/pleroma
|
sudo chown -R pleroma /etc/pleroma
|
||||||
|
```
|
||||||
|
|
||||||
# Generateur
|
## Générateur de configuration
|
||||||
|
```
|
||||||
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
|
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration:
|
## Configuration:par le questionnaire
|
||||||
What domain will your instance use? (e.g pleroma.soykaf.com) [] toot.chalec.org
|
What domain will your instance use? (e.g pleroma.soykaf.com) [] toot.chalec.org
|
||||||
What is the name of your instance? (e.g. The Corndog Emporium) [toot.chalec.org] Le Fédivers de Chalec.org
|
What is the name of your instance? (e.g. The Corndog Emporium) [toot.chalec.org] Le Fédivers de Chalec.org
|
||||||
What is your admin email address? [] contact+toot@chalec.org
|
What is your admin email address? [] contact+toot@chalec.org
|
||||||
|
@ -87,50 +100,72 @@ Do you want to strip location (GPS) data from uploaded images? This requires exi
|
||||||
Do you want to anonymize the filenames of uploads? (y/n) [n] y
|
Do you want to anonymize the filenames of uploads? (y/n) [n] y
|
||||||
Do you want to deduplicate uploaded files? (y/n) [n]
|
Do you want to deduplicate uploaded files? (y/n) [n]
|
||||||
|
|
||||||
# Creattion de la base de donnée Postgresql
|
# Création de la base de données Postgresql
|
||||||
|
```
|
||||||
sudo su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
|
sudo su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
|
||||||
|
```
|
||||||
# Creation du schéma de la base de donnée
|
## Création du schéma de la base de données
|
||||||
|
```
|
||||||
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||||
|
```
|
||||||
|
|
||||||
# Firewall
|
# Firewall
|
||||||
|
```
|
||||||
sudo ufw allow 443
|
sudo ufw allow 443
|
||||||
sudo ufw allow 80
|
sudo ufw allow 80
|
||||||
sudo ufw allow 4000
|
sudo ufw allow 4000
|
||||||
|
```
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
# Copy example file
|
```
|
||||||
|
## Copy example file
|
||||||
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/toot.chalec.org.conf
|
sudo cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/toot.chalec.org.conf
|
||||||
|
|
||||||
# Change tld values
|
# Change tld values
|
||||||
# replace listen 443 ssl http2; with listen 443 ssl proxy_protocol;
|
# replace listen 443 ssl http2; with listen 443 ssl proxy_protocol;
|
||||||
sudo nano /etc/nginx/sites-available/toot.chalec.org.conf
|
sudo nano /etc/nginx/sites-available/toot.chalec.org.conf
|
||||||
|
```
|
||||||
|
|
||||||
# Let's encrypt
|
# Let's encrypt
|
||||||
|
```
|
||||||
sudo certbot certonly -d toot.chalec.org
|
sudo certbot certonly -d toot.chalec.org
|
||||||
|
```
|
||||||
|
|
||||||
# Service SystemD
|
# Service SystemD
|
||||||
|
```
|
||||||
# Copy the service into a proper directory
|
# Copy the service into a proper directory
|
||||||
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
sudo cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
|
||||||
sudo systemctl start pleroma
|
sudo systemctl start pleroma
|
||||||
sudo systemctl enable pleroma
|
sudo systemctl enable pleroma
|
||||||
|
```
|
||||||
|
|
||||||
# Activattion de nginx
|
# Activation de nginx
|
||||||
|
```
|
||||||
sudo ln -s /etc/nginx/sites-available/toot.chalec.org.conf /etc/nginx/sites-enabled/toot.chalec.org
|
sudo ln -s /etc/nginx/sites-available/toot.chalec.org.conf /etc/nginx/sites-enabled/toot.chalec.org
|
||||||
sudo nginx -t && sudo systemctl restart nginx
|
sudo nginx -t && sudo systemctl restart nginx
|
||||||
|
```
|
||||||
|
|
||||||
# Creation de l'utilisateur admin
|
# Création de l'utilisateur admin
|
||||||
|
```
|
||||||
cd /opt/pleroma
|
cd /opt/pleroma
|
||||||
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl user new admin contact+toot@chalec.org --admin"
|
sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl user new admin contact+toot@chalec.org --admin"
|
||||||
|
```
|
||||||
|
|
||||||
# Installation du front-end soapbox
|
# Installation du front-end soapbox
|
||||||
|
```
|
||||||
sudo apt install busybox
|
sudo apt install busybox
|
||||||
cd /tmp
|
cd /tmp
|
||||||
curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip
|
curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip
|
||||||
sudo busybox unzip soapbox-fe.zip -o -d /var/lib/pleroma
|
sudo busybox unzip soapbox-fe.zip -o -d /var/lib/pleroma
|
||||||
|
```
|
||||||
|
|
||||||
# Optimisation de Postgresql
|
# Optimisation de Postgresql
|
||||||
|
```
|
||||||
sudo nano /etc/postgresql/13/main/postgresql.conf
|
sudo nano /etc/postgresql/13/main/postgresql.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Valeurs changées dans postgresql
|
||||||
|
```
|
||||||
# Values to change according to https://pgtune.leopard.in.ua/
|
# Values to change according to https://pgtune.leopard.in.ua/
|
||||||
# DB Version: 13
|
# DB Version: 13
|
||||||
# OS Type: linux
|
# OS Type: linux
|
||||||
|
@ -156,7 +191,10 @@ max_worker_processes = 4
|
||||||
max_parallel_workers_per_gather = 2
|
max_parallel_workers_per_gather = 2
|
||||||
max_parallel_workers = 4
|
max_parallel_workers = 4
|
||||||
max_parallel_maintenance_workers = 2
|
max_parallel_maintenance_workers = 2
|
||||||
|
```
|
||||||
|
|
||||||
# Redémarrage de la base de donnée postgresql
|
# Redémarrage de la base de donnée postgresql
|
||||||
|
|
||||||
|
```
|
||||||
sudo systemctl restart postgresql
|
sudo systemctl restart postgresql
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue