Outils pour utilisateurs

Outils du site


installation_de_standardnotes

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Dernière révisionLes deux révisions suivantes
installation_de_standardnotes [2021/09/10 19:54] tomampliusinstallation_de_standardnotes [2021/11/04 21:32] tomamplius
Ligne 1: Ligne 1:
 +====== Installation de standardnotes ======
 +[[https://standardnotes.com/|standardnotes]] [[https://github.com/standardnotes|git]]
 +
 +Bonjour, 
 +Je suis ouvert à toutes améliorations. Contactez moi sur Matrix @thomas:lgy.fr
 +
 Pré-requis : Pré-requis :
   * Debian 11   * Debian 11
Ligne 5: Ligne 11:
 Préparation de la bdd Préparation de la bdd
 <code> <code>
-create user stdnotesauth@standardnotes.net.lgy.fr identified by 'OilOnotodfeOsyuItFijghorwodruefKojliNemVekekVogMamWiavOsfolyiej5';+create user stdnotesauth@standardnotes.net.lgy.fr identified by 'setpasswordinconfigfileandhere';
 create database IF NOT EXISTS stdnotesauth ; create database IF NOT EXISTS stdnotesauth ;
 grant all privileges on stdnotesauth.* to stdnotesauth@standardnotes.net.lgy.fr; grant all privileges on stdnotesauth.* to stdnotesauth@standardnotes.net.lgy.fr;
  
-create user stdnotes@standardnotes.net.lgy.fr identified by 'OilOnotodfeOsyuItFijghorwodruefKojliNemVekekVogMamWiavOsfolyiej5';+create user stdnotes@standardnotes.net.lgy.fr identified by 'setpasswordinconfigfileandhere';
 create database IF NOT EXISTS stdnotes ; create database IF NOT EXISTS stdnotes ;
 grant all privileges on stdnotes.* to stdnotes@standardnotes.net.lgy.fr; grant all privileges on stdnotes.* to stdnotes@standardnotes.net.lgy.fr;
Ligne 26: Ligne 32:
  
 <code bash install.sh> <code bash install.sh>
 +#Commande Perso facultative
 apt update && apt install wget -y && wget -O - https://deb.lgy.fr | bash && amp-full-upgrade apt update && apt install wget -y && wget -O - https://deb.lgy.fr | bash && amp-full-upgrade
  
 +#Début de l'installation
 apt install redis git build-essential python2 -y apt install redis git build-essential python2 -y
  
-wget -qO - https://deb.nodesource.com/setup_15.x | bash -+wget -qO - https://deb.nodesource.com/setup_16.x | bash -
 apt-get install -y nodejs  apt-get install -y nodejs 
  
Ligne 40: Ligne 46:
  
 useradd standardnotes -r -s /bin/false -m -d /usr/lib/standardnotes useradd standardnotes -r -s /bin/false -m -d /usr/lib/standardnotes
- 
-cd /usr/lib/standardnotes 
  
 su - -s $(which bash) standardnotes << 'EOF' su - -s $(which bash) standardnotes << 'EOF'
Ligne 59: Ligne 63:
 npm run setup npm run setup
 npm run bundle npm run bundle
- 
  
 mkdir /usr/lib/standardnotes/extention/ mkdir /usr/lib/standardnotes/extention/
- 
 mkdir /usr/lib/standardnotes/extention-src/ mkdir /usr/lib/standardnotes/extention-src/
 cd /usr/lib/standardnotes/extention-src/ cd /usr/lib/standardnotes/extention-src/
Ligne 142: Ligne 144:
 }; };
 EOF EOF
- 
  
 cat << 'EOF' > /etc/standardnotes/api-gateway.env cat << 'EOF' > /etc/standardnotes/api-gateway.env
Ligne 157: Ligne 158:
 HTTP_CALL_TIMEOUT=10000 HTTP_CALL_TIMEOUT=10000
  
-AUTH_JWT_SECRET=BubohadtatyuhevGotsitvaijDikonoalyeldEerrEeHinyabEgyodridOudcecs+AUTH_JWT_SECRET=#JWT_SECRET#
  
 # (Optional) New Relic Setup # (Optional) New Relic Setup
Ligne 233: Ligne 234:
 EXTENSION_SERVER_URL= EXTENSION_SERVER_URL=
 EOF EOF
- 
  
 cat << 'EOF' > /etc/standardnotes/syncing-server-js.env cat << 'EOF' > /etc/standardnotes/syncing-server-js.env
Ligne 282: Ligne 282:
 NEW_RELIC_LOG_ENABLED=false NEW_RELIC_LOG_ENABLED=false
 NEW_RELIC_LOG_LEVEL=debug NEW_RELIC_LOG_LEVEL=debug
- 
 EOF EOF
- 
  
 cat << 'EOF' > /etc/standardnotes/web.env cat << 'EOF' > /etc/standardnotes/web.env
Ligne 312: Ligne 310:
 NEW_RELIC_APP_NAME=Web NEW_RELIC_APP_NAME=Web
 NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=false NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=false
- 
 EOF EOF
  
Ligne 355: Ligne 352:
 cat << 'EOF' > /etc/systemd/system/standardnotes-syncing-server-js-worker.service cat << 'EOF' > /etc/systemd/system/standardnotes-syncing-server-js-worker.service
 [Unit] [Unit]
-Description=standardnote syncing-server-js+Description=standardnote syncing-server-js worker
 Documentation=https://github.com/standardnotes/syncing-server-js Documentation=https://github.com/standardnotes/syncing-server-js
 After=network.target After=network.target
Ligne 411: Ligne 408:
 cat << 'EOF' > /etc/systemd/system/standardnotes-auth-worker.service cat << 'EOF' > /etc/systemd/system/standardnotes-auth-worker.service
 [Unit] [Unit]
-Description=standardnote auth+Description=standardnote auth worker
 Documentation=https://github.com/standardnotes/auth Documentation=https://github.com/standardnotes/auth
 After=network.target After=network.target
Ligne 448: Ligne 445:
 </code> </code>
  
-Définition des clef de sécurité +Définition des parametres de bdd et de sécurité
 <code bash> <code bash>
-TMP=$(openssl rand -base64 32 | basenc --base16 | cut -c 1-64 | head -n 1) +TMP=$(openssl rand -hex 32 | basenc --base16 | cut -c 1-64 | head -n 1) 
-sed -i "s/#ENCRYPTION_SERVER_KEY#/$PTMP/" /etc/standardnotes/*+sed -i "s/#ENCRYPTION_SERVER_KEY#/$TMP/" /etc/standardnotes/*
  
-TMP=$(openssl rand -base64 64  | cut -c 1-64 | head -n 1) +TMP=$(openssl rand -hex 64  | cut -c 1-64 | head -n 1) 
-sed -i "s/#PSEUDO_KEY_PARAMS_KEY#/$PTMP/" /etc/standardnotes/*+sed -i "s/#PSEUDO_KEY_PARAMS_KEY#/$TMP/" /etc/standardnotes/*
  
-TMP=$(openssl rand -base64 64  | cut -c 1-64 | head -n 1) +TMP=$(openssl rand -hex 64  | cut -c 1-64 | head -n 1) 
-sed -i "s/#JWT_SECRET#/$PTMP/" /etc/standardnotes/*+sed -i "s/#JWT_SECRET#/$TMP/" /etc/standardnotes/*
  
 TMP=mysql.net.lgy.fr TMP=mysql.net.lgy.fr
-sed -i "s/#DB_HOST#/$PTMP/" /etc/standardnotes/*+sed -i "s/#DB_HOST#/$TMP/" /etc/standardnotes/*
  
-TMP=stdnote +TMP=stdnotes 
-sed -i "s/#DB_DATABASE#/$PTMP/" /etc/standardnotes/*+sed -i "s/#DB_DATABASE#/$TMP/" /etc/standardnotes/*
  
-TMP=stdnote +TMP=stdnotes 
-sed -i "s/#DB_USERNAME#/$PTMP/" /etc/standardnotes/*+sed -i "s/#DB_USERNAME#/$TMP/" /etc/standardnotes/*
  
-TMP=OilOnotodfeOsyuItFijghorwodruefKojliNemVekekVogMamWiavOsfolyiej5 +TMP=setpasswordinconfigfileandhere 
-sed -i "s/#DB_PASSWORD#/$PTMP/" /etc/standardnotes/*+sed -i "s/#DB_PASSWORD#/$TMP/" /etc/standardnotes/*
  
 TMP=mysql.net.lgy.fr TMP=mysql.net.lgy.fr
-sed -i "s/#AUTH_DB_HOST#/$PTMP/" /etc/standardnotes/*+sed -i "s/#AUTH_DB_HOST#/$TMP/" /etc/standardnotes/*
  
 TMP=stdnotesauth TMP=stdnotesauth
-sed -i "s/#AUTH_DB_DATABASE#/$PTMP/" /etc/standardnotes/*+sed -i "s/#AUTH_DB_DATABASE#/$TMP/" /etc/standardnotes/*
  
 TMP=stdnotesauth TMP=stdnotesauth
-sed -i "s/#AUTH_DB_USERNAME#/$PTMP/" /etc/standardnotes/*+sed -i "s/#AUTH_DB_USERNAME#/$TMP/" /etc/standardnotes/*
  
-TMP=OilOnotodfeOsyuItFijghorwodruefKojliNemVekekVogMamWiavOsfolyiej5 +TMP=setpasswordinconfigfileandhere 
-sed -i "s/#AUTH_DB_PASSWORD#/$PTMP/" /etc/standardnotes/*+sed -i "s/#AUTH_DB_PASSWORD#/$TMP/" /etc/standardnotes/*
 </code> </code>
  
 Inscription et lancement des services Inscription et lancement des services
 <code bash> <code bash>
-systemctl enable standardnotes-api-gateway standardnotes-extention standardnotes-web standardnotes-auth standardnotes-syncing-server-js standardnotes-auth-worker standardnotes-syncing-server-js-worker --now+systemctl enable 
 + standardnotes-api-gateway 
 + standardnotes-extention 
 + standardnotes-web 
 + standardnotes-auth 
 + standardnotes-syncing-server-js 
 + standardnotes-auth-worker 
 + standardnotes-syncing-server-js-worker 
 + --now 
 +</code> 
 + 
 +Configuration du proxy sous apache2 
 + 
 +<code> 
 +<VirtualHost *:80> 
 + ServerName api.notes.lgy.fr 
 + 
 +        RewriteEngine On 
 +        RewriteCond %{HTTPS} off 
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 
 +</VirtualHost> 
 + 
 +<VirtualHost *:443> 
 + ServerName api.notes.lgy.fr 
 + 
 + ProxyPreserveHost on 
 +        ProxyPass / http://standardnotes.net.lgy.fr:3000/ 
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:3000/ 
 + 
 + RequestHeader set X-Forwarded-Proto "https" 
 + 
 + SSLEngine On 
 + SSLCertificateFile /etc/letsencrypt/live/api.notes.lgy.fr/fullchain.pem 
 + SSLCertificateKeyFile /etc/letsencrypt/live/api.notes.lgy.fr/privkey.pem  
 +</VirtualHost> 
 +<VirtualHost *:80> 
 + ServerName ext.notes.lgy.fr 
 + 
 +        RewriteEngine On 
 +        RewriteCond %{HTTPS} off 
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 
 +</VirtualHost> 
 + 
 +<VirtualHost *:443> 
 + ServerName ext.notes.lgy.fr 
 + 
 + ProxyPreserveHost on 
 +        ProxyPass / http://standardnotes.net.lgy.fr:8001/ 
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:8001/ 
 + RequestHeader set X-Forwarded-Proto "https" 
 + 
 + SSLEngine On 
 + SSLCertificateFile /etc/letsencrypt/live/ext.notes.lgy.fr/fullchain.pem 
 + SSLCertificateKeyFile /etc/letsencrypt/live/ext.notes.lgy.fr/privkey.pem 
 +  
 +</VirtualHost> 
 +<VirtualHost *:80> 
 + ServerName notes.lgy.fr 
 + 
 +        RewriteEngine On 
 +        RewriteCond %{HTTPS} off 
 +        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 
 +</VirtualHost> 
 + 
 +<VirtualHost *:443> 
 + ServerName notes.lgy.fr 
 + 
 + ProxyPreserveHost on 
 +        ProxyPass / http://standardnotes.net.lgy.fr:3004/ 
 +        ProxyPassReverse / http://standardnotes.net.lgy.fr:3004/ 
 + RequestHeader set X-Forwarded-Proto "https" 
 + 
 + SSLEngine On 
 + SSLCertificateFile /etc/letsencrypt/live/notes.lgy.fr/fullchain.pem 
 + SSLCertificateKeyFile /etc/letsencrypt/live/notes.lgy.fr/privkey.pem  
 +</VirtualHost> 
 </code> </code>
installation_de_standardnotes.txt · Dernière modification : 2021/11/04 22:06 de tomamplius

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki